2016-03-29 7 views
0

Ich kompiliere ein Projekt, das 77 Scala-Dateien mit Scala 2.10.5 hat.Scala-Compiler löst "internen" Typ Mismatch-Fehler ohne Fehler Fehlerort

bekam I 0 Warnung und 1 seltsame Fehlermeldung:

[ERROR] type mismatch; 
found : Array[?B] 
required: scala.collection.GenTraversableOnce[?] 
Note that implicit conversions are not applicable because they are ambiguous: 
both method booleanArrayOps in object Predef of type (xs: Array[Boolean])scala.collection.mutable.ArrayOps[Boolean] 
and method byteArrayOps in object Predef of type (xs: Array[Byte])scala.collection.mutable.ArrayOps[Byte] 
are possible conversion functions from Array[?B] to scala.collection.GenTraversableOnce[?] 
[ERROR] one error found 
[INFO] ------------------ ....{this line is irrelevant} 

Die Fehlerinformation zeigt nicht den Ort des Fehlers, so denke ich, das ein scalac interner Fehler ist. Was sollte ich tun, um es zu debuggen?

Vielen Dank für jede Hilfe.

UPDATES: enabled ich Debugging-Modus und sehen den vollständigen Stack-Trace:

Caused by: Compilation failed 
     at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:105) 
     at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:48) 
     at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41) 
     at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply$mcV$sp(AggressiveCompile.scala:99) 
     at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:99) 
     at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:99) 
     at sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(AggressiveCompile.scala:166) 
     at sbt.compiler.AggressiveCompile$$anonfun$3.compileScala$1(AggressiveCompile.scala:98) 
     at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:143) 
     at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:87) 
     at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:39) 
     at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:37) 
     at sbt.inc.IncrementalCommon.cycle(Incremental.scala:99) 
     at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:38) 
     at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:37) 
     at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:65) 
     at sbt.inc.Incremental$.compile(Incremental.scala:37) 
     at sbt.inc.IncrementalCompile$.apply(Compile.scala:27) 
     at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:157) 
     at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:71) 
     at com.typesafe.zinc.Compiler.compile(Compiler.scala:184) 
     at com.typesafe.zinc.Compiler.compile(Compiler.scala:164) 
     at sbt_inc.SbtIncrementalCompiler.compile(SbtIncrementalCompiler.java:92) 
     at scala_maven.ScalaCompilerSupport.incrementalCompile(ScalaCompilerSupport.java:303) 
     at scala_maven.ScalaCompilerSupport.compile(ScalaCompilerSupport.java:119) 
     at scala_maven.ScalaCompilerSupport.doExecute(ScalaCompilerSupport.java:99) 
     at scala_maven.ScalaMojoSupport.execute(ScalaMojoSupport.java:482) 
     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) 
     ... 21 more 

Ist das hilfreich, um das Problem zu identifizieren?

+0

es einfach zu beheben das Problem macht es nicht „scalac interne Fehler“, es ist ein Fehler in Ihrem Code. Sie müssen sich die Quelle ansehen, um herauszufinden, was damit nicht stimmt. – Dima

+0

Die Nachricht des Compilers scheint mir ziemlich einfach zu sein - Ihr Array muss in 'scala.collection.GenTraversableOnce' konvertiert werden, aber es gibt zwei solche impliziten Konvertierungen, die im Bereich verfügbar sind, so dass der Compiler den zu verwendenden Compiler nicht auflösen kann. Kann nicht weiter helfen, ohne den eigentlichen Code zu betrachten. – slouc

Antwort

1

OK ich eine Lösung gefunden:

scalac 2.10.5 auf Ausdruck die Zeilennummer des Fehlers eine Panne hatte, die in der Tat ist ein Syntaxfehler in meinem Code.

Als ich eingeschaltet 2.11.7 die Zeilennummer scalac wird ausgedruckt, die

Verwandte Themen