You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Joint compilation works, separate compilation fails.
~/code/scratch/array: scalac -d out ArrayFactory.java ScalaArrayFactory.scala ~/code/scratch/array:
~/code/scratch/array: javac -d out ArrayFactory.java && scalac -d out -classpath out ScalaArrayFactory.scala
ScalaArrayFactory.scala:2:error: typemismatch;
found : Array[T]
required: Array[Twith java.lang.Object]
defcreate(count: Int) =Array.ofDim[T](count)
^
one error found
Scala compiler version 2.8.1.final--Copyright2002-2010, LAMP/EPFL
Same result (although with an expanded error message) result with a snapshot of 2.9 from a few weeks back.
~/code/scratch/array: scalac29 -version
Scala compiler version 2.9.0.r24423-b20110309020116 --Copyright2002-2011, LAMP/EPFL~/code/scratch/array: javac -d out ArrayFactory.java && scalac29 -d out -classpath out ScalaArrayFactory.scala
ScalaArrayFactory.scala:2:error: typemismatch;
found : Array[T]
required: Array[Twith java.lang.Object]
Note:T>:Twith java.lang.Object, but classArray is invariant in typeT.
You may wish to investigate a wildcard typesuch as `_ >: T with java.lang.Object`. (SLS3.2.10)
defcreate(count: Int) =Array.ofDim[T](count)
^
one error found
~/code/scratch/array: scalac29 -d out ArrayFactory.java ScalaArrayFactory.scala
~/code/scratch/array:
=== What is the expected behavior? ===
Consistent behaviour with joint and separate compilation.
=== What versions of the following are you using? ===
Scala: 2.8.1, 2.9.0-SNAPSHOT
The text was updated successfully, but these errors were encountered:
=== What steps will reproduce the problem? ===
Joint compilation works, separate compilation fails.
Same result (although with an expanded error message) result with a snapshot of 2.9 from a few weeks back.
=== What is the expected behavior? ===
Consistent behaviour with joint and separate compilation.
=== What versions of the following are you using? ===
The text was updated successfully, but these errors were encountered: