Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
This is related to GROOVY-10079.
I have the following program
public class Main { public static void main(String[] args) { Character c = foo(); } public static char foo() { 'd' as char } }
Expected Behaviour
Compile successfully
Actual Behaviour
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: test.groovy: 3: [Static type checking] - Cannot assign value of type char to variable of type java.lang.Character @ line 3, column 21. Character c = foo(); ^1 error
Tested against master (https://github.com/apache/groovy/commit/2df019d3c93486e8a32d407d364913e7b65e1cba).
Attachments
Issue Links
- relates to
-
GROOVY-10359 STC misses type error when involving a variable with a char a declared type
- Closed