Skip to content

Commit 9b6e03a

Browse files
committed
Fix missing core libs test
Rearrange initialization sequence so that we fail with a missing core libs exception before any other symbols are forced.
1 parent e50ab7c commit 9b6e03a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

compiler/src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,13 +1104,15 @@ class Definitions {
11041104
def init()(implicit ctx: Context) = {
11051105
this.ctx = ctx
11061106
if (!_isInitialized) {
1107-
// force initialization of every symbol that is synthesized or hijacked by the compiler
1108-
val forced = syntheticCoreClasses ++ syntheticCoreMethods ++ ScalaValueClasses()
1109-
11101107
// Enter all symbols from the scalaShadowing package in the scala package
11111108
for (m <- ScalaShadowingPackageClass.info.decls)
11121109
ScalaPackageClass.enter(m)
11131110

1111+
// force initialization of every symbol that is synthesized or hijacked by the compiler
1112+
// Placed here so that an abort with a MissingCoreLibraryException because scalaShadowing
1113+
// is not found comes before any additional errors are reported.
1114+
val forced = syntheticCoreClasses ++ syntheticCoreMethods ++ ScalaValueClasses()
1115+
11141116
_isInitialized = true
11151117
}
11161118
}

0 commit comments

Comments
 (0)