Skip to content

Commit 595c3f6

Browse files
committed
Make companion-module links in ClassfileParser
1 parent f2221d0 commit 595c3f6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/dotty/tools/dotc/core/pickling/ClassfileParser.scala

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ class ClassfileParser(
9292
if (c != classRoot.symbol) mismatchError(c)
9393
}
9494

95+
if(classRoot.symbol.id == 4812) {
96+
println("bar")
97+
}
98+
9599
addEnclosingTParams()
96100

97101
if (unpickleOrParseInnerClasses()) return
@@ -130,10 +134,12 @@ class ClassfileParser(
130134
for (i <- 0 until in.nextChar) parseMember(method = true)
131135
classInfo = parseAttributes(classRoot.symbol, classInfo)
132136
if (isAnnotation) addAnnotationConstructor(classInfo)
137+
133138
val companionClassMethod = ctx.synthesizeCompanionMethod(nme.COMPANION_CLASS_METHOD, classRoot, moduleRoot)
134139
if (companionClassMethod.exists) companionClassMethod.entered
135-
136-
140+
val companionModuleMethod = ctx.synthesizeCompanionMethod(nme.COMPANION_MODULE_METHOD, moduleRoot, classRoot)
141+
if (companionModuleMethod.exists) companionModuleMethod.entered
142+
137143
setClassInfo(classRoot, classInfo)
138144
setClassInfo(moduleRoot, staticInfo)
139145
}

0 commit comments

Comments
 (0)