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

Transitive SAWScript type synonyms don't work #1985

Closed
qsctr opened this issue Nov 18, 2023 · 0 comments · Fixed by #1986
Closed

Transitive SAWScript type synonyms don't work #1985

qsctr opened this issue Nov 18, 2023 · 0 comments · Fixed by #1986
Assignees
Labels

Comments

@qsctr
Copy link
Contributor

qsctr commented Nov 18, 2023

typedef Foo = Int;
typedef Bar = Foo;
let thing : Bar = 2;

fails with

[08:50:00.917] Loading file "/home/bretton/Documents/github/formal-verso/test.saw"
[08:50:00.918] /home/bretton/Documents/github/formal-verso/test.saw:3:5-3:20: Type Mismatch, expected: Foo but got: Int
 at "thing" (/home/bretton/Documents/github/formal-verso/test.saw:3:5-3:10)
Type mismatch. Expected: Foo but got: Int at "thing" (/home/bretton/Documents/github/formal-verso/test.saw:3:5-3:10)

This problem occurs as long as Bar contains Foo in it (e.g. as part of a larger tuple or record), not just if it is equal to Foo.

@qsctr qsctr added the bug label Nov 18, 2023
@qsctr qsctr self-assigned this Nov 18, 2023
qsctr added a commit that referenced this issue Nov 18, 2023
@mergify mergify bot closed this as completed in #1986 Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant