@@ -1443,6 +1443,7 @@ class VariableDeclaration extends Statement implements Annotatable {
14431443 bool isFinal = false ,
14441444 bool isConst = false ,
14451445 bool isInitializingFormal = false ,
1446+ bool isSuperInitializingFormal = false ,
14461447 bool isCovariantByDeclaration = false ,
14471448 bool isLate = false ,
14481449 bool isRequired = false ,
@@ -1458,6 +1459,7 @@ class VariableDeclaration extends Statement implements Annotatable {
14581459 this .isFinal = isFinal;
14591460 this .isConst = isConst;
14601461 this .isInitializingFormal = isInitializingFormal;
1462+ this .isSuperInitializingFormal = isSuperInitializingFormal;
14611463 this .isCovariantByDeclaration = isCovariantByDeclaration;
14621464 this .isLate = isLate;
14631465 this .isRequired = isRequired;
@@ -1476,6 +1478,7 @@ class VariableDeclaration extends Statement implements Annotatable {
14761478 {bool isFinal = true ,
14771479 bool isConst = false ,
14781480 bool isInitializingFormal = false ,
1481+ bool isSuperInitializingFormal = false ,
14791482 bool isLate = false ,
14801483 bool isRequired = false ,
14811484 bool isLowered = false ,
@@ -1484,6 +1487,7 @@ class VariableDeclaration extends Statement implements Annotatable {
14841487 this .isFinal = isFinal;
14851488 this .isConst = isConst;
14861489 this .isInitializingFormal = isInitializingFormal;
1490+ this .isSuperInitializingFormal = isSuperInitializingFormal;
14871491 this .isLate = isLate;
14881492 this .isRequired = isRequired;
14891493 this .isLowered = isLowered;
@@ -1515,6 +1519,7 @@ class VariableDeclaration extends Statement implements Annotatable {
15151519 static const int FlagSynthesized = 1 << 9 ;
15161520 static const int FlagHoisted = 1 << 10 ;
15171521 static const int FlagWildcard = 1 << 11 ;
1522+ static const int FlagSuperInitializingFormal = 1 << 12 ;
15181523
15191524 bool get isFinal => flags & FlagFinal != 0 ;
15201525 bool get isConst => flags & FlagConst != 0 ;
@@ -1527,6 +1532,12 @@ class VariableDeclaration extends Statement implements Annotatable {
15271532 @informative
15281533 bool get isInitializingFormal => flags & FlagInitializingFormal != 0 ;
15291534
1535+ /// Whether the variable is declared as a super initializing formal parameter
1536+ /// of a constructor.
1537+ @informative
1538+ bool get isSuperInitializingFormal =>
1539+ flags & FlagSuperInitializingFormal != 0 ;
1540+
15301541 /// If this [VariableDeclaration] is a parameter of a method, indicates
15311542 /// whether the method implementation needs to contain a runtime type check to
15321543 /// deal with generic covariance.
@@ -1619,6 +1630,13 @@ class VariableDeclaration extends Statement implements Annotatable {
16191630 : (flags & ~ FlagInitializingFormal );
16201631 }
16211632
1633+ @informative
1634+ void set isSuperInitializingFormal (bool value) {
1635+ flags = value
1636+ ? (flags | FlagSuperInitializingFormal )
1637+ : (flags & ~ FlagSuperInitializingFormal );
1638+ }
1639+
16221640 void set isCovariantByClass (bool value) {
16231641 flags = value
16241642 ? (flags | FlagCovariantByClass )
0 commit comments