···309309 end
310310311311 # Matches if the given type is *not* matched.
312312- def _Not(type)
313313- case type
314314- when NotType
315315- type.type
312312+ def _Not(*types)
313313+ if types.length > 1
314314+ NotType.new(
315315+ _Union(*types)
316316+ )
316317 else
317317- NotType.new(type)
318318+ type = types[0]
319319+320320+ case type
321321+ when NotType
322322+ type.type
323323+ else
324324+ NotType.new(type)
325325+ end
318326 end
319327 end
320328