Skip to content

Commit 923173a

Browse files
committed
Fix exception
dotc -d out -Ycheck-init tests/pos/aliasNew.scala
1 parent 2a0f9de commit 923173a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/transform/init/Summarization.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ object Summarization {
8383
Summary.empty
8484

8585
case New(tpt) =>
86-
def typeRefOf(tp: Type): TypeRef = tp.typeConstructor match {
86+
def typeRefOf(tp: Type): TypeRef = tp.dealias.typeConstructor match {
8787
case tref: TypeRef => tref
8888
case hklambda: HKTypeLambda => typeRefOf(hklambda.resType)
8989
}

compiler/src/dotty/tools/dotc/transform/init/Util.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ object Util {
2424

2525
def resolve(cls: ClassSymbol, sym: Symbol)(implicit ctx: Context): Symbol =
2626
if (sym.isEffectivelyFinal || sym.isConstructor) sym
27-
else sym.matchingMember(cls.typeRef)
27+
else sym.matchingMember(cls.appliedRef)
2828

2929
def resolveSuper(cls: ClassSymbol, superCls: ClassSymbol, sym: Symbol)(implicit ctx: Context): Symbol = {
3030
// println(s"bases of $cls: " + cls.info.baseClasses)

0 commit comments

Comments
 (0)