scala3
scala3 copied to clipboard
The Scala 3 compiler, also known as Dotty.
## Minimized code ```scala //> using options -Wunused:all def method[A](f: [g[_]] => Unit => g[A]) = () @main def main = method([g[_]] => (_: Unit) => null.asInstanceOf[g[Int]]) ``` ## Output...
## Compiler version 3.8.0-RC1 ## Minimized code ```Scala import scala.compiletime.constValue import scala.compiletime.ops.int.+ def foo(): Unit = Bits.withAddedBit(Bits.Some(Bit.I, Bits.None), Bit.I) sealed trait Bits object Bits: type None = None.type case object...
## Compiler version 3.7.4, 3.8.1-RC1-bin-20251125-ae54faa-NIGHTLY ## Minimized code ```scala import scala.deriving.Mirror import NamedTuple.NamedTuple object test { def f[N test.f[("a", "b"),(Int, String)] val res1: scala.deriving.Mirror.Product{ type MirroredMonoType = (a : Int,...
## Compiler version 3.8.0-RC1 ## This code compiles ```scala trait A: type B type Aux[T] = A { type B = T } type ExtractB[T b ``` ## This code...
This is the first step of supporting better error reporting for CC.
Warns on definitions named with embedded dollars, which ~should~ must be written in backquotes, if at all. Fixes #18234 Test from https://github.com/scala/scala3/pull/18563
This one takes a type argument instead of as a tree argument. This makes mapping such annotations a lot faster and also safer. In fact, in retrospect, most annotations could...
## Compiler version 3.8.0-RC2 ## Description Javadoc delimiter changed since JDK 11 - JDK 8 - `-` - e.g. https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#indexOf-java.lang.String-int- - JDK 11 or later - `(` , `,` and...
## Compiler version `3.8.0-RC1` `3.3.7` ## Minimized code `Foo.java` ``` public class Foo { public Foo(E i) {} } ``` `Test.scala` ``` object Test { val x1 = new Foo(1)...
## Compiler version 3.8.0-RC3, 3.7.4, 3.3.6 ## Minimized code ```scala //> using scala 3.8.0-RC3 class BlackboxImplicit[T] object BlackboxImplicit { implicit inline def materialize[A]: BlackboxImplicit[A] = new BlackboxImplicit[A] } class WhiteboxImplicit[T]...