jonsterling/Foam — Issue #26: Link identifiers with their in-scope declaration for type inference
Author: jonsterling
Created: 2012-01-12 01:36:05+00:00
State: open

Problem:

~~~~st
- booleanIdentity [
^ [:x{BOOL} | ^x.].
].
~~~~

The return type of that block is inferred as `id`, since we don't have any mechanism to link variables in a scope with their declared types at this point. Thus, the Objective-C method signature is incorrectly `- (id(^)(BOOL))booleanIdentity` rather than `- (BOOL(^)(BOOL))booleanIdentity`, which is what it should be.