It seems that the compiler tries to make the RHS an `Int?` and
therefore infers the type of the initial value `0` and the
accumulating value `$0` as `Int?`.

That is in some sense correct, since the dictionary subscript setter
takes an optional as parameter, in this case `Int?`.

However, the code compiles (and runs as expected) if the trailing
closure syntax is used:

dict[0] = array.reduce(0) { $0 + $1 } // (B)

and also if the initial value is given as `0` instead of `Int(0)`:

dict[0] = array.reduce(Int(0), { $0 + $1 }) // (C)

My questions are:
- Should (A) compile?
- Why does it make a difference if the trailing closure syntax is used
(A vs. B)?
- Why does it make a difference if the initial value is given as `0`
or `Int(0)` (A vs. C)?

It seems that the compiler tries to make the RHS an `Int?` and
therefore infers the type of the initial value `0` and the
accumulating value `$0` as `Int?`.

That is in some sense correct, since the dictionary subscript setter
takes an optional as parameter, in this case `Int?`.

However, the code compiles (and runs as expected) if the trailing
closure syntax is used:

dict[0] = array.reduce(0) { $0 + $1 } // (B)

and also if the initial value is given as `0` instead of `Int(0)`:

dict[0] = array.reduce(Int(0), { $0 + $1 }) // (C)

My questions are:
- Should (A) compile?
- Why does it make a difference if the trailing closure syntax is used
(A vs. B)?
- Why does it make a difference if the initial value is given as `0`
or `Int(0)` (A vs. C)?

It seems that the compiler tries to make the RHS an `Int?` and
therefore infers the type of the initial value `0` and the
accumulating value `$0` as `Int?`.

That is in some sense correct, since the dictionary subscript setter
takes an optional as parameter, in this case `Int?`.

However, the code compiles (and runs as expected) if the trailing
closure syntax is used:

dict[0] = array.reduce(0) { $0 + $1 } // (B)

and also if the initial value is given as `0` instead of `Int(0)`:

dict[0] = array.reduce(Int(0), { $0 + $1 }) // (C)

My questions are:
- Should (A) compile?
- Why does it make a difference if the trailing closure syntax is used
(A vs. B)?
- Why does it make a difference if the initial value is given as `0`
or `Int(0)` (A vs. C)?

It seems that the compiler tries to make the RHS an `Int?` and
therefore infers the type of the initial value `0` and the
accumulating value `$0` as `Int?`.

That is in some sense correct, since the dictionary subscript setter
takes an optional as parameter, in this case `Int?`.

However, the code compiles (and runs as expected) if the trailing
closure syntax is used:

dict[0] = array.reduce(0) { $0 + $1 } // (B)

and also if the initial value is given as `0` instead of `Int(0)`:

dict[0] = array.reduce(Int(0), { $0 + $1 }) // (C)

My questions are:
- Should (A) compile?
- Why does it make a difference if the trailing closure syntax is used
(A vs. B)?
- Why does it make a difference if the initial value is given as `0`
or `Int(0)` (A vs. C)?