Skip to content

Fix invalid type inference on size compare in guards#15324

Open
lukaszsamson wants to merge 1 commit intoelixir-lang:mainfrom
lukaszsamson:ls-fix-guart-comp-infer
Open

Fix invalid type inference on size compare in guards#15324
lukaszsamson wants to merge 1 commit intoelixir-lang:mainfrom
lukaszsamson:ls-fix-guart-comp-infer

Conversation

@lukaszsamson
Copy link
Copy Markdown
Contributor

The PR is addressing invalid edge conditions on size comparisons in guards so equivalent mirrored expressions tuple_size(x) >= 2 and 2 <=tuple_size(x) typecheck correctly

The PR is not addressing

assert typecheck!([x], length(x) < 0, x) == dynamic(list(term()))

which I believe should be none type instead of list

Fixes #15323

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Invalid type inference from guard expression with <= operator

1 participant