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

Const Array Decl Bugs #25

Open
darko20 opened this issue Mar 24, 2018 · 0 comments
Open

Const Array Decl Bugs #25

darko20 opened this issue Mar 24, 2018 · 0 comments
Labels

Comments

@darko20
Copy link
Contributor

darko20 commented Mar 24, 2018

CONST A = ARRAY OF ARRAY OF INTEGER{ARRAY OF INTEGER{1}};

compiles but

CONST A = ARRAY OF ARRAY OF INTEGER{ARRAY OF INTEGER{}};

results in

***
*** runtime error:
***    <*ASSERT*> failed.
***    file "../src/exprs/ArrayExpr.m3", line 653
***

This may be the same or a related bug:

TYPE  R = RECORD a := 1 END;
CONST B = ARRAY OF R{R{}};
CONST C = B[0].a;  (* error: value is not constant *)

but

TYPE  R = RECORD a := 1 END;
CONST B = ARRAY OF R{R{1}};
CONST C = B[0].a;  (* no error *)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant