Skip to content

Commit 1c7c738

Browse files
committed
Ensure more things are completed
As noticed by @smarter we need to ensure that classes owning derived type params are completed, so that trees get the proper symbol attachments. This triggered when I changed annotation transformers - I have no idea whether how two could be related, though.
1 parent fb959f7 commit 1c7c738

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/dotty/tools/dotc/ast/Desugar.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ object desugar {
4646
*/
4747
override def ensureCompletions(implicit ctx: Context) =
4848
if (!(ctx.owner is Package))
49-
if (ctx.owner is ModuleClass) ctx.owner.linkedClass.ensureCompleted()
49+
if (ctx.owner.isClass) {
50+
ctx.owner.ensureCompleted()
51+
if (ctx.owner is ModuleClass)
52+
ctx.owner.linkedClass.ensureCompleted()
53+
}
5054
else ensureCompletions(ctx.outer)
5155

5256
/** Return info of original symbol, where all references to siblings of the

0 commit comments

Comments
 (0)