-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create some test cases for compile errors in decomp output
- Loading branch information
1 parent
3daf966
commit 7e639c3
Showing
7 changed files
with
233 additions
and
72 deletions.
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
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,50 @@ | ||
package pkg; | ||
|
||
public class TestGenericComparison { | ||
TestGenericComparison.Generic<?> generic = new TestGenericComparison.Generic(); | ||
|
||
void test() { | ||
if (this.dum((TestGenericComparison.Generic<boolean>)this.generic) != this.dum((TestGenericComparison.Generic<boolean>)this.generic)) {// 7 | ||
} | ||
}// 10 | ||
|
||
<T> T dum(TestGenericComparison.Generic<T> dum) { | ||
return null;// 13 | ||
} | ||
|
||
static class Generic<T> { | ||
} | ||
} | ||
|
||
class 'pkg/TestGenericComparison' { | ||
method 'test ()V' { | ||
0 6 | ||
1 6 | ||
2 6 | ||
3 6 | ||
4 6 | ||
5 6 | ||
6 6 | ||
7 6 | ||
8 6 | ||
9 6 | ||
a 6 | ||
b 6 | ||
c 6 | ||
d 6 | ||
e 6 | ||
f 6 | ||
10 6 | ||
13 8 | ||
} | ||
|
||
method 'dum (Lpkg/TestGenericComparison$Generic;)Ljava/lang/Object;' { | ||
0 11 | ||
1 11 | ||
} | ||
} | ||
|
||
Lines mapping: | ||
7 <-> 7 | ||
10 <-> 9 | ||
13 <-> 12 |
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
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,41 @@ | ||
package pkg; | ||
|
||
public class TestStaticBlockFinalField { | ||
static final String field; | ||
static final String dum = field.substring(1); | ||
|
||
static { | ||
String something = String.valueOf(1);// 9 | ||
field = something.length() + "dum";// 10 | ||
}// 12 | ||
} | ||
|
||
class 'pkg/TestStaticBlockFinalField' { | ||
method '<clinit> ()V' { | ||
0 7 | ||
1 7 | ||
2 7 | ||
3 7 | ||
4 7 | ||
c 8 | ||
d 8 | ||
e 8 | ||
f 8 | ||
13 8 | ||
14 8 | ||
18 8 | ||
19 8 | ||
1a 8 | ||
1b 8 | ||
1c 8 | ||
1d 8 | ||
28 9 | ||
} | ||
} | ||
|
||
Lines mapping: | ||
9 <-> 8 | ||
10 <-> 9 | ||
12 <-> 10 | ||
Not mapped: | ||
11 |
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
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,20 @@ | ||
package pkg; | ||
|
||
public class TestGenericComparison { | ||
Generic<?> generic = new Generic<>(); | ||
|
||
void test() { | ||
if (dum(generic) != dum(generic)) { | ||
|
||
} | ||
} | ||
|
||
<T> T dum(Generic<T> dum) { | ||
return null; | ||
} | ||
|
||
static class Generic<T> { | ||
|
||
} | ||
|
||
} |
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,13 @@ | ||
package pkg; | ||
|
||
public class TestStaticBlockFinalField { | ||
|
||
final static String field; | ||
final static String dum; | ||
|
||
static { | ||
String something = String.valueOf(1); | ||
field = something.length() + "dum"; | ||
dum = field.substring(1); | ||
} | ||
} |