Inference is not something that will work at many nested levels in compilation. It is kind of a guess based on arguments supplied. I feel the compiler writers did not consider inferring logic along with named parameter. If you consider abstract syntax tree, Even though the logic is same, but both
F(()=>”xyz”)
And
F(f:()=>”xyz”)
Are different abstract syntax trees from compiler’s perspective.
I feel it’s just a rule missed by compiler designer where even the compiler itself is a program with huge set of rules. One rule matches first case but no rule matches second one. It may be conceptually right but compiler is just a program and all rules are human coded.
Ok, I guess as others have determined, its a bug and should be reported to Microsoft !!