This pull is identical to #1000. @WalterBright reverted #1000, because of the breaking of test case that he has, but I think it is genuinely invalid code (my comment).
fix Issue 8220 - invalid function call not detected during semantic a…
I agree with you. I have written code like Walter's example in the past, and I later rewrote it because I decided it was wrong. int + int isn't valid, and typeof(int + int) shouldn't be, either. It's easy enough to add .init to every type to turn those into valid expressions. It's not like it's a silent breakage.
But only Walter can merge this.
LGTM. @WalterBright please merge this before any more people start assuming that Type+Type is meaningful (6 months and counting!). AFAIK the specs never mention this as valid code, but you've said you told some people it does work. Couldn't you tell them about .init?
This pull introduced a regression: