Skip to content

Commit af54229

Browse files
committed
Fix #2591: Incorrect documentation on general type projections
1 parent 25ec895 commit af54229

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

docs/docs/reference/dropped/type-projection.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ title: Dropped: General Type Projection
66
Scala so far allowed general type projection `T#A` where `T` is an arbitrary type
77
and `A` names a type member of `T`.
88

9-
Dotty allows this only if `T` is a class type. The change was made because
10-
unrestricted type projection is [unsound](https://github.com/lampepfl/dotty/issues/1050).
9+
Dotty disallows this if `T` is an abstract type (class types and type aliases
10+
are fine). This change was made because unrestricted type projection
11+
is [unsound](https://github.com/lampepfl/dotty/issues/1050).
1112

12-
The restriction rule out the [type-level encoding of compbinator
13-
calculus](https://michid.wordpress.com/2010/01/29/scala-type-level-encoding-of-the-ski-calculus/). It also rules out the previous encodings of type
14-
lambdas using structural types with projection as application. Type
15-
lambdas are now [directly supported](../type-lambdas.md) in Dotty.
13+
To rewrite code using type projections on abstract types, consider using
14+
path-dependent types or implicit parameters.

0 commit comments

Comments
 (0)