The default implementation of an interface must not over-specify generic paramaters #3279
This is a generalization of the issue raised in http://code.google.com/p/dart/issues/detail?id=472 - Underspecified Set<T> and Map<K,V> semantics
A silly example: it should be illegal for the default implementation of the Zoo interface (for managing any animal) be LionCage (where you can manage any animal you want, as long as it's a Lion).
Not only should issue #472 be fixed in the library, I'd argue the current implementation should be forbidden by the runtime.
The text was updated successfully, but these errors were encountered:
At this point, I realize enforcing such a rule in the tools might be impractical.
At a minimum, I would strongly argue for a best practice strongly discouraging the practice.
Flexibility is great, but it must be balanced with the principle of least surprise.
...I was VERY surprised. :-)
I love the quick replies to these issues. Blown away by the opennesses of the project. Cheers.