Open sstraust opened 1 month ago
I think you want an intersection type. A function union type can only be invoked if arguments are compatible with all types. A function intersection only requires one type.
(t/IFn
[com.mongodb.DB
(t/Value "eventplanner_tags")
(t/Map t/Any t/Any)
->
TagType]
[com.mongodb.DB
(t/Value "events2")
(t/Map t/Any t/Any)
->
EventType]))
Hi! I'm getting some behavior I can't make sense of: I defined the following type, which correctly passes type checking when I call it
but adding an additional type to the union causes this to fail:
Viewing the error message, it's giving:
so it looks like adding a second type to the union causes it to not find the first type??
I'm having trouble debugging this/figuring out what's going wrong here