@@ -7,12 +7,10 @@ import Types.*, Symbols.*, Contexts.*, Annotations.*, Flags.*
77import Names .TermName
88import ast .{tpd , untpd }
99import Decorators .* , NameOps .*
10- import config .SourceVersion
1110import config .Printers .capt
1211import util .Property .Key
1312import tpd .*
1413import StdNames .nme
15- import config .Feature
1614import collection .mutable
1715import CCState .*
1816import reporting .Message
@@ -24,57 +22,6 @@ private val Captures: Key[CaptureSet] = Key()
2422/** Context property to print root.Fresh(...) as "fresh" instead of "cap" */
2523val PrintFresh : Key [Unit ] = Key ()
2624
27- object ccConfig :
28-
29- /** If enabled, use a special path in recheckClosure for closures
30- * to compare the result tpt of the anonymous functon with the expected
31- * result type. This can narrow the scope of error messages.
32- */
33- inline val preTypeClosureResults = false
34-
35- /** If this and `preTypeClosureResults` are both enabled, disable `preTypeClosureResults`
36- * for eta expansions. This can improve some error messages.
37- */
38- inline val handleEtaExpansionsSpecially = true
39-
40- /** Don't require @use for reach capabilities that are accessed
41- * only in a nested closure. This is unsound without additional
42- * mitigation measures, as shown by unsound-reach-5.scala.
43- */
44- inline val deferredReaches = false
45-
46- /** Check that if a type map (which is not a BiTypeMap) maps initial capture
47- * set variable elements to themselves it will not map any elements added in
48- * the future to something else. That is, we can safely use a capture set
49- * variable itself as the image under the map. By default this is off since it
50- * is a bit expensive to check.
51- */
52- inline val checkSkippedMaps = false
53-
54- /** Always repeat a capture checking run at least once if there are no errors
55- * yet. Used for stress-testing the logic for when a new capture checking run needs
56- * to be scheduled because a provisionally solved capture set was later extended.
57- * So far this happens only in very few tests. With the flag on, the logic is
58- * tested for all tests except neg tests.
59- */
60- inline val alwaysRepeatRun = false
61-
62- /** After capture checking, check that no capture set contains ParamRefs that are outside
63- * its scope. This used to occur and was fixed by healTypeParam. It should no longer
64- * occur now.
65- */
66- inline val postCheckCapturesets = false
67-
68- /** If true, turn on separation checking */
69- def useSepChecks (using Context ): Boolean =
70- Feature .sourceVersion.stable.isAtLeast(SourceVersion .`3.7`)
71-
72- /** Not used currently. Handy for trying out new features */
73- def newScheme (using Context ): Boolean =
74- Feature .sourceVersion.stable.isAtLeast(SourceVersion .`3.8`)
75-
76- end ccConfig
77-
7825/** Are we at checkCaptures phase? */
7926def isCaptureChecking (using Context ): Boolean =
8027 ctx.phaseId == Phases .checkCapturesPhase.id
0 commit comments