Is there some FAQ exists especially for incremental compilation errors?
[error] /home/dpon/skala/src/frame/Frame.scala:23:36: type mismatch;
[error] found : String("\t")
[error] required: ?{def *(x$1: ? >: Int): ?}
[error] Note that implicit conversions are not applicable because they are ambiguous:
[error] both method wrapString in class LowPriorityImplicits of type (s: String)scala.collection.immutable.WrappedString
[error] and method augmentString in object Predef of type (x: String)scala.collection.immutable.StringOps
[error] are possible conversion functions from String("\t") to ?{def *(x$1: ? >: Int): ?}
[error] def pad(N: Int): String = "\n" + "\t" * N
[error] ^
[error] /home/dpon/skala/src/frame/Frame.scala:23:41: value * is not a member of String
[error] def pad(N: Int): String = "\n" + "\t" * N
[error] ^
[error] /home/dpon/skala/src/metaL/metaL.scala:5:22: class type required but AnyRef found
[error] object metaL extends App {
[error] ^
[error] /home/dpon/skala/src/metaL/metaL.scala:7:11: type mismatch;
[error] found : Array[String]
[error] required: ?{def mkString(x$1: ? >: String(" ")): ?}
[error] Note that implicit conversions are not applicable because they are ambiguous:
[error] both method genericWrapArray in class LowPriorityImplicits of type [T](xs: Array[T])scala.collection.mutable.WrappedArray[T]
[error] and method genericArrayOps in object Predef of type [T](xs: Array[T])scala.collection.mutable.ArrayOps[T]
[error] are possible conversion functions from Array[String] to ?{def mkString(x$1: ? >: String(" ")): ?}
[error] println(args.mkString(" "))
[error] ^
[error] /home/dpon/skala/src/metaL/metaL.scala:7:16: value mkString is not a member of Array[String]
[error] println(args.mkString(" "))
[error] ^
[error] 5 errors found
[error] (Compile / compileIncremental) Compilation failed
[error] Total time: 5 s, completed 06.05.2019 14:19:52
Error:scalac: Error while emitting Scala.scala
assertion failed:
Bad superClass for class Frame: <none>
while compiling: /home/dpon/skala/src/sc/Scala.scala
during phase: jvm
library version: version 2.12.7
compiler version: version 2.12.7
reconstructed args: -classpath /home/dpon/jdk1.8.0_162/jre/lib/charsets.jar:/home/dpon/jdk1.8.0_162/jre/lib/deploy.jar:/home/dpon/jdk1.8.0_162/jre/lib/ext/cldrdata.jar:/home/dpon/jdk1.8.0_162/jre/lib/ext/dnsns.jar:/home/dpon/jdk1.8.0_162/jre/lib/ext/jaccess.jar:/home/dpon/jdk1.8.0_162/jre/lib/ext/jfxrt.jar:/home/dpon/jdk1.8.0_162/jre/lib/ext/localedata.jar:/home/dpon/jdk1.8.0_162/jre/lib/ext/nashorn.jar:/home/dpon/jdk1.8.0_162/jre/lib/ext/sunec.jar:/home/dpon/jdk1.8.0_162/jre/lib/ext/sunjce_provider.jar:/home/dpon/jdk1.8.0_162/jre/lib/ext/sunpkcs11.jar:/home/dpon/jdk1.8.0_162/jre/lib/ext/zipfs.jar:/home/dpon/jdk1.8.0_162/jre/lib/javaws.jar:/home/dpon/jdk1.8.0_162/jre/lib/jce.jar:/home/dpon/jdk1.8.0_162/jre/lib/jfr.jar:/home/dpon/jdk1.8.0_162/jre/lib/jfxswt.jar:/home/dpon/jdk1.8.0_162/jre/lib/jsse.jar:/home/dpon/jdk1.8.0_162/jre/lib/management-agent.jar:/home/dpon/jdk1.8.0_162/jre/lib/plugin.jar:/home/dpon/jdk1.8.0_162/jre/lib/resources.jar:/home/dpon/jdk1.8.0_162/jre/lib/rt.jar:/home/dpon/skala/target/scala-2.12/classes:/home/dpon/.sbt/boot/scala-2.12.7/lib/scala-library.jar
last tree to typer: Literal(Constant(scala))
tree position: line 6 of /home/dpon/skala/src/sc/Scala.scala
tree tpe: String("scala")
symbol: null
call site: constructor sbt in object sbt in package sc
== Source file context for tree position ==
3 import frame.Lang
4
5 /** Scala programming langua element */
6 class Scala(T:String="scala",V:String) extends Lang(V="scala")
7
8 object sbt extends Scala("tool","sbt")
9
It looks like something wrong happens with String type and implicits defined somewhere.
I disabled all side libraries and reinstalled latest Scala from scratch, but the problem still exists.
If I remove /target
directory, all build goes ok, but every time I try to recompile changed .scala
file, I got this like errors.
If you’re using SBT then probably you’ll get better help on https://github.com/sbt/sbt/issues