scala3
scala3 copied to clipboard
The Scala 3 compiler, also known as Dotty.
## Compiler version ```scala scalacOptions ++= Seq( "-deprecation", "-encoding", "UTF-8", "-feature", "-unchecked" ) scalaVersion := "3.2.0-RC1" libraryDependencies += "org.scastie" %% "runtime-scala" % "1.0.0-SNAPSHOT" addSbtPlugin("org.scastie" % "sbt-scastie" % "1.0.0-SNAPSHOT") ``` (`3.2.0-RC1`...
## Compiler version 3.1.2, 3.2.0-RC1-bin-20220527-001bfc3-NIGHTLY ## Minimized code ```Scala class A: def f(x: Int = 1): Int = x @main def run() = (new A{}).f() ``` ## Output (click arrow...
## Compiler version `3.2.0`, `3.2.2-RC1-bin-20220909-eaa2889-NIGHTLY` ## Minimized code ```Scala package repro // this needs to be in a separate file, if placed in the same file then everything works extension...
## Compiler version 3.1.3 RC1 with -Yexplicit-nulls ## Minimized example When reviewing #14032, I observed some pain points for explicit null checking that we might be able to fix. In...
resolves #14429 cc. @anatoliykmetyuk
## Compiler version 3.0.2 ## Minimized code and output (Sorry for not minimizing maximally, but I think it can be worth while to see a real use case...) ```Scala scala>...
https://dotty.epfl.ch/docs/reference/contextual/derivation.html The signature in the article, [here](https://dotty.epfl.ch/docs/reference/contextual/derivation.html#types-supporting-derives-clauses), differs significantly from the one in the library, [here](https://dotty.epfl.ch/api/scala/deriving/Mirror.html). Since the rest of the article is impacted by this, significant changes are needed.
Having definition: ```scala trait MyMarker enum MyEnum(val value: String): case Marked extends MyEnum("marked") with MyMarker ``` I got `Flags.EmptyFlags` instead of `Flags.Enum` in the following call for: `TypeRepr.of[Marked].typeSymbol.flags`
Regression reproduced based on the failure in [Open CB #4763](https://scala3.westeurope.cloudapp.azure.com/job/buildCommunityProject/4763/). Problem found in [playframework/anorm](https://github.com/playframework/anorm) ## Compiler version Fails in 3.2.1-RC1 Fails in 3.2.0 Works in 3.1.3 ## Minimized code ```Scala...
## Compiler version 3.2..0 ## Minimized code ```Scala package perspective.examples trait crash[ElemLabels > A def tabulateFoldLeft[B](start: B)(f: (B, Index) => B): B = ??? type TupleUnionLub[T