rsdn/nemerle — Issue #145: Incorrect type inferrence when error ocured
Author: VladD2
Created: 2011-10-22 18:07:04+00:00
State: open
Labels: Bug, Compiler

{
| Foo
| Bar
}

module Program
{
Main() : void
{
def fn(val : Test)
{
match (val)
{
| Foo => fn(null)
| _ => val // E: can't cast Test to Test.Foo
}
}
_ = match (fn(null))
{
| Test.Foo => w; // Read error
| _ => "";
}
}
}