We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Typechecker does not recognize typed constants
(module A G (defcap G() true) (defschema point x:integer y:integer ) (defconst MY-POINT:object{point} {'x:5, 'y:2}) (defun get-point-x:integer () (at "x" MY-POINT)) ) (typecheck 'A)
gives
Unable to resolve type (TySchema {_tySchema = TyObject, _tySchemaType = TyVar {_tyVar = SchemaVar {_tvName = "at1_o"}}, _tySchemaPartial = FullSchema})
However if I modify slightly my code to use a function instead of a constant:
(module A G (defcap G() true) (defschema point x:integer y:integer ) (defun my-point:object{point} () {'x:5, 'y:2}) (defun get-point-x:integer () (at "x" (my-point))) ) (typecheck 'A)
Everything is OK, the typechecker is happy.
Since IMHO my code is 100% valid, I would expect the type-checker to pass.
The text was updated successfully, but these errors were encountered:
Thanks for the report! We'll take a look
Sorry, something went wrong.
No branches or pull requests
Issue description
Typechecker does not recognize typed constants
Steps to reproduce
gives
However if I modify slightly my code to use a function instead of a constant:
Everything is OK, the typechecker is happy.
Expected Behavior
Since IMHO my code is 100% valid, I would expect the type-checker to pass.
The text was updated successfully, but these errors were encountered: