-
-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Let Array and Hash be smarter about parameterizing subclasses
First of all, if re-parameterizing a previously parameterized type fall back to the firs non-mixin parent in MRO. This would make `class A is Array[Int] {}; say A[Str:D];` produce an `A[Str:D]`, not `Array[Int][Str:D]` as it used to be. `Array[Int].^parameterize(Str:D)` would also become `Array[Str:D]`. Note that methods defined in `Array::Types`, `Hash::Object`, and `Hash::Typed` roles would still override subclass' methods. I.e. it is not possible for the class `A` above to override method `new` or `BIND-POS` because `Array::Typed` has them. A dev must take special care if they want their own versions of these.
- Loading branch information
Showing
5 changed files
with
17 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters