let foo = try FormDataDecoder().decode(Foo.self, from: data, boundary: "12345")
this one doesn't
let foo = try FormDataDecoder().decode(Foo?.self, from: data, boundary: "12345")
Error:
caught error: "typeMismatch(MultipartKit.OrderedDictionary<Swift.String, MultipartKit.MultipartFormData>, Swift.DecodingError.Context(codingPath: [], debugDescription: "expected single value but encountered dictionary", underlyingError: nil))"
To Reproduce
You can adjust func testFormDataDecoderW3() to see this behaviour
Expected behavior
Content should be decoded no matter if type is Foo.self or Foo?.self
Describe the bug
This one works:
this one doesn't
Error:
To Reproduce
You can adjust
func testFormDataDecoderW3()
to see this behaviourExpected behavior
Content should be decoded no matter if type is Foo.self or Foo?.self
Environment
Tested od
mian
branch