Skip to content

Commit a4b148e

Browse files
committed
Added to neg-custom-args test suite
1 parent a2e24f9 commit a4b148e

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import Contexts._
2424
import Types._
2525
import Symbols._
2626
import Denotations._
27+
import Decorators._
28+
2729
import Phases._
2830
import java.lang.AssertionError
2931
import java.io.{DataOutputStream, File => JFile}
@@ -193,8 +195,8 @@ class GenBCodePipeline(val entryPoints: List[Symbol], val int: DottyBackendInter
193195
case None =>
194196
caseInsensitively.put(lowercaseJavaClassName, claszSymbol)
195197
case Some(dupClassSym) =>
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+
ctx.warning(s"Class ${claszSymbol.name} differs only in case from ${dupClassSym.name}. " +
199+
"Such classes will overwrite one another on case-insensitive filesystems.", cd.pos)
198200
}
199201

200202
// -------------- mirror class, if needed --------------

compiler/test/dotty/tools/dotc/CompilationTests.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ class CompilationTests extends ParallelTesting {
194194
compileFile("../tests/neg-custom-args/i3882.scala", allowDeepSubtypes) +
195195
compileFile("../tests/neg-custom-args/phantom-overload.scala", allowDoubleBindings) +
196196
compileFile("../tests/neg-custom-args/phantom-overload-2.scala", allowDoubleBindings) +
197-
compileFile("../tests/neg-custom-args/structural.scala", defaultOptions.and("-Xfatal-warnings"))
197+
compileFile("../tests/neg-custom-args/structural.scala", defaultOptions.and("-Xfatal-warnings")) +
198+
compileFile("../tests/neg-custom-args/i2673.scala", defaultOptions.and("-Xfatal-warnings"))
198199
}.checkExpectedErrors()
199200

200201
// Run tests -----------------------------------------------------------------

tests/neg-custom-args/i2673.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package Foos
2+
3+
class Foo
4+
class foo // error

tests/neg/i2673.scala

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)