Skip to content

Commit a2a12a2

Browse files
committed
Rename -YnoDoubleBindings to -Yno-double-bindings
This aligns with the "-" instead of CamelCase convention for the other command line options. Also, enable -Yno-double-bindings for dotc_core.
1 parent b574ac0 commit a2a12a2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/dotty/tools/dotc/ast/TreeTypeMap.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import dotty.tools.dotc.transform.SymUtils._
3030
* have two substitutons S1 = [outer#1 := outer#3], S2 = [inner#2 := inner#4] where
3131
* hashtags precede symbol ids. If we do S1 first, we get outer#2.inner#3. If we then
3232
* do S2 we get outer#2.inner#4. But that means that the named type outer#2.inner
33-
* gets two different denotations in the same period. Hence, if -YnoDoubleBindings is
33+
* gets two different denotations in the same period. Hence, if -Yno-double-bindings is
3434
* set, we would get a data race assertion error.
3535
*/
3636
final class TreeTypeMap(

src/dotty/tools/dotc/config/ScalaSettings.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class ScalaSettings extends Settings.SettingGroup {
170170
val Ytyperdebug = BooleanSetting("-Ytyper-debug", "Trace all type assignments.")
171171
val Ypatmatdebug = BooleanSetting("-Ypatmat-debug", "Trace pattern matching translation.")
172172
val Yexplainlowlevel = BooleanSetting("-Yexplain-lowlevel", "When explaining type errors, show types at a lower level.")
173-
val YnoDoubleBindings = BooleanSetting("-YnoDoubleBindings", "Assert no namedtype is bound twice (should be enabled only if program is error-free).")
173+
val YnoDoubleBindings = BooleanSetting("-Yno-double-bindings", "Assert no namedtype is bound twice (should be enabled only if program is error-free).")
174174

175175
val optimise = BooleanSetting("-optimise", "Generates faster bytecode by applying optimisations to the program") withAbbreviation "-optimize"
176176

test/dotc/tests.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class tests extends CompilerTest {
2525
val testPickling = List("-Xprint-types", "-Ytest-pickler", "-Ystop-after:pickler")
2626

2727
val failedOther = List("-Ystop-before:collectEntryPoints") // some non-obvious reason. need to look deeper
28-
val twice = List("#runs", "2", "-YnoDoubleBindings")
28+
val twice = List("#runs", "2", "-Yno-double-bindings")
2929
val staleSymbolError: List[String] = List()
3030

3131
val allowDeepSubtypes = defaultOptions diff List("-Yno-deep-subtypes")
@@ -130,8 +130,8 @@ class tests extends CompilerTest {
130130
@Test def dotc = compileDir(dotcDir + "tools/dotc", failedOther)(allowDeepSubtypes ++ twice) // see dotc_core
131131
@Test def dotc_ast = compileDir(dotcDir + "tools/dotc/ast", failedOther ++ twice)
132132
//similar to dotc_core_pickling but for another anon class. Still during firstTransform
133-
@Test def dotc_config = compileDir(dotcDir + "tools/dotc/config", twice)
134-
@Test def dotc_core = compileDir(dotcDir + "tools/dotc/core", failedOther)(allowDeepSubtypes) // !!!twice gives "data race?" error in InterceptedMethods
133+
@Test def dotc_config = compileDir(dotcDir + "tools/dotc/config")
134+
@Test def dotc_core = compileDir(dotcDir + "tools/dotc/core", failedOther)("-Yno-double-bindings" :: allowDeepSubtypes)// twice omitted to make tests run faster
135135
// error: error while loading ConstraintHandling$$anon$1$,
136136
// class file 'target/scala-2.11/dotty_2.11-0.1-SNAPSHOT.jar(dotty/tools/dotc/core/ConstraintHandling$$anon$1.class)'
137137
// has location not matching its contents: contains class $anon

0 commit comments

Comments
 (0)