Skip to content

Commit cb3134a

Browse files
authored
Merge pull request #6068 from dotty-staging/fix-fuzzing
Fix #6054: Add missing dealias
2 parents 7fb91ad + c8bc92e commit cb3134a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

compiler/src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
435435

436436
/** new C(args), calling the primary constructor of C */
437437
def New(tp: Type, args: List[Tree])(implicit ctx: Context): Apply =
438-
New(tp, tp.typeSymbol.primaryConstructor.asTerm, args)
438+
New(tp, tp.dealias.typeSymbol.primaryConstructor.asTerm, args)
439439

440440
/** new C(args), calling given constructor `constr` of C */
441441
def New(tp: Type, constr: TermSymbol, args: List[Tree])(implicit ctx: Context): Apply = {

tests/pos/i6054.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)