bug
bug copied to clipboard
Scala 2 bug reports only. Please, no questions — proper bug reports only.
## Questions are not bug reports This may be a queston? ## Reproduction steps Scala version: 2 & 3 ```scala scala> m.toString val res2: String = HashMap(5 -> 6, 1...
```scala scala> trait T defined trait T scala> class C extends T() defined class C scala> new T(){} res0: T = $anon$1@3ffa1b16 scala> class C extends AnyRef with T() :1:...
## reproduction steps Initially reported as https://github.com/scala-js/scala-js/issues/4454. See reproduction here: https://github.com/steinybot/bug-reports/tree/scalajs/non-existent-method using Scala 2.13.5 ```scala trait TwoTypeParam[X, Y] class OneTypeParam[X] extends TwoTypeParam[X, Any] trait Parent { type L = TwoTypeParam[_,...
(I'm consolidating related tickets: see also #1452, #1456, #1457, #1458, #6955, #6956) Terms: - "intlike type" is any of Int, Short, Byte, or Char. - "intlike" means an intlike literal...
## Reproduction steps ```scala println( new scala.util.Random().between(Double.MinValue, Double.MaxValue) ) // always prints: 1.7976931348623155E308 ``` See [this Scastie](https://scastie.scala-lang.org/quAav3JfRBKJl0ixPoeErw). ## Problem One would expect a truly, full spectrum random number from the...
The following code produces a `ClassCastException` at runtime: ```scala object Test extends App { sealed trait Node[+A] case class L[C,D](f: C => D) extends Node[C => D] def test[A,B](n: Node[A...
```scala scala> val x : ({ val y : T } forSome { type T }) = new { val y = 3 } x: AnyRef{def y: T} forSome {...
Example: ```scala trait Tc1[A] trait Tc2[A] trait Tc12[A] extends Tc1[A] with Tc2[A] trait Proxy[F[x]] object Proxy { implicit val proxy: Proxy[Tc12] = new Proxy[Tc12] {} } final case class X()...
```scala trait Arr[T] object Arr { def apply[T](xs: T): Arr[T] = null def apply(x: Long) : Arr[Long] = null } object I { implicit def arrToTrav[T] (a: Arr[T]) : Traversable[T]...
Given ``` sealed trait A[T] { def x: T } final case class B(x: String) extends A[String] final case class C(x: Int) extends A[Int] def f[T](a: A[T]): Unit = {...