ExpectedTypesProvider and CreateLocalFromUsageFix updated for Java 12 (IDEA-204006)

This commit is contained in:
Tagir Valeev
2018-12-21 16:32:43 +07:00
parent 012fe62a55
commit 03e4f37774
8 changed files with 94 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
// "Create local variable 'foo'" "true"
class Foo {
String test(int i) {
return switch (i) {
default -> {
String foo;
break foo;
}
};
}
}

View File

@@ -0,0 +1,9 @@
// "Create local variable 'foo'" "true"
class Foo {
String test(int i) {
String foo;
return switch (i) {
default -> foo;
};
}
}

View File

@@ -0,0 +1,11 @@
// "Create local variable 'foo'" "true"
class Foo {
String test(int i) {
int foo;
return switch (foo) {
default -> {
break i;
}
};
}
}

View File

@@ -0,0 +1,10 @@
// "Create local variable 'foo'" "true"
class Foo {
String test(int i) {
return switch (i) {
default -> {
break fo<caret>o;
}
};
}
}

View File

@@ -0,0 +1,8 @@
// "Create local variable 'foo'" "true"
class Foo {
String test(int i) {
return switch (i) {
default -> fo<caret>o;
};
}
}

View File

@@ -0,0 +1,10 @@
// "Create local variable 'foo'" "true"
class Foo {
String test(int i) {
return switch (f<caret>oo) {
default -> {
break i;
}
};
}
}