File tree 2 files changed +10
-1
lines changed
compiler/src/dotty/tools/dotc/parsing
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -3807,7 +3807,7 @@ object Parsers {
3807
3807
if ! (name.isEmpty && noParams) then acceptColon()
3808
3808
val parents =
3809
3809
if isSimpleLiteral then rejectWildcardType(annotType()) :: Nil
3810
- else constrApp() :: withConstrApps()
3810
+ else refinedTypeRest( constrApp() ) :: withConstrApps()
3811
3811
val parentsIsType = parents.length == 1 && parents.head.isType
3812
3812
if in.token == EQUALS && parentsIsType then
3813
3813
accept(EQUALS )
Original file line number Diff line number Diff line change
1
+ trait Bar { type Y }
2
+ trait Foo { type X }
3
+
4
+ class Test :
5
+ given a1 (using b : Bar ): Foo = new Foo { type X = b.Y }
6
+
7
+ given a2 (using b : Bar ): Foo { type X = b.Y } = new Foo { type X = b.Y }
8
+
9
+ given a3 (using b : Bar ): (Foo { type X = b.Y }) = new Foo { type X = b.Y }
You can’t perform that action at this time.
0 commit comments