Open chadselph opened 2 years ago
I guess the difference is that ->
is an extension method and to invoke it we have to type (1, 'a')
first without an expected type which widens 1: Int
. It doesn't sound like something that can be fixed.
Similar ticket with harmonization and extensions, and effort to document status quo.
Compiler version
3.1.0
Minimized code
Union types of singletons can't be used as keys to a Map.
technically I guess this is slightly shorter and also produces the error:
Output
Expectation
I expect to be able to use this type here. Note that all the following code does compile: