From 75251f76001d3c781b0630c2061603ebb250a787 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Thu, 30 May 2013 09:26:46 +0200 Subject: SI-7532 Fix regression in Java inner classfile reader 395e90a modified the detection of top-level classes in ClassfileParser in two ways: 1. used `Name#containsChar` rather than `toString.indexOf ...` (good!) 2. decoded the name before doing this check (bad!) That code is actually only run for non-Scala classfiles, whose names don't need decoding. Attempting to do so converted `R$attr` to `R@tr`, which no longer contains a '$', and was wrongly treated as a top level class. This commit reverts the use of `decodedName`, and inlines the method to its only call site for clarity. --- test/files/pos/t7532b/A_1.scala | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/files/pos/t7532b/A_1.scala (limited to 'test/files/pos/t7532b/A_1.scala') diff --git a/test/files/pos/t7532b/A_1.scala b/test/files/pos/t7532b/A_1.scala new file mode 100644 index 0000000000..e8f9540609 --- /dev/null +++ b/test/files/pos/t7532b/A_1.scala @@ -0,0 +1,7 @@ +package pack +class R { + class attr // Will have the bytecode name `R$attr`, not to be confused with `R@tr`! + class `@` +} + +class `@` \ No newline at end of file -- cgit v1.2.3