File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
src/dotty/tools/dotc/transform Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ class LazyVals extends MiniPhaseTransform with SymTransformer {
27
27
28
28
29
29
def transformSym (d : SymDenotation )(implicit ctx : Context ): SymDenotation = {
30
- if (d is(Flags .Lazy , butNot = Flags .ModuleVal )) {
30
+ if (d is(Flags .Lazy , butNot = Flags .ModuleVal | Flags .Method )) {
31
+ // Method flag is set on lazy vals coming from Unpickler. They are already methods and shouldn't be transformed twice
31
32
d.copySymDenotation(
32
33
initFlags = d.flags | Flags .Method ,
33
34
info = ExprType (d.info))
Original file line number Diff line number Diff line change
1
+ package dotty .tools
2
+ package io
3
+
4
+ import java .io .{ InputStream }
5
+ import java .util .jar .JarEntry
6
+ import dotty .tools .dotc .core .Definitions
7
+ import language .postfixOps
8
+ import dotty .tools .dotc .core .Contexts ._
9
+
10
+
11
+ /** A test to trigger issue with separate compilation between Dotty and Scalac and lazy vals */
12
+ object Foo {
13
+ val definitions : Definitions = null
14
+ def defn = definitions
15
+ def go = defn.FunctionClass (0 )
16
+ }
You can’t perform that action at this time.
0 commit comments