Skip to content

Commit a2e24f9

Browse files
committed
Restore GenASM classfile generation for case insensitive filesystems
1 parent ecc1f7b commit a2e24f9

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

compiler/src/dotty/tools/backend/jvm/GenBCode.scala

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,18 +188,14 @@ class GenBCodePipeline(val entryPoints: List[Symbol], val int: DottyBackendInter
188188
val claszSymbol = cd.symbol
189189

190190
// GenASM checks this before classfiles are emitted, https://github.com/scala/scala/commit/e4d1d930693ac75d8eb64c2c3c69f2fc22bec739
191-
// todo: add back those checks
192-
/*val lowercaseJavaClassName = claszSymbol.javaClassName.toLowerCase
191+
val lowercaseJavaClassName = claszSymbol.name.toString.toLowerCase
193192
caseInsensitively.get(lowercaseJavaClassName) match {
194193
case None =>
195194
caseInsensitively.put(lowercaseJavaClassName, claszSymbol)
196195
case Some(dupClassSym) =>
197-
reporter.warning(
198-
claszSymbol.pos,
199-
s"Class ${claszSymbol.javaClassName} differs only in case from ${dupClassSym.javaClassName}. " +
200-
"Such classes will overwrite one another on case-insensitive filesystems."
201-
)
202-
}*/
196+
ctx.warning(s"Class ${claszSymbol.name.toString.toLowerCase} differs only in case from ${dupClassSym.name.toString}. " +
197+
"Such classes will overwrite one another on case-insensitive filesystems.")
198+
}
203199

204200
// -------------- mirror class, if needed --------------
205201
val mirrorC =

0 commit comments

Comments
 (0)