You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Thodoris Sotiropoulos (Jira)" <ji...@apache.org> on 2021/11/10 13:18:00 UTC
[jira] [Created] (GROOVY-10359) STC misses type error when
involving a variable with a char a declared type
Thodoris Sotiropoulos created GROOVY-10359:
----------------------------------------------
Summary: STC misses type error when involving a variable with a char a declared type
Key: GROOVY-10359
URL: https://issues.apache.org/jira/browse/GROOVY-10359
Project: Groovy
Issue Type: Bug
Components: Static Type Checker
Reporter: Thodoris Sotiropoulos
I have the following program
{code:java}
class Test {
public static void main(String[] args) {
char f = (Integer) null;
}
}
{code}
h3. Actual behaviour
groovyc compiles this program
h3. Expected behaviour.
groovyc should have rejected this program with an error of the form:
{code}
error: incompatible types: Integer cannot be converted to char
{code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)