summaryrefslogtreecommitdiff
path: root/test/debug/res
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2015-03-11 10:39:40 -0700
committerLukas Rytz <lukas.rytz@gmail.com>2015-03-11 15:18:23 -0700
commit2d88143f37144f3db5a1d1d27806518bea13ba47 (patch)
tree463fea2543fd12ac898b1c7d313b74543960327a /test/debug/res
parentf8731c5b17274d68de3469e34727e24a937ffc84 (diff)
downloadscala-2d88143f37144f3db5a1d1d27806518bea13ba47.tar.gz
scala-2d88143f37144f3db5a1d1d27806518bea13ba47.tar.bz2
scala-2d88143f37144f3db5a1d1d27806518bea13ba47.zip
Ensure to re-write only trait method calls of actual trait methods
The inliner would incorrectly treat trait field accessors like ordinary trait member methods and try to re-write invocations to the corresponding static method in the implementation class. This rewrite usually failed because no method was found in the impl class. However, for lazy val fields, there exists a member in the impl class with the same name, and the rewrite was performed. The result was that every field access would execute the lazy initializer instead of reading the field. This commit checks the traitMethodWithStaticImplementation field of the ScalaInlineInfo classfile attribute and puts an explicit `safeToRewrite` flag to each call site in the call graph. This cleans up the code in the inliner that deals with rewriting trait callsites.
Diffstat (limited to 'test/debug/res')
0 files changed, 0 insertions, 0 deletions