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

Fix: Do not merge union types in truthy filter #12752

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix spec
  • Loading branch information
straight-shoota committed Nov 18, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit aad17c326096bbd60619d8391a14d57cc9901136
4 changes: 2 additions & 2 deletions spec/compiler/semantic/if_spec.cr
Original file line number Diff line number Diff line change
@@ -255,8 +255,8 @@ describe "Semantic: if" do
end

a = Bar.new.as(Foo)
if a.as?(M)
a.m
if b = a.as?(M)
b.m
straight-shoota marked this conversation as resolved.
Show resolved Hide resolved
else
nil
end