File tree 2 files changed +2
-9
lines changed
compiler/src/dotty/tools/dotc/reporting/diagnostic 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -2088,7 +2088,7 @@ object messages {
2088
2088
case Signature .ParamMatch => " \n Overloads with equal parameter types but different return types are not allowed."
2089
2089
case Signature .FullMatch => " \n The definitions have the same signature after erasure."
2090
2090
}
2091
- hl " ${decl.showLocated} is already defined as ${previousSymbol.showDcl} in line ${previousSymbol.pos.line}. " + details
2091
+ hl " ${decl.showLocated} is already defined as ${previousSymbol.showDcl} in line ${previousSymbol.pos.line + 1 }. " + details
2092
2092
}
2093
2093
val explanation = " "
2094
2094
}
Original file line number Diff line number Diff line change @@ -9,14 +9,7 @@ class Test1 {
9
9
10
10
11
11
class Test2 {
12
-
13
-
14
-
15
- def foo (
16
- x : List [A ]
17
- ): Function1 [A ,
18
- A ] =
19
- ???
12
+ def foo (x : List [A ]): Function1 [A , A ] = ???
20
13
def foo (x : List [B ]): Function1 [B , B ] = ??? // error: same jvm signature
21
14
// scalac calls this "have same type after erasure"
22
15
}
You can’t perform that action at this time.
0 commit comments