bug
bug copied to clipboard
Scala 2 bug reports only. Please, no questions — proper bug reports only.
When using JavaConversions to convert from a java LinkedHashSet, the resulting Set is a scala mutable set. There is a scala version of LinkedHashSet, so I would've expected this to...
```scala import java.lang.reflect.Modifier object Foo { object Bar def main (args: Array[String]){ println(Modifier.isFinal(Foo.getClass.getModifiers)) println(Modifier.isFinal(Bar.getClass.getModifiers)) } } ``` The class generated for `Foo` is final, the one for `Bar` is not;...
I found some name clashes when upgrading Scala to 2.12.8 in Binding.scala, maybe due to https://github.com/retronym/scala/commit/e76420490300e036c7357afcd685ed0e856fd8e8 . ## Name clash due to placeholder This can be workaround by replacing `q"{...
## Reproduction steps 1. checkout https://github.com/KisaragiEffective/scala-match-on-huge-enum or https://github.com/KisaragiEffective/match-on-huge-enum-sealed-trait 2. just compile ## Problems ```scala sbt:match-on-huge-enum> compile [info] compiling 1 Scala source and 1 Java source to /private/tmp/scala-match-on-huge-enum/target/scala-2.13/classes ... [warn] /private/tmp/scala-match-on-huge-enum/src/main/scala/Hello.scala:5:5:...
The phase assembly, which is responsible for ensuring correct execution order of internal as well as user-defined compiler components, is severely broken. ### How to reproduce I have written a...
## Reproduction steps https://www.scala-lang.org/api/current/scala/collection/mutable/Buffer.html#padTo[B%3E:A](len:Int,elem:B):CC[B] ## Problem It's growable & shrinkable, but growing methods should call it growable. There is a ticket for nuanced CC vs C or something, so it...
Scala 2.13.12 Example: ```scala class Key[T] {} object example { private val Key: Key[java.lang.Boolean.TRUE.type] = new Key[java.lang.Boolean.TRUE.type] def putUserData[T](key: Key[T], value: T): Unit = ??? def main(args: Array[String]): Unit =...
## Reproduction steps Scala version: 2.13.12 ```scala import java.util.concurrent._ import scala.concurrent.{Await, ExecutionContext, Future} val threadPoolExecutor = new ThreadPoolExecutor(1, 1, 0, TimeUnit.SECONDS, new ArrayBlockingQueue(1)) val threadPool:ExecutionContext = ExecutionContext.fromExecutor(threadPoolExecutor, t => {...
Suggested in https://github.com/scala/scala/pull/7312#issuecomment-430893978 ```scala class C { def b = 0 def t = java.util.Collections.singletonList(try b catch { case _: ClassCastException => b }) } ``` The argument is lifted...
If we have this function ```scala def f(to: TraversableOnce[Char]) {} ``` and an optional string ```scala val optionalString = Some("Hello") ``` and try to pass the result of 'Option.getOrElse' to...