@@ -723,7 +723,7 @@ _not_ eliminated by the existence of other declarations (of any kind) named
723
723
` _n ` in the same library.
724
724
725
725
Conversely, the existence of an extension type with a representation
726
- variable with a private name ` _n ` does not eliminate promotion of
726
+ variable with a private name ` _n ` does not eliminate promotion of
727
727
any private instance variables named ` _n ` of a class, mixin, enum, or mixin
728
728
class in the same library.
729
729
@@ -1133,9 +1133,6 @@ Assume that _DV_ is an extension type declaration named `Name`, and
1133
1133
` V1 ` occurs as one of the ` <type> ` s in the ` <interfaces> ` of _ DV_ . In
1134
1134
this case we say that ` V1 ` is a _ superinterface_ of _ DV_ .
1135
1135
1136
- If _ DV_ does not include an ` <interfaces> ` clause then _ DV_ has
1137
- ` Object? ` as a direct superinterface.
1138
-
1139
1136
A compile-time error occurs if ` V1 ` is a type name or a parameterized type
1140
1137
which occurs as a superinterface in an extension type declaration _ DV_ , and
1141
1138
` V1 ` denotes a non-extension type which is not a supertype of the
@@ -1299,7 +1296,12 @@ rather than from `Object`)*.
1299
1296
1300
1297
* This change is needed because some extension types are subtypes of
1301
1298
` Object? ` and not subtypes of ` Object ` , and they need to have a
1302
- well-defined depth.*
1299
+ well-defined depth. We could define the depth to be zero for ` Object ` , for
1300
+ ` Null ` , and for every extension type that has no ` implements ` clause, and
1301
+ insist that ` Object? ` isn't an interface type and doesn't have a depth, but
1302
+ in that case we no longer have a guarantee that the sets of superinterfaces
1303
+ with the same maximal depth that the Dart 1 least upper bound algorithm
1304
+ uses will have at least one singleton set.*
1303
1305
1304
1306
1305
1307
## Dynamic Semantics of Extension Types
@@ -1377,12 +1379,9 @@ relationships involving `V0`:*
1377
1379
- * ` V0 ` is a proper subtype of each of ` V1 .. Vk ` .*
1378
1380
- * Let ` R0 ` be the extension type erasure of ` V0 ` . At run time, the type
1379
1381
` V0 ` has the same representation and semantics as ` R0 ` . In particular,
1380
- ` o is V0 ` and ` o as V0 ` have the same dynamic semantics as ` o is R0 `
1381
- respectively ` o as R0 ` . ` t1 == t2 ` evaluates to true if ` t1 ` is a
1382
- ` Type ` that reifies ` V0 ` and ` t2 ` reifies ` R0 ` . Similarly, two types ` t1 `
1383
- and ` t2 ` are equal if they are structurally equal except that ` V0 ` occurs
1384
- in ` t1 ` and ` R0 ` occurs at the corresponding location in ` t2 `
1385
- (e.g., ` List<V0> ` is equal to ` List<R0> ` ).*
1382
+ they behave identically with respect to ` is ` , ` is! ` , ` as ` , and ` == ` ,
1383
+ both when ` V0 ` and ` R0 ` are used as types, and when they occur as
1384
+ subterms of another type.
1386
1385
1387
1386
1388
1387
## Discussion
0 commit comments