Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad error position in BadNewArrayLength and SubNotIntError #12

Open
equation314 opened this issue Nov 4, 2019 · 0 comments
Open

Bad error position in BadNewArrayLength and SubNotIntError #12

equation314 opened this issue Nov 4, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@equation314
Copy link
Member

equation314 commented Nov 4, 2019

Input:

class Main {
    static void main() {
        int[][] test;
        int[] a = new int[test[10]];
        int[] b = new int[main()];
        main()[10] = 1;
    }
}

Output:

*** Error at (4,31): new array length must be an integer
*** Error at (5,31): new array length must be an integer
*** Error at (6,13): [] can only be applied to arrays

Should be:

*** Error at (4,27): new array length must be an integer
*** Error at (5,27): new array length must be an integer
*** Error at (6,15): [] can only be applied to arrays
@equation314 equation314 changed the title Bad error position in SubNotIntError Bad error position in BadNewArrayLength and SubNotIntError Nov 4, 2019
@Hoblovski Hoblovski added the bug Something isn't working label Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants