-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Regression in Community Build: 2.13 std lib #5147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Here is a minimisation: import scala.collection.immutable
// Code below is to trick the compiler into thinking that we are
// compiling with the 2.13 standard library on the classpath.
package scala.collection {
class IterableOnce
}
package scala.runtime {
object ScalaRunTime {
abstract class ArraySeq[+A] extends immutable.Seq[A]
def genericWrapArray[T](xs: Array[T]): ArraySeq[T] = ???
def wrapRefArray[T <: AnyRef](xs: Array[T]): ArraySeq[T] = ???
def wrapIntArray(xs: Array[Int]): ArraySeq[Int] = ???
def wrapDoubleArray(xs: Array[Double]): ArraySeq[Double] = ???
def wrapLongArray(xs: Array[Long]): ArraySeq[Long] = ???
def wrapFloatArray(xs: Array[Float]): ArraySeq[Float] = ???
def wrapCharArray(xs: Array[Char]): ArraySeq[Char] = ???
def wrapByteArray(xs: Array[Byte]): ArraySeq[Byte] = ???
def wrapShortArray(xs: Array[Short]): ArraySeq[Short] = ???
def wrapBooleanArray(xs: Array[Boolean]): ArraySeq[Boolean] = ???
def wrapUnitArray(xs: Array[Unit]): ArraySeq[Unit] = ???
}
}
// Start of Test
class Test {
inline def foo = 1
def bar = foo
}
|
The issue is that when we compile the 2.13 std lib we are still loading classes from our classpath (i.e. classes from the dotty lib that are not part of the 2.13 std lib sources). These classes were compiled with a different version of the std lib which then breaks invariants in the compiler. For instance classes on the classpath were compiled with We fix this in the community build, by augmenting the 2.13 std lib with classes from the Dotty std lib. See dotty-staging/scala@f8eee12 |
cc/ @smarter |
For reference, the regression was introduced in #4964 because now the inliner loads a symbol from the Dotty lib: https://github.com/lampepfl/dotty/blob/19cdeb4e2cd9e5346a0758c1fa8570d733b8dd7d/compiler/src/dotty/tools/dotc/typer/Inliner.scala#L465 |
#4964 introduced a regression in the community build
The text was updated successfully, but these errors were encountered: