Closed
Description
This compiles fine on 11.0.1
let dict = Dict.make()
dict->Dict.set("someKey", 1)
dict->Dict.set("someKey2", 2)
let asArray = dict->Dict.toArray
Console.log(asArray)
but from 11.1.0-rc.1 it yields
[E] Line 4, column 4:
This expression's type contains type variables that cannot be generalized:
array<(string, '_weak2)>
This happens when the type system senses there's a mutation/side-effect,
in combination with a polymorphic value.
Using or annotating that value usually solves it.