test.scala:7 error: something is wrong (wrong class file?): class List with type parameters [a] gets applie\
d to arguments ()
if (xs.isEmpty) m.unit else xs.head
^
Exception in thread "main" java.lang.Error: head of empty list
at scala.Predef$.error(Predef.scala:155)
at scala.Nil$.head(List.scala:1062)
at scala.Nil$.head(List.scala:1060)
at scala.tools.nsc.symtab.Types$SubstMap.subst$0(Types.scala:1276)
at scala.tools.nsc.symtab.Types$SubstMap.apply(Types.scala:1280)
at scala.tools.nsc.symtab.Types$SubstMap.apply(Types.scala:1265)
at scala.List$.loop$0(List.scala:232)
at scala.List$.mapConserve(List.scala:249)
at scala.tools.nsc.symtab.Types$TypeMap.mapOver(Types.scala:1144)
at scala.tools.nsc.symtab.Types$SubstMap.apply(Types.scala:1287)
at scala.tools.nsc.symtab.Types$Type.subst(Types.scala:208)
[...]
|