Fixed scope resolution in pattern bindings
Type inference implementation