Crash when checking if a method overrides a nullary method
xeno-by opened this issue · 0 comments
xeno-by commented
trait B {
def m: Int
}
trait C extends B {
def m(x: Int): Int
}
trait D extends C {
def m: Int
}
Test.scala:10: error: def <_empty_/C#m().>(<_empty_/C#m().(x)>: <scala/Int#>): <scala/Int#>
DefnMethod(Mods(Nil), TermId("m"), Nil, List(List(Param(Mods(Nil), TermId("x"), Some(TptId("Int")), None))), Some(TptId("Int")), None)
def m: Int
^
rsc.util.CrashException: def <_empty_/C#m().>(<_empty_/C#m().(x)>: <scala/Int#>): <scala/Int#>
DefnMethod(Mods(Nil), TermId("m"), Nil, List(List(Param(Mods(Nil), TermId("x"), Some(TptId("Int")), None))), Some(TptId("Int")), None)
at rsc.util.CrashUtil$class.crash(CrashUtil.scala:10)
at rsc.util.package$.crash(package.scala:5)
at rsc.util.CrashUtil$class.crash(CrashUtil.scala:18)
at rsc.util.package$.crash(package.scala:5)
at rsc.semanticdb.Params$ParamOps.rsc$semanticdb$Params$ParamOps$$overridesNonNullary$1(Params.scala:35)
at rsc.semanticdb.Params$ParamOps$$anonfun$1.apply(Params.scala:58)
at rsc.semanticdb.Params$ParamOps$$anonfun$1.apply(Params.scala:58)
at scala.collection.LinearSeqOptimized$class.exists(LinearSeqOptimized.scala:93)
at scala.collection.immutable.List.exists(List.scala:84)
at rsc.semanticdb.Params$ParamOps.desugaredParamss(Params.scala:58)
at rsc.semanticdb.Defns$DefnOps.signature(Defns.scala:141)
at rsc.semanticdb.Defns$DefnOps.info(Defns.scala:26)
at rsc.semanticdb.Converter.toSymbolInformation(Converter.scala:33)
at rsc.semanticdb.Writer.writeInfo(Writer.scala:52)
at rsc.semanticdb.Writer.write(Writer.scala:37)
at rsc.Compiler.rsc$Compiler$$semanticdb(Compiler.scala:147)
at rsc.Compiler$$anonfun$phases$5.apply$mcV$sp(Compiler.scala:72)
at rsc.Compiler$$anonfun$run$2.apply(Compiler.scala:36)
at rsc.Compiler$$anonfun$run$2.apply(Compiler.scala:33)
at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:733)
at scala.collection.immutable.List.foreach(List.scala:392)
at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:732)
at rsc.Compiler.run(Compiler.scala:33)
at rsc.cli.Main$.process(Main.scala:35)
at rsc.cli.Main$.main(Main.scala:14)
at rsc.cli.Main.main(Main.scala)