-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not skip classes with symbolic names in objects
We used to skip all classes whose bytecode name contains “$$” under the assumption that those would be names with synthetic components like “$$anonfun” but these names can also occur when a class name starting with a symbolic character is nested inside an object (e.g. “A$$less” is a class named “<“ inside an “object A”). Instead we need to look at the decoded names. They still contain synthetic components such as “$$anonfun” verbatim but no accidental “$$” sequences. Fixes #158.
- Loading branch information
Showing
4 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...-tests/src/test/removing-method-with-special-characters-from-inner-class-nok/problems.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
abstract method f()Int in class foo.A#B does not have a correspondent in new version | ||
abstract method f()Int in class foo.A#< does not have a correspondent in new version |
12 changes: 12 additions & 0 deletions
12
...al-tests/src/test/removing-method-with-special-characters-from-inner-class-nok/v1/A.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package foo | ||
|
||
// See https://github.com/typesafehub/migration-manager/issues/158 | ||
// `<` would be filtered out, therefore not reporting the missing method | ||
object A { | ||
abstract class < { | ||
def f: Int | ||
} | ||
abstract class B { | ||
def f: Int | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...al-tests/src/test/removing-method-with-special-characters-from-inner-class-nok/v2/A.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package foo | ||
|
||
object A { | ||
abstract class < | ||
abstract class B | ||
} |