Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Range.clone-with-op / Fix bug on ops with subclasses of Range
Addresses R#1582 #1582 Addresses D#1798 Raku/doc#1798 Also fixes explosion when subclasses/mixedin Range objects were used with Range ops. Also fixes propagation of `infinite` attribute, tho I'm unsure if it's possible to produce a Range with that attribute different from original, using just the Range ops. Fix the above bugs by using public interface to create modified Range objects instead of poking into the guts. The choice for the ops to produce a subclass of Range if one was given as the source of the op is deliberate. While that's not the behaviour with, say, `(42 but False) + 42`, which produces a plain `Int`, with Range ops, there's always a single Range object involved, so we know for sure what type to produce.
- Loading branch information