mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
MethodReturnTypeFix: updated fix to change method return type based on return statements in method body (IDEA-216275)
GitOrigin-RevId: e97990950039123c8c41921a71342b8ed60afdee
This commit is contained in:
committed by
intellij-monorepo-bot
parent
52aa1ae553
commit
42d733a694
+2
-2
@@ -1,6 +1,6 @@
|
||||
class C {
|
||||
<error descr="Illegal type: 'void'">void</error>[] m1() { }
|
||||
<error descr="Illegal type: 'void'">void</error> m2()[] { }
|
||||
<error descr="Illegal type: 'void'">void</error>[] <error descr="Invalid return type">m1</error>() { }
|
||||
<error descr="Illegal type: 'void'">void</error> <error descr="Invalid return type">m2</error>()[] { }
|
||||
void m3(<error descr="Illegal type: 'void'">void</error> p) {}
|
||||
|
||||
{
|
||||
|
||||
+5
-5
@@ -6,7 +6,7 @@ interface ii {}
|
||||
|
||||
|
||||
|
||||
int f1() throws Exception {
|
||||
int <error descr="Invalid return type">f1</error>() throws Exception {
|
||||
<error descr="Missing return statement">}</error>
|
||||
|
||||
Object f2(int i) throws Exception {
|
||||
@@ -217,7 +217,7 @@ interface ii {}
|
||||
|
||||
|
||||
|
||||
int f1() throws Exception {
|
||||
int <error descr="Invalid return type">f1</error>() throws Exception {
|
||||
<error descr="Missing return statement">}</error>
|
||||
|
||||
Object f2(int i) throws Exception {
|
||||
@@ -421,7 +421,7 @@ interface ii {}
|
||||
|
||||
|
||||
|
||||
int f1() throws Exception {
|
||||
int <error descr="Invalid return type">f1</error>() throws Exception {
|
||||
<error descr="Missing return statement">}</error>
|
||||
|
||||
Object f2(int i) throws Exception {
|
||||
@@ -626,7 +626,7 @@ interface ii {}
|
||||
|
||||
|
||||
|
||||
int f1() throws Exception {
|
||||
int <error descr="Invalid return type">f1</error>() throws Exception {
|
||||
<error descr="Missing return statement">}</error>
|
||||
|
||||
Object f2(int i) throws Exception {
|
||||
@@ -829,7 +829,7 @@ interface ii {}
|
||||
|
||||
|
||||
|
||||
int f1() throws Exception {
|
||||
int <error descr="Invalid return type">f1</error>() throws Exception {
|
||||
<error descr="Missing return statement">}</error>
|
||||
|
||||
Object f2(int i) throws Exception {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
class s {
|
||||
void f() {
|
||||
void <error descr="Invalid return type">f</error>() {
|
||||
<error descr="Cannot return a value from a method with void result type">return 0;</error>
|
||||
}
|
||||
void f2() {
|
||||
return;
|
||||
}
|
||||
|
||||
int f3() {
|
||||
int <error descr="Invalid return type">f3</error>() {
|
||||
<error descr="Missing return value">return;</error>
|
||||
}
|
||||
int f4() {
|
||||
|
||||
Reference in New Issue
Block a user