We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7fb91ad + c8bc92e commit cb3134aCopy full SHA for cb3134a
compiler/src/dotty/tools/dotc/ast/tpd.scala
@@ -435,7 +435,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
435
436
/** new C(args), calling the primary constructor of C */
437
def New(tp: Type, args: List[Tree])(implicit ctx: Context): Apply =
438
- New(tp, tp.typeSymbol.primaryConstructor.asTerm, args)
+ New(tp, tp.dealias.typeSymbol.primaryConstructor.asTerm, args)
439
440
/** new C(args), calling given constructor `constr` of C */
441
def New(tp: Type, constr: TermSymbol, args: List[Tree])(implicit ctx: Context): Apply = {
tests/pos/i6054.scala
@@ -0,0 +1,6 @@
1
+trait i0 {
2
+ trait i1 extends Throwable { false }
3
+}
4
+//trait i0 {
5
+// trait I1 extends Throwable { val I1 = () }
6
+//}
0 commit comments