Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
2e81d8b
Add capture checking to boundary and NonLocalReturns
natsukagami Apr 1, 2025
1ada5f6
Add capture-checking test for boundary
natsukagami Mar 11, 2025
0a6490c
Patch DropBreaks to correctly detect boundary blocks
natsukagami Mar 12, 2025
cc82c70
Add capture checking to CommandLineParser
natsukagami Mar 31, 2025
32ef601
Add capture checking to scala.util
natsukagami Mar 31, 2025
28b7705
Add capture checking to scala.runtime
natsukagami Mar 31, 2025
4d88844
Add capture checking to rest of scala.runtime (except TupledFunctions)
natsukagami Apr 1, 2025
8c95d6c
Add capture checking to IArray
natsukagami Aug 7, 2025
9a5c1b7
[TODO INVESTIGATE] IArray: `Array[AnyRef^{xs*}]` not working, revert …
natsukagami Aug 5, 2025
397b62f
Add capture checking to various scala.* base package files
natsukagami Aug 7, 2025
7155f3d
[TODO FIX] Temporarily drop upper bound of higher-kinded type `F` in …
natsukagami Apr 7, 2025
1c7196d
Add capture checking to scala.reflect
natsukagami Apr 7, 2025
67f8eec
[TODO REMOVE] Add TODO list
natsukagami Apr 7, 2025
0791961
[TODO EXPLAIN] Add capture checking to Mirror and TupleMirror
natsukagami Apr 8, 2025
d3ad017
Disable CC on Mirror for now, it's interferring with case classes
natsukagami Aug 11, 2025
11c1aa3
Add capture checking to scala.caps
natsukagami Apr 8, 2025
3b1ca63
Add capture checking to compiletime.Ops
natsukagami Apr 9, 2025
af9d128
Add capture checking to stdLibPatches
natsukagami Apr 9, 2025
e2f2387
Add capture checking to annotations
natsukagami Apr 10, 2025
618ba9c
Attempt to capture-check quotes
natsukagami Apr 10, 2025
2f6a394
Track sun.misc.Unsafe in LazyVal implementation
natsukagami Apr 14, 2025
402ac89
Require Conversion to be pure
natsukagami Jul 31, 2025
ccda5a1
Remove CC from tuples for now, Map is not compiling
natsukagami Aug 7, 2025
d301515
Make sure that DropBreaks catch also constant folded statements
natsukagami Aug 8, 2025
3b957f2
Update test outputs
natsukagami Aug 11, 2025
4f4aa5b
Remove TODO
natsukagami Aug 15, 2025
c771f9f
Remove extra added line
natsukagami Aug 15, 2025
bdfe28a
Apply suggestions from code review
natsukagami Aug 15, 2025
9b0fd11
Update output of boundary test
natsukagami Aug 15, 2025
84bc4e3
Make Break.label public again
natsukagami Aug 16, 2025
78ef541
Add safety comment to `Boundary.label`
natsukagami Aug 16, 2025
6622e4c
Fix boundary test error line number
natsukagami Aug 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add capture checking to scala.caps
  • Loading branch information
natsukagami committed Aug 15, 2025
commit 11c1aa36d6e2c61cf1a94adef3e3ed2dfca9acec
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
- [ ] library/src/scala/annotation/unchecked/uncheckedCapabilityLeaks.scala
- [ ] library/src/scala/annotation/unchecked/uncheckedCaptures.scala
- [ ] library/src/scala/annotation/unroll.scala
- [ ] library/src/scala/caps/package.scala
- [x] library/src/scala/caps/package.scala
- [ ] library/src/scala/compiletime/ops/any.scala
- [ ] library/src/scala/compiletime/ops/boolean.scala
- [ ] library/src/scala/compiletime/ops/double.scala
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/cc/Synthetics.scala
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,4 @@ object Synthetics:
transformCompareCaptures)
end transform

end Synthetics
end Synthetics
2 changes: 2 additions & 0 deletions library/src/scala/caps/package.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package scala
package caps

import language.experimental.captureChecking

import annotation.{experimental, compileTimeOnly, retainsCap}

/**
Expand Down
2 changes: 2 additions & 0 deletions library/src/scala/compiletime/testing/Error.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package scala.compiletime.testing

import language.experimental.captureChecking

/** Represents a compile-time error.
*
* @see scala.compiletime.testing.typeCheckErrors
Expand Down
2 changes: 2 additions & 0 deletions library/src/scala/compiletime/testing/ErrorKind.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package scala.compiletime.testing

import language.experimental.captureChecking

/** An error can be either a parse-time or a typecheck-time */
sealed trait ErrorKind // This should be an enum but currently, Dotty lib fails to
// compile with an obscure error.
Expand Down
2 changes: 2 additions & 0 deletions library/src/scala/compiletime/testing/package.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package scala.compiletime
package testing

import language.experimental.captureChecking

/** Whether the code type checks in the current context?
*
* An inline definition with a call to `typeChecks` should be transparent.
Expand Down