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

Unsized array results in parse error. #464

Open
wrightwriter opened this issue Sep 29, 2024 · 0 comments
Open

Unsized array results in parse error. #464

wrightwriter opened this issue Sep 29, 2024 · 0 comments

Comments

@wrightwriter
Copy link

Repro:

    int[] letters = int[](
        99, 114, 105, 109, 115, 111, 110, 90, 118, 111, 105, 100
    );

Results in

System.AggregateException: One or more errors occurred. ---> System.Exception: Parse error: Error in src\shaders\abstract_post.frag: Ln: 160 Col: 11
    int[] letters = int[](
          ^
Expecting: infix operator, postfix operator, ',' or ';'

Traceback (most recent call last):
  File "minify_shaders.py", line 38, in <module>
    subprocess.run(full_command, shell=True, check=True)
  File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 512, in run
    output=stdout, stderr=stderr)

Fix:

    int[12] letters = int[](
        99, 114, 105, 109, 115, 111, 110, 90, 118, 111, 105, 100
    );

Version 1.4.0

@wrightwriter wrightwriter changed the title Unsized array Unsized array results in parse error. Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant