Skip to content

Widening type conversion throws runtime exception in some cases #90

@kjw142857

Description

@kjw142857

Consider the following code:

public class Main {
    public static void main(String[] args) {
        int y = 0;
        double z = y;
        System.out.println("0");
    }
}

This is a legitimate Java program, but running it in the live and local versions of SA both yield a Runtime Exception message:

Exception in thread "Thread-0" 
java.lang.RuntimeException

This behaviour seems to be confined to int to double conversion, as replacing "double" with "float" solves the problem. More testing needed to determine if there are any other buggy cases.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions