﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1834	Name shadowing in match statements cause unintuitive type errors	adabe588@…	somebody	"Calling `Test.test()` gives the error message `Error: Invalid pattern: R() of type Integer` which is hard to see since `m` isn't present in the case where the error occurs. This should 1) produce a warning for name shadowing (see #1833), 2) Not cause a type error if shadowing is allowed since `m` is referenced outside the local variable definitions of the match statements.

{{{
package Test

uniontype U
  record R end R;
end U;

function f
  input U m;
algorithm
  _ := match m
    local Integer m;
    case R() then fail();
  end match;
end f;

function test
algorithm
  f(R());
end test;

end Test;
}}}"	defect	closed	high	1.9.0	Frontend	trunk	invalid		
