-
-
Notifications
You must be signed in to change notification settings - Fork 415
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
Assertion failure with annotations #1751
Comments
Yep, this assert was introduced in #1649, but the weird behaviour of the annotation being assigned a type may have existed before the assert was present. Is there any legitimate reason for an annotation node to get a type assigned to it? I think not, but just wanted to confirm with you. |
I don't think there is. I tried to look where the annotation was getting a type assigned to it but I couldn't find the location. |
Fixes #1751, a compiler assertion error related to this system.
Minimal example:
Using annotations on an expression results in an assertion failure:
src/libponyc/ast/ast.c:737: setannotation: Assertion `!hasparent(annotation) && (annotation->annotation_type == NULL)` failed.
Backtrace:
It looks like the annotation node gets a type assigned to it. It doesn't happen when annotating a type declaration, only when annotating an expression.
According to
git bisect
, this bug was introduced inf788bb9
.The text was updated successfully, but these errors were encountered: