File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -348,10 +348,10 @@ class Namer { typer: Typer =>
348
348
if ((existing is Package ) && (pkgOwner eq existing.owner)) existing
349
349
else {
350
350
/** If there's already an existing type, then the package is a dup of this type */
351
- val existingTpe = pkgOwner.info.decls.lookup(pid.name.toTypeName)
352
- if (existingTpe != NoSymbol ) {
353
- ctx.error(PkgDuplicateSymbol (existingTpe ), pid.pos)
354
- ctx.newCompletePackageSymbol(pkgOwner, (pid.name ++ " $termDup " ).toTermName).entered
351
+ val existingType = pkgOwner.info.decls.lookup(pid.name.toTypeName)
352
+ if (existingType.exists ) {
353
+ ctx.error(PkgDuplicateSymbol (existingType ), pid.pos)
354
+ ctx.newCompletePackageSymbol(pkgOwner, (pid.name ++ " $_error_ " ).toTermName).entered
355
355
}
356
356
else ctx.newCompletePackageSymbol(pkgOwner, pid.name.asTermName).entered
357
357
}
Original file line number Diff line number Diff line change 1
- trait T extends Array {
1
+ trait T extends Array { // error
2
2
def t1 (as : String * ): Array [String ] = { varargs1(as : _* ) } // error
3
3
def t2 (as : String * ): Array [String ] = { super .varargs1(as : _* ) } // error
4
4
}
You can’t perform that action at this time.
0 commit comments