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

Distinct entry point types are generated for types that differ only in names of size arguments #2080

Closed
athas opened this issue Jan 9, 2024 · 0 comments

Comments

@athas
Copy link
Member

athas commented Jan 9, 2024

-- ==
-- entry: bar
-- script input { foo 10 }

type bools [n] = #foo [n]bool

entry foo (n: i64) : {x:[n]bool,y:bool} = {x=replicate n true,y=false}
entry bar [m] (b: {x:[m]bool,y:bool}) : bool = b.y

This fails with:

Entry point: bar; dataset: foo 10i32:
Expected value of type: {x: [m]bool, y: bool}
But got value of type:  {x: [n]bool, y: bool}

We have some code that sanitises sizes when constructing opaque entry point types, but clearly it is incomplete.

@athas athas closed this as completed in bd490f7 Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant