@@ -786,7 +786,7 @@ A compile-time error occurs if a view _DV_ has two superviews `V1` and
786
786
` V2 ` , where both ` V1 ` and ` V2 ` has a member named _ m_ with distinct
787
787
declarations, and _ DV_ does not declare a member named _ m_ .
788
788
789
- * In other words, if two different declarations of _ m_ is inherited
789
+ * In other words, if two different declarations of _ m_ are inherited
790
790
from two superviews then the subview must resolve the conflict. The
791
791
so-called diamond inheritance pattern can create the case where two
792
792
superviews have an _ m_ , but they are both declared by the same
@@ -831,25 +831,38 @@ and `V2` are superviews of _DV_. Let `M1` be the members of `V1`, and
831
831
member name ` m ` such that ` V1 ` as well as ` V2 ` has a member named ` m ` ,
832
832
and they are distinct declarations, and _ DV_ does not declare a member
833
833
named ` m ` . * In other words, a name clash among distinct "inherited"
834
- members is an error, but it can be eliminated by overriding the
834
+ members is an error, but it can be eliminated by redeclaring the
835
835
clashing name.*
836
836
837
837
The effect of having a view declaration _ DV_ with superviews
838
838
` V1, .. Vk ` is that the members declared by _ DV_ as well as all
839
- members of ` V1, .. Vk ` that are not overridden by a declaration in
839
+ members of ` V1, .. Vk ` that are not redeclared by a declaration in
840
840
_ DV_ can be invoked on a receiver of the type introduced by _ DV_ .
841
841
842
842
In the body of _ DV_ , a superinvocation syntax similar to an explicit
843
843
extension method invocation can be used to invoke a member of a
844
- superview which is overridden : The invocation starts with ` super. `
844
+ superview which is redeclared : The invocation starts with ` super. `
845
845
followed by the name of the given superview, followed by the member
846
846
access. The superview may be omitted in the case where there is no
847
847
ambiguity.
848
848
849
- * For instance, ` super.V3.foo() ` can be used to call the ` foo ` of ` V3 `
850
- in the case where the extends clause has ` extends ... V3 hide foo, ... ` .
851
- If no other superview has a member with basename ` foo ` , it is
852
- also possible to call it using ` super.foo() ` .*
849
+ * For example:*
850
+
851
+ ``` dart
852
+ view class V2 {
853
+ void foo() { print('V2.foo()'); }
854
+ }
855
+
856
+ view class V3 {
857
+ void foo() { print('V2.foo()'); }
858
+ }
859
+
860
+ view class V1 implements V2, V3 {
861
+ void bar() {
862
+ super.V3.foo(); // Prints "V2.foo()".
863
+ }
864
+ }
865
+ ```
853
866
854
867
855
868
## Dynamic Semantics of Views
0 commit comments