File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -2290,7 +2290,7 @@ class Typer extends Namer
22902290 var added : Tree = TypeTree (parent).withSpan(cdef.nameSpan.focus)
22912291 if psym.is(Trait ) && psym.primaryConstructor.info.takesImplicitParams then
22922292 // classes get a constructor separately using a different context
2293- added = ensureConstrCall(cls, added)
2293+ added = ensureConstrCall(cls, added)( using superCtx)
22942294 added :: parentTrees(parents1, ptrees)
22952295 case _ =>
22962296 ptrees
Original file line number Diff line number Diff line change 1+ 1
Original file line number Diff line number Diff line change 1+ trait A [T ]:
2+ def f : T
3+
4+ trait B [T : A ]:
5+ println(summon[A [T ]].f)
6+
7+ trait C [T : A ] extends B [T ]
8+
9+ given a1 : A [Int ] with
10+ def f = 1
11+
12+ class D extends C [Int ]:
13+ given a2 : A [Int ] with
14+ def f = 2
15+
16+ @ main def Test = D ()
17+
You can’t perform that action at this time.
0 commit comments