scala3
scala3 copied to clipboard
The Scala 3 compiler, also known as Dotty.
We need to make progress on the translation of context bounds. A context bound currently translates to an implicit evidence parameter, but it should be a using clause. The best...
This is the same logic that is used in the Scala.js compiler plugin for Scala 2. We catch ValDefs of the forms ```scala val SomeField = Value val SomeOtherField =...
## Compiler version 3.2.0-RC3 and earlier ## Minimized code Encoder.scala ```scala import scala.quoted._ import scala.deriving.Mirror trait Encoder[-A] trait PrimitiveEncoder[A] extends Encoder[A] given intOpt: PrimitiveEncoder[Option[Int]] with {} given primitiveNotNull[T](using e: Encoder[Option[T]]):...
## Compiler version `3.1.3-RC4` ## Minimized code ```Scala class Unit object unit extends Unit type Top = {*} Any type LazyVal[T] = {*} Unit -> T case class Foo[T](x: T)...
An example of a bidirectional TypeBounds is i15523: `[A, B >: A]`, as an ordering: `A : Nothing : A
- Do a prototype implementation of lazy vals along the lines of #6979. - Validate its correctness. - Benchmark its performance.
## Compiler version 3.0.0 - 3.2.0-RC1-bin-20220511-7c446ce-NIGHTLY ## Minimized code ```Scala trait DomainIdProvider[T] { type Id = List[T] } object Country extends DomainIdProvider[Country] case class Country( id: Country.Id, ) ``` ##...
I wanted to get some discussion going when we should merge cc-experiment into main. All user-visible changes of cc-experiment should be controlled by flag -Ycc, and all library additions should...
## Compiler version 3.1.3 / 3.2.0-RC1 ## Minimized code https://scastie.scala-lang.org/73ZtErR0QNGKc7VSiP4XEg ```Scala import scala.language.implicitConversions class Data //Model a data instance class HardType[T T) //Model a Data factory object HardType{ implicit def...
Fixes #15741 I tried for a while to make this work, but it is just too gnarly.