From b97d44b2d813c1bf482b23efb353e4550818700c Mon Sep 17 00:00:00 2001 From: Den Shabalin Date: Sun, 8 Dec 2013 20:18:56 +0100 Subject: SI-8047 change fresh name encoding to avoid owner corruption MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously a following encoding was used to represent fresh names that should be created at runtime of the quasiquote: build.withFreshTermName(prefix1) { name$1 => ... build.withFreshTermName(prefixN) { name$N => tree } ... } It turned out that this encoding causes symbol corruption when tree defines symbols of its own. After being spliced into anonymous functions, the owner chain of those symbols will become corrupted. Now a simpler and probably better performing alternative is used instead: { val name$1 = universe.build.freshTermName(prefix1) ... val name$N = universe.build.freshTermName(prefixN) tree } Here owner stays the same and doesn’t need any adjustment. --- test/files/run/t8047.check | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/files/run/t8047.check (limited to 'test/files/run/t8047.check') diff --git a/test/files/run/t8047.check b/test/files/run/t8047.check new file mode 100644 index 0000000000..a6b83a4a16 --- /dev/null +++ b/test/files/run/t8047.check @@ -0,0 +1,7 @@ +doWhile$1(){ + 1; + if (true) + doWhile$1() + else + () +} -- cgit v1.2.3