File tree 1 file changed +8
-6
lines changed
docs/docs/reference/dropped
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,12 @@ title: Dropped: General Type Projection
6
6
Scala so far allowed general type projection ` T#A ` where ` T ` is an arbitrary type
7
7
and ` A ` names a type member of ` T ` .
8
8
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 ) .
11
12
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
+ This restriction rules out the [ type-level encoding of a combinator
14
+ calculus] ( https://michid.wordpress.com/2010/01/29/scala-type-level-encoding-of-the-ski-calculus/ ) .
15
+
16
+ To rewrite code using type projections on abstract types, consider using
17
+ path-dependent types or implicit parameters.
You can’t perform that action at this time.
0 commit comments