typedef S = {a:Int, ?b:Int}; class Main { static function f1(a:S):Void {} static function f2(a:T):Void {} static function main() { f1({a: 1}); // works f2({a: 1}); // Constraint check failure: { a : Int } should be { ?b : Null, a : Int } f2(({a: 1} : S)); // works } }