fix required type analysis for foo { ... }