github scala/scala3 3.0.0-M2

latest releases: 3.4.2-RC1, 3.4.1, 3.4.1-RC2...
3 years ago

Notable Changes

Platform

  • The standard library was upgraded to Scala 2.13.4, JDK 14 and 15 are now supported. (#10392)

Syntax

  • The @infix annotation was replaced by an infix modifier, the @mixin annotation was replaced by transparent (#10458)
  • The @alpha annotation was renamed to @targetName and can now be used to define overloads that would normally result in a double definition error (#10149)
  • Drop extension_ prefix for extension methods (#10128)
  • The Eql typeclass has been renamed CanEqual (#10449)

Reflection

Breaking changes

  • QuoteContext has been renamed Quotes (#10432)
  • Instead of importing qctx.tasty._, import quotes.reflect._ (#10442)
    • In general, scala.quoted.qctx was replaced with scala.quoted.quotes
  • rootPosition is now Position.ofMacroExpansion (#10467)
  • expr.unseal is now Term.of(expr)
  • term.seal.cast[T] is now term.asExprOf[T]
  • term.seal is now term.asExpr
  • (tpe: Type[T]).unseal.tpe was replaced with TypeRepr.of[T]
  • (tpe: Type[T]).unseal was replaced with TypeTree.of[T]
  • (tpe: Type[T]).show was replaced with Type.show[T]
  • scala.quoted.Type does not need to be named (implicitly only)
  • (typeRepr: TypeRepr).seal is now (typeRepr: TypeRepr).asType
  • Owners are now explicit in the reflection API (#10406)
  • compiletime.code has been replaced with compiletime.codeOf (#10313)
  • The syntax for type variables in quoted patterns has changed (#10125)
  • Added quotes.reflect.Flags.{Opaque, Open}
  • Added constructors for quotes.reflect.{TypeBoundsTree, WildcardTypeTree}
  • Renamed quotes.reflect.{GivenMatch => SummonFrom}
  • Renamed quotes.reflect.{Projection => TypeProjection}
  • Changed constructor and extractor of quotes.reflect.Lambda
  • Removed quotes.reflect.Context and replaced with explicit Symbol owners
    • In methods of TreeMap, TreeAccumulator and TreeTraverser
    • In ValDef.let formerly let
    • In Lambda.apply
    • In etaExpand
    • Added Tree.changeOwner and Symbol.spliceOwner
  • Removed scala.tasty.Reflection (now it is inside Quotes)
  • Reflection API uses TypeTests instead of ClassTags

Additions

  • new API: TypeTest for safe type tests at runtime (#7555)

Scala.js

  • Upgrade to Scala.js 1.3.1 (#10423)
  • Implement the -scalajs-mapSourceURI option (#10439)
  • Implement JS exports (#10164)
  • Scala.js is now 100% supported

Scala3doc

Don't miss a new scala3 release

NewReleases is sending notifications on new releases.