scala3
scala3 copied to clipboard
The Scala 3 compiler, also known as Dotty.
(from today's Scala 3 compiler spree) Use name from tree when it is a NameTree for the ReassignmentToVal error message Fixes #22671
This crash is dependent on various things that only when applied together trigger it (probably by affecting compilation order). I did not find a way to minimize it further. My...
The `@NotNull` and `@NonNullable` type annotations are currently used by explicit nulls to not nullify (or add flexible type to) a reference type from Java signatures. In addition to these...
Scala Tooling Spree progress Draft PR. //cc @KacperFKorban Fixes #22761 This is a draft because the test-case does not reproduce the error mentioned in the issue without the changes in...
## Compiler version nightly 3.7.2-RC1-bin-20250519-d36e423-NIGHTLY-git-d36e423 ## Minimized code ```scala import language.experimental.captureChecking import caps.* case class Box[T](x: T) class A: def getBox: Box[this.type] = Box(this) def leak(io: AnyRef^): A = class...
The code below displays the type parameter `[Res] =>> TypeAl[F, String, Res]` for the `toFunctorOps` implicit conversion. ```scala import cats.Functor import cats.syntax.all.* type Result[F[_], Err, Res] = F[Either[Err, Res]] def...
## Compiler version 3.7.0 ## Minimized code Compilation of the following effectively does not terminate: `macros9.scala` ```scala import scala.quoted.* def goImpl(using Quotes): Expr[Int] = List.empty[Type[?]] match case Nil => Expr(0)...
## Compiler version 3.7.0 ## Minimized code ```scala //> using scala 3.7.0 @main def main(): Unit = BigInt(1) match case 1 => println("matched") case _ => println("didn't match") ``` ##...
### Problem Let's consider the following example: ```scala class MyAnnotation(x: Int) extends scala.annotation.StaticAnnotation def Test = val x = val y = 1 "hello": String @MyAnnotation(y) ``` And fully print...