Skip to content

Commit c914b04

Browse files
committed
Add documentation
1 parent cdd18ec commit c914b04

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,9 +1199,16 @@ object Denotations {
11991199
val alt =
12001200
if (generateStubs) missingHook(owner.symbol.moduleClass, selector)
12011201
else NoSymbol
1202+
1203+
def isPackageFromCoreLibMissing: Boolean = {
1204+
owner.symbol == defn.RootClass &&
1205+
{
1206+
selector == nme.scala_ || // if the scala package is missing, the stdlib must be missing
1207+
selector == nme.scalaShadowing // if the scalaShadowing package is missing, the dotty library must be missing
1208+
}
1209+
}
12021210
if (alt.exists) alt.denot
1203-
else if (owner.symbol == defn.RootClass && (selector == nme.scala_ || selector == nme.scalaShadowing))
1204-
throw new MissingCoreLibraryException(selector.toString)
1211+
else if (isPackageFromCoreLibMissing) throw new MissingCoreLibraryException(selector.toString)
12051212
else MissingRef(owner, selector)
12061213
}
12071214
}

compiler/test/dotty/tools/vulpix/TestConfiguration.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ object TestConfiguration {
2525

2626
val classPath = mkClassPath(Jars.dottyTestDeps)
2727

28-
def mkClassPath(deps: List[String]) = {
28+
def mkClassPath(deps: List[String]): Array[String] = {
2929
val paths = deps map { p =>
3030
val file = new java.io.File(p)
3131
assert(

0 commit comments

Comments
 (0)