dry-rb / dry-types

Flexible type system for Ruby with coercions and constraints
https://dry-rb.org/gems/dry-types
MIT License
854 stars 135 forks source link

Compiler#visit_implication, Compiler#visit_intersection and a couple of changes in specs #452

Open estum opened 1 year ago

estum commented 1 year ago

The 1st part of the PR adds missing visitor methods to Compiler and also adds examples for composite types to its spec.

And I also noticed in implication & intersection specs messing examples describing "#meta", probably were copy-pasted from sum_spec.rb and left as is. Sum#meta behaviour is defined explicitly and differs from the other composite types, so this PR fixes it.