scala3
scala3 copied to clipboard
The Scala 3 compiler, also known as Dotty.
## Compiler version 3.1.3 ## Minimized code example.scala: ```scala package izumi.reflect.dottyreflection @main def main = { object X { type Alias = String opaque type Opaque = String type Bound
We define an `inline given` type class instance, which may end up with calling `scala.compiletime.error` at some point. Things work as expected if the `error` is not called when: -...
If we remove `inline` from `def check` then the code compiles. ## Compiler version v3.2.0-RC2 ## Minimized code https://scastie.scala-lang.org/vb2kekoaSO6lBZzwIQl8fw ```Scala import compiletime.ops.* class Inlined[T](val value : T) object Inlined: trait...
## Compiler version 3.2.0-RC3 ## Minimized code ```Scala @main def a(b: Int): Unit = { assert(b == 1) } ``` The `assert` function is part of the Scala 3 library...
## Compiler version 3.2.0-RC3 0c4c967c815e90c0e2a5849d336c181cac1b5131 ## Minimized code ```scala extension (c: Int) def tap[U](f: Int => U): Int = ??? def foo: Int = 42 // no crash if foo...
The dotty website https://dotty.epfl.ch currently contains several pages that were relevant when Dotty was not yet Scala 3.0.0, especially the section [Usage](https://dotty.epfl.ch/docs/usage), which is now largely covered by the [Getting...
## Compiler version Scala compiler version 3.1.3 -- Copyright 2002-2022, LAMP/EPFL ## Minimized code ```Scala class A(val f: () => Int) { def mA(p: Int = 0): Int = p...
Fixes https://github.com/lampepfl/dotty-feature-requests/issues/301
[Safer exceptions](https://infoscience.epfl.ch/record/290885) uses [capabilities](https://dotty.epfl.ch/docs/reference/experimental/canthrow.html) to express possible throws of checked exceptions. It is currently not completely safe since the capability to throw an exception can escape the scope where it...
## Compiler version Scala 3.2.0 RC-2 and RC-1 ## Minimized code https://scastie.scala-lang.org/W2mz3ejSTOOIOkuUzHC6Tg ```scala //> using scala "3.2.0-RC2" //> using platform "scala-js" import scala.scalajs.js sealed trait Foo[T] given Foo[Int] with {}...