File tree 1 file changed +5
-7
lines changed
compiler/src/dotty/tools/dotc/core/classfile
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -50,11 +50,6 @@ object ClassfileParser {
50
50
mapOver(tp)
51
51
}
52
52
}
53
-
54
- def withReader [T ](classfile : AbstractFile )(op : DataReader ?=> T )(using Context ): T =
55
- ctx.base.reusableDataReader.using { reader =>
56
- op(using reader.reset(classfile))
57
- }
58
53
}
59
54
60
55
class ClassfileParser (
@@ -86,11 +81,14 @@ class ClassfileParser(
86
81
private def mismatchError (className : SimpleName ) =
87
82
throw new IOException (s " class file ' ${classfile.canonicalPath}' has location not matching its contents: contains class $className" )
88
83
89
- def run ()(using Context ): Option [Embedded ] = try withReader(classfile) { (using in) =>
84
+ def run ()(using Context ): Option [Embedded ] = try ctx.base.reusableDataReader.using { reader =>
85
+ implicit val reader2 = reader.reset(classfile)
90
86
report.debuglog(" [class] >> " + classRoot.fullName)
91
87
parseHeader()
92
88
this .pool = new ConstantPool
93
- parseClass()
89
+ val res = parseClass()
90
+ this .pool = null
91
+ res
94
92
}
95
93
catch {
96
94
case e : RuntimeException =>
You can’t perform that action at this time.
0 commit comments