mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
inline: insert cast to avoid changes in resolve (IDEA-152837; IDEA-155045)
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
|
||||
class Cat {}
|
||||
class DomesticCat extends Cat {}
|
||||
|
||||
class Test {
|
||||
public static void main(String[] args) {
|
||||
Cat c<caret>at = new DomesticCat();
|
||||
petCat(cat);
|
||||
}
|
||||
|
||||
static void petCat(Cat cat) {
|
||||
System.out.println("A Cat");
|
||||
}
|
||||
|
||||
static void petCat(DomesticCat domesticCat) {
|
||||
System.out.println("A DomesticCat");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user