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

Cannot use $$ in &while on vector field #1964

Open
bbannier opened this issue Jan 25, 2025 · 0 comments
Open

Cannot use $$ in &while on vector field #1964

bbannier opened this issue Jan 25, 2025 · 0 comments
Labels
Bug Something isn't working Compiler

Comments

@bbannier
Copy link
Member

I would expect that explicitly naming the current field or using $$ would be equivalent, but it is not.

module foo;

type X = unit {
    a: Y(self)[] &while=(|self.a| < 4711);  # WORKS
    b: Y(self)[] &while=(|$$| < 4711);      # ERROR: unsupported operator: |<Y>|
};

type Y = unit(x: X) {
    : b"\x00";
};
@bbannier bbannier added Bug Something isn't working Compiler labels Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Compiler
Projects
None yet
Development

No branches or pull requests

1 participant