Skip to content

Commit a662424

Browse files
authored
Merge pull request #2963 from dotty-staging/fix-#2949
Fix #2949: Change order of elaboration
2 parents 972f6d5 + 6390e9a commit a662424

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Namer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,9 +909,9 @@ class Namer { typer: Typer =>
909909
// the parent types are elaborated.
910910
index(constr)
911911
annotate(constr :: params)
912-
symbolOfTree(constr).ensureCompleted()
913912

914913
indexAndAnnotate(rest)(inClassContext(selfInfo))
914+
symbolOfTree(constr).ensureCompleted()
915915

916916
val parentTypes = ensureFirstIsClass(parents.map(checkedParentType(_)))
917917
val parentRefs = ctx.normalizeToClassRefs(parentTypes, cls, decls)

tests/pos/i2949.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Foo(a: Foo#A) {
2+
type A = Int
3+
}

0 commit comments

Comments
 (0)