diff options
author | Simon Ochsenreither <simon@ochsenreither.de> | 2013-11-16 01:47:03 +0100 |
---|---|---|
committer | Simon Ochsenreither <simon@ochsenreither.de> | 2014-01-03 03:07:12 +0100 |
commit | 2e7c7347b9b89a2aac2f6abbea9f9f0815c18761 (patch) | |
tree | ac4526cdfe78f0c8b60e2ce9703a5078ff3b3d9b /test/files/run/t7974/Test.scala | |
parent | 5e1e472fa10145606fbe3ff2966c35e2842d3894 (diff) | |
download | scala-2e7c7347b9b89a2aac2f6abbea9f9f0815c18761.tar.gz scala-2e7c7347b9b89a2aac2f6abbea9f9f0815c18761.tar.bz2 scala-2e7c7347b9b89a2aac2f6abbea9f9f0815c18761.zip |
SI-7974 Clean up and test 'Symbol-handling code in CleanUp
Looks like the transformation did never happen because the pattern
failed to match. Why did the pattern fail to match? Because the
Symbol.apply we see in the tree claims to be a method while
Symbol_apply defined in Definitions wants to be a value.
This issue was caused because nonPrivateMember starts spitting out
overloaded symbols after erasure.
This issue has been fixed in the earlier commit, so what happens in
this commit is adding tests and fixing documentation.
Diffstat (limited to 'test/files/run/t7974/Test.scala')
-rw-r--r-- | test/files/run/t7974/Test.scala | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/files/run/t7974/Test.scala b/test/files/run/t7974/Test.scala new file mode 100644 index 0000000000..9403ea332b --- /dev/null +++ b/test/files/run/t7974/Test.scala @@ -0,0 +1,20 @@ +import java.io.PrintWriter; + +import scala.tools.partest.BytecodeTest +import scala.tools.asm.util._ +import scala.tools.nsc.util.stringFromWriter + +object Test extends BytecodeTest { + def show { + val classNode = loadClassNode("Symbols", skipDebugInfo = false) + val textifier = new Textifier + classNode.accept(new TraceClassVisitor(null, textifier, null)) + + val classString = stringFromWriter(w => textifier.print(w)) + val result = + classString.split('\n') + .dropWhile(elem => elem != "public class Symbols {") + .filterNot(elem => elem.startsWith(" @Lscala/reflect/ScalaSignature") || elem.startsWith(" ATTRIBUTE ScalaSig")) + result foreach println + } +} |