mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Test for IDEA-229317 (already fixed in 58cc2013cd628)
GitOrigin-RevId: 51537605f5bbe48ec885412753924f9ad07e7113
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4935b387da
commit
2001b7bfb3
@@ -0,0 +1,26 @@
|
||||
class Bar {
|
||||
int method(boolean b) {
|
||||
if (b) {
|
||||
return methodTrue();
|
||||
}
|
||||
|
||||
return methodFalse();
|
||||
}
|
||||
|
||||
int methodTrue() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
int methodFalse() {
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
|
||||
class Foo {
|
||||
// IDEA-229317
|
||||
void method() {
|
||||
System.out.println(new Bar().<caret>method(true));
|
||||
System.out.println(new Bar().method(false));
|
||||
System.out.println(new Bar().method(Math.random() > 0.5));
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
class Bar {
|
||||
|
||||
int methodTrue() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
int methodFalse() {
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
|
||||
class Foo {
|
||||
// IDEA-229317
|
||||
void method() {
|
||||
Bar bar2 = new Bar();
|
||||
|
||||
System.out.println(bar2.methodTrue());
|
||||
Bar bar1 = new Bar();
|
||||
|
||||
System.out.println(bar1.methodFalse());
|
||||
int result;
|
||||
Bar bar = new Bar();
|
||||
if (Math.random() > 0.5) {
|
||||
result = bar.methodTrue();
|
||||
} else {
|
||||
result = bar.methodFalse();
|
||||
}
|
||||
|
||||
System.out.println(result);
|
||||
}
|
||||
}
|
||||
@@ -550,6 +550,10 @@ public class InlineMethodTest extends LightRefactoringTestCase {
|
||||
public void testIgnoreReturnValue() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testSingleReturnComplexQualifier() {
|
||||
doTestAssertBadReturn();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Sdk getProjectJDK() {
|
||||
|
||||
Reference in New Issue
Block a user