title: How to print a list of strings to standard error in Scala?
body: <p>This line causes a compile error:</p>
  
  <pre><code>astgen.typeError.foreach(System.err.println)
  </code></pre>
  
  <p>typeError is a scala.collection.immutable.List of Strings in the object astgen.</p>
  
  <p>The error I'm getting is:</p>
  
  <pre><code>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) =&gt; Unit
        astgen.typeError.foreach(System.err.println)
  </code></pre>
  
  <p>I'm new to Scala and don't understand the problem. Using  2.7.7final.</p>