2 changes (non-linear-pattern-error and local type declaration)

non-linear-pattern-error : changed the slot name.
local type declaration: improvement. helps the compiler to assume its type.