bug
bug copied to clipboard
Scala 2 bug reports only. Please, no questions — proper bug reports only.
## reproduction steps using any version of Scala ```scala object SeqExtractor { def unapplySeq(x: Int): Some[List[Int]] = Some(List(1)) } 1 match { case SeqExtractor() => "zero" case SeqExtractor(_) => "one"...
## Reproduction steps Scala version: 2.13.8 ```scala scala> List() match { case Nil => ; case List(_) => } ^ warning: match may not be exhaustive. It would fail on...
This compiles and works in 2.11.8, does not compile in 2.12. ```scala trait Foo extends Any { val self: String } final class Bar(val self: String) extends AnyVal with Foo...
```scala class M(val t: Int) extends AnyVal { def lazyString = { object X () => X } } ``` ``` error: no-symbol does not have an owner while compiling:...
I came across this scalac bug while attempting js.Dynamic.literal(map.toSeq: _*) // Error: applyDynamic does not support passing a vararg parameter It turned out that any call to applyDynamic will bug...
Proposal: Add a compiler flag that makes it easier to know when an AnyVal allocation occurs. AnyVals can radically improve performance, but allocations can occur in surprising places (removing any...
## reproduction steps using Scala 2.13.4, example: ```scala case object Foo extends Product { override final val productPrefix = "Foo" } println(Foo) ``` ## problem Causes a runtime error in...
in 2.12.1 (and 2.11): ``` $ scala -Ywarn-unused cat: /release: No such file or directory Welcome to Scala 2.12.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_121). Type in expressions for...
There are some conditions where parameter captured by secondary constructors generate ambiguous bytecode. Such as in the following example where the default constructor receives an Int parameter and the secondary...
Illegal duplicate inheritance error not issued for ProductN (and other potential case class parents)
I noticed this loophole when perusing `fixDuplicateSyntheticParents` in `Typers`. ``` scala> trait T[A] defined trait T scala> abstract class C(i: Int) extends T[Int] with T[String] :8: error: illegal inheritance; self-type...