This line causes a compile error:
astgen.typeError.foreach(System.err.println)
typeError is a scala.collection.immutable.List of Strings in the object astgen.
The error I’m getting is:
error: ambiguous reference to overloaded definition,
both method println in class PrintStream of type (java.lang.String)Unit
and method println in class PrintStream of type (Array[Char])Unit
match expected type (Nothing) => Unit
astgen.typeError.foreach(System.err.println)
I’m new to Scala and don’t understand the problem. Using 2.7.7final.
Even not being able to exactly reproduce the problem, I do know you can solve the ambiguity by specifying the type:
In this example the
_:Stringis unnecessary, it maybe necessary in your use case.