Skip to content

Fix #6054: Add missing dealias #6068

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/ast/tpd.scala
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {

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

/** new C(args), calling given constructor `constr` of C */
def New(tp: Type, constr: TermSymbol, args: List[Tree])(implicit ctx: Context): Apply = {
Expand Down
6 changes: 6 additions & 0 deletions tests/pos/i6054.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
trait i0 {
trait i1 extends Throwable { false }
}
//trait i0 {
// trait I1 extends Throwable { val I1 = () }
//}