Use first match branch in case of type mismatch, not last
The comment says this was intentional, but I do agree with #4304 that it makes more sense the other way around (for if/else as well). Fixes #4304.
This commit is contained in:
@@ -937,7 +937,7 @@ fn main(foo: Foo) {
|
||||
51..107 'if tru... }': ()
|
||||
54..58 'true': bool
|
||||
59..67 '{ }': ()
|
||||
73..107 'if fal... }': ()
|
||||
73..107 'if fal... }': i32
|
||||
76..81 'false': bool
|
||||
82..107 '{ ... }': i32
|
||||
92..95 'foo': Foo
|
||||
|
||||
Reference in New Issue
Block a user