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

variant + StructuralEquality + Ignore doesn't work #503

Closed
NN--- opened this issue May 17, 2013 · 1 comment
Closed

variant + StructuralEquality + Ignore doesn't work #503

NN--- opened this issue May 17, 2013 · 1 comment

Comments

@NN---
Copy link
Member

NN--- commented May 17, 2013

[StructuralEquality(Ignore = name)]
variant X
{
 | A { name : string; other : int; }
 | B
}

def a1 = X.A("abc", 1);
def a2 = X.A("abcd", 1);
assert(a1 == a2);

Compiler still generates comparison for name field.

@NN---
Copy link
Member Author

NN--- commented May 17, 2013

Some workaround putting [StructuralEquality] on each variant option.

NN--- added a commit that referenced this issue Aug 9, 2013
Add test case for #503
DO NOT MERGE.
The bug has not been solved !
@NN--- NN--- closed this as completed in 8b426b9 Aug 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant