-
Notifications
You must be signed in to change notification settings - Fork 35
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
Operator new
not properly parsed in &convert
#1598
Labels
Comments
rsmmr
added a commit
that referenced
this issue
Jun 7, 2024
So far we allowed some more generic expressions as well, but it's hard for the parser to support arbitrary expressions here due to parsing ambiguities, leaving things inconsistent. So we now limit it to what was pretty much the intent originally anyways. Note that the error message for #1598 stays the same: it's not great, but seems good enough. However, we now actually disallow the workaround shown in the ticket as well for consistency. The work-around is shown in the changes to `hilti.codegen.type-info`. Closes #1598.
rsmmr
added a commit
that referenced
this issue
Jun 13, 2024
* origin/topic/robin/gh-1598-new-expr: Enforce that the argument `new` is either a type or a ctor.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would like to turn a data behind a unit field into a reference, e.g., to avoid copying when passing that field on. This works if I introduced a helper function.
I however cannot seem to avoid the function, e.g.,
The only way I could make this syntax was to use a literal there which is not what I intend.
Looking at the parser, it looks like
$$
might not be a scoped expression here,spicy/spicy/toolchain/src/compiler/parser/parser.yy
Lines 977 to 979 in 817c2ed
The text was updated successfully, but these errors were encountered: