Closed
Description
class Test {
def foo: List[1] = List(1)
}
When compiling with -Xverify-signatures
:
2 | def foo: List[1] = List(1)
| ^
|compiler bug: created invalid generic signature for method foo in Test
|signature: ()Lscala/collection/immutable/List<I>;
|if this is reproducible, please report bug at https://github.com/lampepfl/dotty/issues
List<I>
is incorrect since Java generics can only range over reference types, it should be List<Object>
, just like if the signature of foo
was List[Int]
.