Commit a2be3dd
committed
Get .tasty files from the correct jar
1. If we don't give a parent to the URLClassLoader constructor, it will use
the system ClassLoader by default, which includes the jars in the JVM classpath.
2. `getResourceAsStream` will first look for the resource in a parent
ClassLoader.
3. The reference compiler is in the JVM classpath.
So if the reference compiler is Dotty-compiled, we might pick up .tasty
files from it instead of the current compiler. Using `null` as the
parent ClassLoader avoids this problem.1 parent 8e29d38 commit a2be3dd
File tree
1 file changed
+1
-1
lines changed- compiler/src/dotty/tools/dotc/core/classfile
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
804 | 804 | | |
805 | 805 | | |
806 | 806 | | |
807 | | - | |
| 807 | + | |
808 | 808 | | |
809 | 809 | | |
810 | 810 | | |
| |||
0 commit comments