-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change how we access the `TypeAbstraction` in a `Context` to avoid a `ClassCastException`. Fixes #1356
- Loading branch information
Showing
3 changed files
with
64 additions
and
2 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
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,19 @@ | ||
package simple; | ||
|
||
public class Example { | ||
private static int i = 0; | ||
|
||
public static void main(String[] args) { | ||
Object obj1 = new Object(); | ||
Object obj2 = "1"; | ||
Object obj3 = 1; | ||
if (i == 0) { | ||
obj1 = obj3; | ||
} else if (i == 1) { | ||
obj2 = obj3; | ||
} | ||
foo(obj1, obj2); | ||
} | ||
|
||
private static void foo(Object o1, Object o2) {} | ||
} |