Dotty Documentation

0.5.0-bin-SNAPSHOT

Dropped: General Type Projection

Edit this page on GitHub

Scala so far allowed general type projection T#A where T is an arbitrary type and A names a type member of T.

Dotty disallows this if T is an abstract type (class types and type aliases are fine). This change was made because unrestricted type projection is unsound.

This restriction rules out the type-level encoding of a combinator calculus.

To rewrite code using type projections on abstract types, consider using path-dependent types or implicit parameters.