bug icon indicating copy to clipboard operation
bug copied to clipboard

Scala 2 bug reports only. Please, no questions — proper bug reports only.

Results 409 bug issues
Sort by recently updated
recently updated
newest added

The attached sample code compiles fine in Scala 2.11.7 and Scala 2.10.3 (Scala 2.9.3 warns that "TestMain.scala:9: error: scrutinee is incompatible with pattern type") - even with `-unchecked -deprecation -feature...

patmat

## Reproduction steps ```scala scala 2.13.7> 42 val res0: Int = 42 scala 2.13.7> 42 // print 42 // : Int(42) ``` ## Problem ```scala scala 2.13.6> 42 val res0:...

repl

Scala does not have any way of placing annotations on a package. In Java, package annotations are placed before the `package` statement in a Java source file named `package-info.java`. The...

annotations
language spec
enhancement

## reproduction steps ```scala ➜ ~ scala -Xjline:vi Welcome to Scala 2.13.8 (OpenJDK 64-Bit Server VM, Java 17.0.2). Type in expressions for evaluation. Or try :help. scala> Exception in thread...

repl

This fails to type check (2.13.8) -- Scala 3.1.1 (correctly, IMO) accepts it: ``` object Tst { type F[+A]

lub
typer

## reproduction steps using Scala `2.13.8` and `2.13.9-bin-f11f1f7`, When performing a typelevel algorithm the compile time performance varies wildly depending on any aliases present. Below is a cut down implementation...

typer
dealias

## reproduction steps using Scala (2.13.7), ```scala object lib { trait Tx[+A] { type J[+T] B): J[B] } trait TxBuilder { self => type J[+T] val BTx: lib.TxBuilder type TTx[+T]...

compiler crash
typer
fixed in Scala 3

Toolbox can't compile code if it has package declaration. Next code produces an AssertionError error: ``` import scala.tools.reflect.ToolBox import scala.reflect.runtime.currentMirror val tb = ToolBox(currentMirror).mkToolBox() val parsed = tb.parse("package A {...

help wanted
reflection

## reproduction steps ```scala Welcome to Scala 2.13.8 (OpenJDK 64-Bit Server VM, Java 17.0.1). Type in expressions for evaluation. Or try :help. scala> scala> (new Array[Unit](5))(0) == () // Detected...

repl

## reproduction steps Issue raised at https://discord.com/channels/632150470000902164/632628489719382036/916066258649243659 `LinearSeqOps` got some help https://github.com/scala/scala/commit/cc53ceeb6f17fd9606e09d04b0d4b41a36348e90 ## problem This is a performance regression with respect to 2.12. @scala/collections

library:collections