Closed mausch closed 10 years ago
For some reason, when defining the 'instance' for Dictionary<string, 'a>
the F# compiler tries to unify 'a
and Dictionary<string, 'a>
so it doesn't compile.
When wrapping Dictionary (e.g. type JDictionary<'TKey, 'TValue> = JDictionary of Dictionary<'TKey, 'TValue>
) it works fine, so this looks like a compiler bug.
When given a trivial, incorrect definition:
type FromJSONClass with
static member inline FromJSON (_: Dictionary<string, 'a>) =
function
| JObject o as jobj ->
Success (Dictionary<string, 'a>())
| a -> failparse "Map" a
it breaks all other inline instances, only leaving the primitive ones in effect. So for example string list
doesn't work, listing only byte
, int
, etc as available instances.
Map in 98189e37121f3da5472d72a46b8063b1b52618f0