RFR: 8262368: wrong verifier message for bogus return type [v2]

Coleen Phillimore coleenp at openjdk.java.net
Wed Mar 3 02:50:54 UTC 2021


On Tue, 2 Mar 2021 05:38:31 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Harold Seigel has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   changed error message text
>
> You fixed the wrong one.
> 
> Cheers,
> David

Let's use javac to help us with the error message:
$ more X.java
class X {
void foo() { return obj; }
int bar() { return; }
}
$ javac X.java
X.java:2: error: incompatible types: unexpected return value
void foo() { return obj; } <===  This is line 3152
                    ^
X.java:3: error: incompatible types: missing return value
int bar() { return; }       <=== This is line 1678
            ^
2 errors

-------------

PR: https://git.openjdk.java.net/jdk/pull/2757


More information about the hotspot-runtime-dev mailing list