Version 2.12.0-16.0.dev
Merge commit '332ce760558233294898ab34916483ee523402ec' into 'dev'
diff --git a/pkg/_fe_analyzer_shared/lib/src/flow_analysis/flow_analysis.dart b/pkg/_fe_analyzer_shared/lib/src/flow_analysis/flow_analysis.dart
index f809b87..e7603a2 100644
--- a/pkg/_fe_analyzer_shared/lib/src/flow_analysis/flow_analysis.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/flow_analysis/flow_analysis.dart
@@ -389,16 +389,7 @@
void doStatement_end(Expression condition);
/// Call this method just after visiting a binary `==` or `!=` expression.
- ///
- /// Return value indicates whether flow analysis believes that a successful
- /// equality check is reachable. If `false` is returned, the client should
- /// ensure that the `==` test behaves like `x == y && throw ...`.
- ///
- /// Note that if `notEqual` is `true`, then the return value describes the
- /// behavior of the underlying `==` test. So if `notEqual` is `true` and
- /// `false` is returned, the client should ensure that the `!=` test behaves
- /// like `!(x == y && throw ...)`.
- bool equalityOp_end(Expression wholeExpression, Expression rightOperand,
+ void equalityOp_end(Expression wholeExpression, Expression rightOperand,
Type rightOperandType,
{bool notEqual = false});
@@ -531,12 +522,7 @@
/// Call this method after visiting the LHS of an if-null expression ("??")
/// or if-null assignment ("??=").
- ///
- /// Return value indicates whether flow analysis believes that the right hand
- /// side is reachable. If `false` is returned, the client should ensure that
- /// `x ?? y` behaves like `x ?? throw ...` (or, correspondingly, that
- /// `x ??= y` behaves like `x ??= throw ...`).
- bool ifNullExpression_rightBegin(
+ void ifNullExpression_rightBegin(
Expression leftHandSide, Type leftHandSideType);
/// Call this method before visiting the condition part of an if statement.
@@ -578,16 +564,7 @@
/// be the expression to which the "is" check was applied. [isNot] should be
/// a boolean indicating whether this is an "is" or an "is!" expression.
/// [type] should be the type being checked.
- ///
- /// Return value indicates whether flow analysis believes that a failure of
- /// the `is` test is reachable. If `false` is returned, the client should
- /// ensure that the `is` test behaves like `x is T || throw ...`.
- ///
- /// Note that if `isNot` is `true`, then the return value describes the
- /// behavior of the underlying `if` test. So if `isNot` is `true` and `false`
- /// is returned, the client should ensure that the `is!` test behaves like
- /// `!(x is T || throw ...)`.
- bool isExpression_end(
+ void isExpression_end(
Expression isExpression, Expression subExpression, bool isNot, Type type);
/// Return whether the [variable] is definitely unassigned in the current
@@ -653,13 +630,7 @@
/// code being analyzed is `x?.y?.z(x)`, [nullAwareAccess_rightBegin] should
/// be called once upon reaching each `?.`, but [nullAwareAccess_end] should
/// not be called until after processing the method call to `z(x)`.
- ///
- /// Return value indicates whether flow analysis believes that a null target
- /// is reachable. If `false` is returned, the client should ensure that
- /// `x?.y` behaves like `x!.y`. (Note that this is necessary even if `y`
- /// exists on `Object`--see
- /// https://github.com/dart-lang/language/issues/1143#issuecomment-682096575.)
- bool nullAwareAccess_rightBegin(Expression target, Type targetType);
+ void nullAwareAccess_rightBegin(Expression target, Type targetType);
/// Call this method when encountering an expression that is a `null` literal.
void nullLiteral(Expression expression);
@@ -923,17 +894,15 @@
}
@override
- bool equalityOp_end(Expression wholeExpression, Expression rightOperand,
+ void equalityOp_end(Expression wholeExpression, Expression rightOperand,
Type rightOperandType,
{bool notEqual = false}) {
- return _wrap(
+ _wrap(
'equalityOp_end($wholeExpression, $rightOperand, $rightOperandType, '
'notEqual: $notEqual)',
() => _wrapped.equalityOp_end(
wholeExpression, rightOperand, rightOperandType,
- notEqual: notEqual),
- isQuery: true,
- isPure: false);
+ notEqual: notEqual));
}
@override
@@ -1022,14 +991,12 @@
}
@override
- bool ifNullExpression_rightBegin(
+ void ifNullExpression_rightBegin(
Expression leftHandSide, Type leftHandSideType) {
- return _wrap(
+ _wrap(
'ifNullExpression_rightBegin($leftHandSide, $leftHandSideType)',
() => _wrapped.ifNullExpression_rightBegin(
- leftHandSide, leftHandSideType),
- isQuery: true,
- isPure: false);
+ leftHandSide, leftHandSideType));
}
@override
@@ -1062,14 +1029,12 @@
}
@override
- bool isExpression_end(Expression isExpression, Expression subExpression,
+ void isExpression_end(Expression isExpression, Expression subExpression,
bool isNot, Type type) {
- return _wrap(
+ _wrap(
'isExpression_end($isExpression, $subExpression, $isNot, $type)',
- () =>
- _wrapped.isExpression_end(isExpression, subExpression, isNot, type),
- isQuery: true,
- isPure: false);
+ () => _wrapped.isExpression_end(
+ isExpression, subExpression, isNot, type));
}
@override
@@ -1141,10 +1106,9 @@
}
@override
- bool nullAwareAccess_rightBegin(Expression target, Type targetType) {
- return _wrap('nullAwareAccess_rightBegin($target, $targetType)',
- () => _wrapped.nullAwareAccess_rightBegin(target, targetType),
- isQuery: true, isPure: false);
+ void nullAwareAccess_rightBegin(Expression target, Type targetType) {
+ _wrap('nullAwareAccess_rightBegin($target, $targetType)',
+ () => _wrapped.nullAwareAccess_rightBegin(target, targetType));
}
@override
@@ -2816,7 +2780,7 @@
}
@override
- bool equalityOp_end(Expression wholeExpression, Expression rightOperand,
+ void equalityOp_end(Expression wholeExpression, Expression rightOperand,
Type rightOperandType,
{bool notEqual = false}) {
_EqualityOpContext<Variable, Type> context =
@@ -2824,7 +2788,6 @@
ExpressionInfo<Variable, Type> lhsInfo = context._conditionInfo;
Type leftOperandType = context._leftOperandType;
ExpressionInfo<Variable, Type> rhsInfo = _getExpressionInfo(rightOperand);
- ExpressionInfo<Variable, Type> equalityInfo;
TypeClassification leftOperandTypeClassification =
typeOperations.classifyType(leftOperandType);
TypeClassification rightOperandTypeClassification =
@@ -2832,7 +2795,6 @@
if (leftOperandTypeClassification == TypeClassification.nullOrEquivalent &&
rightOperandTypeClassification == TypeClassification.nullOrEquivalent) {
booleanLiteral(wholeExpression, !notEqual);
- return true;
} else if ((leftOperandTypeClassification ==
TypeClassification.nullOrEquivalent &&
rightOperandTypeClassification == TypeClassification.nonNullable) ||
@@ -2843,23 +2805,21 @@
// but weak mode it might produce an "equal" result. We don't want flow
// analysis behavior to depend on mode, so we conservatively assume that
// either result is possible.
- return true;
} else if (lhsInfo is _NullInfo<Variable, Type> &&
rhsInfo is _VariableReadInfo<Variable, Type>) {
assert(
leftOperandTypeClassification == TypeClassification.nullOrEquivalent);
- equalityInfo =
+ ExpressionInfo<Variable, Type> equalityInfo =
_current.tryMarkNonNullable(typeOperations, rhsInfo._variable);
+ _storeExpressionInfo(wholeExpression,
+ notEqual ? equalityInfo : ExpressionInfo.invert(equalityInfo));
} else if (rhsInfo is _NullInfo<Variable, Type> &&
lhsInfo is _VariableReadInfo<Variable, Type>) {
- equalityInfo =
+ ExpressionInfo<Variable, Type> equalityInfo =
_current.tryMarkNonNullable(typeOperations, lhsInfo._variable);
- } else {
- return true;
+ _storeExpressionInfo(wholeExpression,
+ notEqual ? equalityInfo : ExpressionInfo.invert(equalityInfo));
}
- _storeExpressionInfo(wholeExpression,
- notEqual ? equalityInfo : ExpressionInfo.invert(equalityInfo));
- return true;
}
@override
@@ -2998,7 +2958,7 @@
}
@override
- bool ifNullExpression_rightBegin(
+ void ifNullExpression_rightBegin(
Expression leftHandSide, Type leftHandSideType) {
ExpressionInfo<Variable, Type> lhsInfo = _getExpressionInfo(leftHandSide);
FlowModel<Variable, Type> promoted;
@@ -3012,7 +2972,6 @@
promoted = _current;
}
_stack.add(new _IfNullExpressionContext<Variable, Type>(promoted));
- return true;
}
@override
@@ -3057,21 +3016,17 @@
}
@override
- bool isExpression_end(Expression isExpression, Expression subExpression,
+ void isExpression_end(Expression isExpression, Expression subExpression,
bool isNot, Type type) {
ExpressionInfo<Variable, Type> subExpressionInfo =
_getExpressionInfo(subExpression);
- Variable variable;
if (subExpressionInfo is _VariableReadInfo<Variable, Type>) {
- variable = subExpressionInfo._variable;
- } else {
- return true;
+ ExpressionInfo<Variable, Type> expressionInfo =
+ _current.tryPromoteForTypeCheck(
+ typeOperations, subExpressionInfo._variable, type);
+ _storeExpressionInfo(isExpression,
+ isNot ? ExpressionInfo.invert(expressionInfo) : expressionInfo);
}
- ExpressionInfo<Variable, Type> expressionInfo =
- _current.tryPromoteForTypeCheck(typeOperations, variable, type);
- _storeExpressionInfo(isExpression,
- isNot ? ExpressionInfo.invert(expressionInfo) : expressionInfo);
- return true;
}
@override
@@ -3177,7 +3132,7 @@
}
@override
- bool nullAwareAccess_rightBegin(Expression target, Type targetType) {
+ void nullAwareAccess_rightBegin(Expression target, Type targetType) {
assert(targetType != null);
_current = _current.split();
_stack.add(new _NullAwareAccessContext<Variable, Type>(_current));
@@ -3189,7 +3144,6 @@
.ifTrue;
}
}
- return true;
}
@override
diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
index 177e1ae..6bce0eb 100644
--- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
@@ -162,6 +162,26 @@
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeAgnosticWithStrongDillLibrary =
+ messageAgnosticWithStrongDillLibrary;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageAgnosticWithStrongDillLibrary = const MessageCode(
+ "AgnosticWithStrongDillLibrary",
+ message:
+ r"""Loaded library is compiled with sound null safety and cannot be used in compilation for agnostic null safety.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeAgnosticWithWeakDillLibrary =
+ messageAgnosticWithWeakDillLibrary;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageAgnosticWithWeakDillLibrary = const MessageCode(
+ "AgnosticWithWeakDillLibrary",
+ message:
+ r"""Loaded library is compiled with unsound null safety and cannot be used in compilation for agnostic null safety.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Null> codeAmbiguousExtensionCause = messageAmbiguousExtensionCause;
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -5623,6 +5643,14 @@
r"""Try changing the inline function type (as in 'int f()') to a prefixed function type using the `Function` keyword (as in 'int Function() f').""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeInvalidNnbdDillLibrary = messageInvalidNnbdDillLibrary;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageInvalidNnbdDillLibrary = const MessageCode(
+ "InvalidNnbdDillLibrary",
+ message: r"""Trying to use library with invalid null safety.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(Token token)> templateInvalidOperator =
const Template<Message Function(Token token)>(
messageTemplate:
@@ -8720,6 +8748,16 @@
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeStrongWithWeakDillLibrary =
+ messageStrongWithWeakDillLibrary;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageStrongWithWeakDillLibrary = const MessageCode(
+ "StrongWithWeakDillLibrary",
+ message:
+ r"""Loaded library is compiled with unsound null safety and cannot be used in compilation for sound null safety.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Null> codeSuperAsExpression = messageSuperAsExpression;
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -9689,6 +9727,16 @@
tip: r"""Try removing the type arguments.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeWeakWithStrongDillLibrary =
+ messageWeakWithStrongDillLibrary;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageWeakWithStrongDillLibrary = const MessageCode(
+ "WeakWithStrongDillLibrary",
+ message:
+ r"""Loaded library is compiled with sound null safety and cannot be used in compilation for unsound null safety.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<
Message Function(
String string,
diff --git a/pkg/_fe_analyzer_shared/test/flow_analysis/flow_analysis_test.dart b/pkg/_fe_analyzer_shared/test/flow_analysis/flow_analysis_test.dart
index 8b5ee79..02d3307 100644
--- a/pkg/_fe_analyzer_shared/test/flow_analysis/flow_analysis_test.dart
+++ b/pkg/_fe_analyzer_shared/test/flow_analysis/flow_analysis_test.dart
@@ -189,9 +189,7 @@
var nullExpr = _Expression();
flow.nullLiteral(nullExpr);
var expr = _Expression();
- var successIsReachable =
- flow.equalityOp_end(expr, nullExpr, _Type('Null'), notEqual: true);
- expect(successIsReachable, true);
+ flow.equalityOp_end(expr, nullExpr, _Type('Null'), notEqual: true);
flow.ifStatement_thenBegin(expr);
expect(flow.isReachable, true);
expect(flow.promotedType(x).type, 'int');
@@ -214,11 +212,7 @@
var nullExpr = _Expression();
flow.nullLiteral(nullExpr);
var expr = _Expression();
- var successIsReachable =
- flow.equalityOp_end(expr, nullExpr, _Type('Null'), notEqual: true);
- // The `== null` case is considered reachable due to mixed mode
- // unsoundness
- expect(successIsReachable, true);
+ flow.equalityOp_end(expr, nullExpr, _Type('Null'), notEqual: true);
flow.ifStatement_thenBegin(expr);
expect(flow.isReachable, true);
expect(flow.promotedType(x), isNull);
@@ -235,10 +229,8 @@
flow.ifStatement_conditionBegin();
flow.equalityOp_rightBegin(_Expression(), _Type('int?'));
var expr = _Expression();
- var successIsReachable = flow.equalityOp_end(
- expr, _Expression(), _Type('int?'),
+ flow.equalityOp_end(expr, _Expression(), _Type('int?'),
notEqual: false);
- expect(successIsReachable, true);
flow.ifStatement_thenBegin(expr);
expect(flow.isReachable, true);
flow.ifStatement_elseBegin();
@@ -253,9 +245,7 @@
flow.ifStatement_conditionBegin();
flow.equalityOp_rightBegin(_Expression(), _Type('int?'));
var expr = _Expression();
- var successIsReachable = flow
- .equalityOp_end(expr, _Expression(), _Type('int?'), notEqual: true);
- expect(successIsReachable, true);
+ flow.equalityOp_end(expr, _Expression(), _Type('int?'), notEqual: true);
flow.ifStatement_thenBegin(expr);
expect(flow.isReachable, true);
flow.ifStatement_elseBegin();
@@ -296,9 +286,7 @@
var nullExpr = _Expression();
flow.nullLiteral(nullExpr);
var expr = _Expression();
- var successIsReachable =
- flow.equalityOp_end(expr, nullExpr, _Type('Null'), notEqual: false);
- expect(successIsReachable, true);
+ flow.equalityOp_end(expr, nullExpr, _Type('Null'), notEqual: false);
flow.ifStatement_thenBegin(expr);
expect(flow.isReachable, true);
expect(flow.promotedType(x), isNull);
@@ -321,11 +309,7 @@
var nullExpr = _Expression();
flow.nullLiteral(nullExpr);
var expr = _Expression();
- var successIsReachable =
- flow.equalityOp_end(expr, nullExpr, _Type('Null'), notEqual: false);
- // The `== null` case is considered reachable due to mixed mode
- // unsoundness
- expect(successIsReachable, true);
+ flow.equalityOp_end(expr, nullExpr, _Type('Null'), notEqual: false);
flow.ifStatement_thenBegin(expr);
expect(flow.isReachable, true);
expect(flow.promotedType(x), isNull);
@@ -406,9 +390,7 @@
flow.equalityOp_rightBegin(null1, _Type('Null'));
var null2 = _Expression();
var expr = _Expression();
- var successIsReachable =
- flow.equalityOp_end(expr, null2, _Type('Null'));
- expect(successIsReachable, true);
+ flow.equalityOp_end(expr, null2, _Type('Null'));
flow.ifStatement_thenBegin(expr);
expect(flow.isReachable, true);
flow.ifStatement_elseBegin();
@@ -425,9 +407,7 @@
flow.equalityOp_rightBegin(null1, _Type('Null'));
var null2 = _Expression();
var expr = _Expression();
- var successIsReachable =
- flow.equalityOp_end(expr, null2, _Type('Null'), notEqual: true);
- expect(successIsReachable, true);
+ flow.equalityOp_end(expr, null2, _Type('Null'), notEqual: true);
flow.ifStatement_thenBegin(expr);
expect(flow.isReachable, false);
flow.ifStatement_elseBegin();
@@ -444,10 +424,7 @@
flow.equalityOp_rightBegin(null1, _Type('Null'));
var null2 = _Expression();
var expr = _Expression();
- var successIsReachable = flow.equalityOp_end(expr, null2, _Type('int'));
- // The `== null` case is considered reachable due to mixed mode
- // unsoundness
- expect(successIsReachable, true);
+ flow.equalityOp_end(expr, null2, _Type('int'));
flow.ifStatement_thenBegin(expr);
expect(flow.isReachable, true);
flow.ifStatement_elseBegin();
@@ -464,11 +441,7 @@
flow.equalityOp_rightBegin(null1, _Type('Null'));
var null2 = _Expression();
var expr = _Expression();
- var successIsReachable =
- flow.equalityOp_end(expr, null2, _Type('int'), notEqual: true);
- // The `== null` case is considered reachable due to mixed mode
- // unsoundness
- expect(successIsReachable, true);
+ flow.equalityOp_end(expr, null2, _Type('int'), notEqual: true);
flow.ifStatement_thenBegin(expr);
expect(flow.isReachable, true);
flow.ifStatement_elseBegin();
@@ -485,11 +458,7 @@
flow.equalityOp_rightBegin(null1, _Type('int'));
var null2 = _Expression();
var expr = _Expression();
- var successIsReachable =
- flow.equalityOp_end(expr, null2, _Type('Null'));
- // The `== null` case is considered reachable due to mixed mode
- // unsoundness
- expect(successIsReachable, true);
+ flow.equalityOp_end(expr, null2, _Type('Null'));
flow.ifStatement_thenBegin(expr);
expect(flow.isReachable, true);
flow.ifStatement_elseBegin();
@@ -506,11 +475,7 @@
flow.equalityOp_rightBegin(null1, _Type('int'));
var null2 = _Expression();
var expr = _Expression();
- var successIsReachable =
- flow.equalityOp_end(expr, null2, _Type('Null'), notEqual: true);
- // The `== null` case is considered reachable due to mixed mode
- // unsoundness
- expect(successIsReachable, true);
+ flow.equalityOp_end(expr, null2, _Type('Null'), notEqual: true);
flow.ifStatement_thenBegin(expr);
expect(flow.isReachable, true);
flow.ifStatement_elseBegin();
@@ -1154,9 +1119,7 @@
h.assignedVariables((vars) => vars.write(x));
h.run((flow) {
h.declare(x, initialized: true);
- var rhsIsReachable = flow.ifNullExpression_rightBegin(
- h.variableRead(x)(), _Type('int?'));
- expect(rhsIsReachable, true);
+ flow.ifNullExpression_rightBegin(h.variableRead(x)(), _Type('int?'));
expect(flow.isReachable, true);
flow.write(x, _Type('int'));
expect(flow.promotedType(x).type, 'int');
@@ -1171,9 +1134,7 @@
var x = h.addVar('x', 'int?');
h.run((flow) {
h.declare(x, initialized: true);
- var rhsIsReachable = flow.ifNullExpression_rightBegin(
- h.variableRead(x)(), _Type('int?'));
- expect(rhsIsReachable, true);
+ flow.ifNullExpression_rightBegin(h.variableRead(x)(), _Type('int?'));
expect(flow.isReachable, true);
h.promote(x, 'int');
expect(flow.promotedType(x).type, 'int');
@@ -1188,9 +1149,7 @@
var x = h.addVar('x', 'int?');
h.run((flow) {
h.declare(x, initialized: true);
- var rhsIsReachable =
- flow.ifNullExpression_rightBegin(h.expr(), _Type('int?'));
- expect(rhsIsReachable, true);
+ flow.ifNullExpression_rightBegin(h.expr(), _Type('int?'));
expect(flow.isReachable, true);
h.promote(x, 'int');
expect(flow.promotedType(x).type, 'int');
@@ -1203,11 +1162,7 @@
test('ifNullExpression does not detect when RHS is unreachable', () {
var h = _Harness();
h.run((flow) {
- var rhsIsReachable =
- flow.ifNullExpression_rightBegin(h.expr(), _Type('int'));
- // We can't treat the RHS as unreachable because of mixed mode
- // unsoundness
- expect(rhsIsReachable, true);
+ flow.ifNullExpression_rightBegin(h.expr(), _Type('int'));
expect(flow.isReachable, true);
flow.ifNullExpression_end();
expect(flow.isReachable, true);
@@ -1218,9 +1173,7 @@
() {
var h = _Harness();
h.run((flow) {
- var rhsIsReachable =
- flow.ifNullExpression_rightBegin(h.expr(), _Type('Null'));
- expect(rhsIsReachable, true);
+ flow.ifNullExpression_rightBegin(h.expr(), _Type('Null'));
expect(flow.isReachable, true);
flow.ifNullExpression_end();
expect(flow.isReachable, true);
@@ -1267,9 +1220,7 @@
var read = _Expression();
flow.variableRead(read, x);
var expr = _Expression();
- var failureReachable =
- flow.isExpression_end(expr, read, inverted, _Type(tryPromoteType));
- expect(failureReachable, true);
+ flow.isExpression_end(expr, read, inverted, _Type(tryPromoteType));
flow.ifStatement_thenBegin(expr);
expect(flow.isReachable, true);
if (expectedPromotedTypeThen == null) {
@@ -1319,9 +1270,7 @@
flow.ifStatement_conditionBegin();
var subExpr = _Expression();
var expr = _Expression();
- var failureReachable =
- flow.isExpression_end(expr, subExpr, false, _Type('int'));
- expect(failureReachable, true);
+ flow.isExpression_end(expr, subExpr, false, _Type('int'));
flow.ifStatement_thenBegin(expr);
expect(flow.isReachable, true);
flow.ifStatement_elseBegin();
@@ -1337,9 +1286,7 @@
flow.ifStatement_conditionBegin();
var subExpr = _Expression();
var expr = _Expression();
- var failureReachable =
- flow.isExpression_end(expr, subExpr, true, _Type('int'));
- expect(failureReachable, true);
+ flow.isExpression_end(expr, subExpr, true, _Type('int'));
flow.ifStatement_thenBegin(expr);
expect(flow.isReachable, true);
flow.ifStatement_elseBegin();
@@ -1534,9 +1481,7 @@
h.declare(x, initialized: true);
var varExpr = _Expression();
flow.variableRead(varExpr, x);
- var shortIsReachable =
- flow.nullAwareAccess_rightBegin(varExpr, _Type('int?'));
- expect(shortIsReachable, true);
+ flow.nullAwareAccess_rightBegin(varExpr, _Type('int?'));
expect(flow.isReachable, true);
expect(flow.promotedType(x).type, 'int');
flow.nullAwareAccess_end();
@@ -1551,9 +1496,7 @@
h.declare(x, initialized: true);
var varExpr = _Expression();
flow.variableRead(varExpr, x);
- var shortIsReachable =
- flow.nullAwareAccess_rightBegin(null, _Type('int?'));
- expect(shortIsReachable, true);
+ flow.nullAwareAccess_rightBegin(null, _Type('int?'));
expect(flow.isReachable, true);
expect(flow.promotedType(x), isNull);
flow.nullAwareAccess_end();
@@ -1568,11 +1511,7 @@
h.declare(x, initialized: true);
h.promote(x, 'int');
var lhs = _Expression();
- var shortIsReachable =
- flow.nullAwareAccess_rightBegin(lhs, _Type('int'));
- // We can't treat the short as unreachable because of mixed mode
- // unsoundness
- expect(shortIsReachable, true);
+ flow.nullAwareAccess_rightBegin(lhs, _Type('int'));
expect(flow.isReachable, true);
expect(flow.promotedType(x).type, 'int');
flow.write(x, _Type('int?'));
@@ -1587,11 +1526,7 @@
var x = h.addVar('x', 'int?');
h.run((flow) {
h.declare(x, initialized: true);
- var shortIsReachable =
- flow.nullAwareAccess_rightBegin(_Expression(), _Type('int'));
- // We can't treat the RHS as unreachable because of mixed mode
- // unsoundness
- expect(shortIsReachable, true);
+ flow.nullAwareAccess_rightBegin(_Expression(), _Type('int'));
expect(flow.isReachable, true);
h.promote(x, 'int');
expect(flow.promotedType(x).type, 'int');
diff --git a/pkg/front_end/lib/src/base/processed_options.dart b/pkg/front_end/lib/src/base/processed_options.dart
index b45bbcf..e6ee21b 100644
--- a/pkg/front_end/lib/src/base/processed_options.dart
+++ b/pkg/front_end/lib/src/base/processed_options.dart
@@ -374,6 +374,12 @@
}
Component _validateNullSafetyMode(Component component) {
+ if (component.mode == NonNullableByDefaultCompiledMode.Invalid) {
+ throw new FormatException(
+ 'Provided .dill file for the following libraries has an invalid null '
+ 'safety mode and does not support null safety:\n'
+ '${component.libraries.join('\n')}');
+ }
if (nnbdMode == NnbdMode.Strong &&
!(component.mode == NonNullableByDefaultCompiledMode.Strong ||
component.mode == NonNullableByDefaultCompiledMode.Agnostic)) {
diff --git a/pkg/front_end/lib/src/fasta/builder/field_builder.dart b/pkg/front_end/lib/src/fasta/builder/field_builder.dart
index d215d8f..5fb86e7 100644
--- a/pkg/front_end/lib/src/fasta/builder/field_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/field_builder.dart
@@ -1163,10 +1163,11 @@
CoreTypes coreTypes, String name, Expression initializer) {
assert(_type != null, "Type has not been computed for field $name.");
return late_lowering.createGetterBodyWithoutInitializer(
- coreTypes, fileOffset, name, type, 'Field',
+ coreTypes, fileOffset, name, type,
createVariableRead: _createFieldRead,
createIsSetRead: () => _createFieldGet(_lateIsSetField),
- isSetEncoding: isSetEncoding);
+ isSetEncoding: isSetEncoding,
+ forField: true);
}
}
@@ -1267,7 +1268,7 @@
CoreTypes coreTypes, String name, VariableDeclaration parameter) {
assert(_type != null, "Type has not been computed for field $name.");
return late_lowering.createSetterBodyFinal(
- coreTypes, fileOffset, name, parameter, type, 'Field',
+ coreTypes, fileOffset, name, parameter, type,
shouldReturnValue: false,
createVariableRead: () => _createFieldGet(_field),
createVariableWrite: (Expression value) =>
@@ -1275,7 +1276,8 @@
createIsSetRead: () => _createFieldGet(_lateIsSetField),
createIsSetWrite: (Expression value) =>
_createFieldSet(_lateIsSetField, value),
- isSetEncoding: isSetEncoding);
+ isSetEncoding: isSetEncoding,
+ forField: true);
}
}
@@ -1307,7 +1309,7 @@
CoreTypes coreTypes, String name, Expression initializer) {
assert(_type != null, "Type has not been computed for field $name.");
return late_lowering.createGetterWithInitializerWithRecheck(
- coreTypes, fileOffset, name, _type, 'Field', initializer,
+ coreTypes, fileOffset, name, _type, initializer,
createVariableRead: _createFieldRead,
createVariableWrite: (Expression value) =>
_createFieldSet(_field, value),
diff --git a/pkg/front_end/lib/src/fasta/dill/dill_loader.dart b/pkg/front_end/lib/src/fasta/dill/dill_loader.dart
index 4917f03..cf98a1f 100644
--- a/pkg/front_end/lib/src/fasta/dill/dill_loader.dart
+++ b/pkg/front_end/lib/src/fasta/dill/dill_loader.dart
@@ -6,13 +6,7 @@
import 'dart:async' show Future;
-import 'package:front_end/src/api_prototype/experimental_flags.dart'
- show ExperimentalFlag;
-import 'package:front_end/src/base/nnbd_mode.dart' show NnbdMode;
-import 'package:kernel/ast.dart'
- show Class, Component, DartType, Library, NonNullableByDefaultCompiledMode;
-import 'package:kernel/binary/ast_from_binary.dart'
- show mergeCompilationModeOrThrow;
+import 'package:kernel/ast.dart' show Class, Component, DartType, Library;
import '../builder/class_builder.dart';
import '../builder/library_builder.dart';
@@ -55,8 +49,6 @@
Library library = componentLibraries[i];
Uri uri = library.importUri;
if (filter == null || filter(library.importUri)) {
- assert(
- _checkNNBDSetting(library), "Unexpected NNBD setting for library");
libraries.add(library);
target.addLibrary(library);
requestedLibraries.add(uri);
@@ -124,32 +116,4 @@
TypeBuilder computeTypeBuilder(DartType type) {
return type.accept(new TypeBuilderComputer(this));
}
-
- bool _checkNNBDSetting(Library library) {
- // Compute "output nnbd mode".
- NonNullableByDefaultCompiledMode compiledMode;
- if (target.context.options
- .isExperimentEnabledGlobally(ExperimentalFlag.nonNullable)) {
- switch (target.context.options.nnbdMode) {
- case NnbdMode.Weak:
- compiledMode = NonNullableByDefaultCompiledMode.Weak;
- break;
- case NnbdMode.Strong:
- compiledMode = NonNullableByDefaultCompiledMode.Strong;
- break;
- case NnbdMode.Agnostic:
- compiledMode = NonNullableByDefaultCompiledMode.Agnostic;
- break;
- }
- } else {
- compiledMode = NonNullableByDefaultCompiledMode.Weak;
- }
-
- if (compiledMode !=
- mergeCompilationModeOrThrow(
- compiledMode, library.nonNullableByDefaultCompiledMode)) {
- return false;
- }
- return true;
- }
}
diff --git a/pkg/front_end/lib/src/fasta/incremental_compiler.dart b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
index 6f28cdb..69d3f19 100644
--- a/pkg/front_end/lib/src/fasta/incremental_compiler.dart
+++ b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
@@ -785,13 +785,49 @@
dillLoadedData.loader.currentSourceLoader = userCode.loader;
// Re-use the libraries we've deemed re-usable.
+ List<bool> seenModes = [false, false, false, false];
for (LibraryBuilder library in reusedLibraries) {
+ seenModes[library.library.nonNullableByDefaultCompiledMode.index] = true;
userCode.loader.builders[library.importUri] = library;
if (library.importUri.scheme == "dart" &&
library.importUri.path == "core") {
userCode.loader.coreLibrary = library;
}
}
+ // Check compilation mode up against what we've seen here and set
+ // `hasInvalidNnbdModeLibrary` accordingly.
+ if (c.options.isExperimentEnabledGlobally(ExperimentalFlag.nonNullable)) {
+ switch (c.options.nnbdMode) {
+ case NnbdMode.Weak:
+ // Don't expect strong or invalid.
+ if (seenModes[NonNullableByDefaultCompiledMode.Strong.index] ||
+ seenModes[NonNullableByDefaultCompiledMode.Invalid.index]) {
+ userCode.loader.hasInvalidNnbdModeLibrary = true;
+ }
+ break;
+ case NnbdMode.Strong:
+ // Don't expect weak or invalid.
+ if (seenModes[NonNullableByDefaultCompiledMode.Weak.index] ||
+ seenModes[NonNullableByDefaultCompiledMode.Invalid.index]) {
+ userCode.loader.hasInvalidNnbdModeLibrary = true;
+ }
+ break;
+ case NnbdMode.Agnostic:
+ // Don't expect strong, weak or invalid.
+ if (seenModes[NonNullableByDefaultCompiledMode.Strong.index] ||
+ seenModes[NonNullableByDefaultCompiledMode.Weak.index] ||
+ seenModes[NonNullableByDefaultCompiledMode.Invalid.index]) {
+ userCode.loader.hasInvalidNnbdModeLibrary = true;
+ }
+ break;
+ }
+ } else {
+ // Don't expect strong or invalid.
+ if (seenModes[NonNullableByDefaultCompiledMode.Strong.index] ||
+ seenModes[NonNullableByDefaultCompiledMode.Invalid.index]) {
+ userCode.loader.hasInvalidNnbdModeLibrary = true;
+ }
+ }
// The entry point(s) has to be set first for loader.first to be setup
// correctly. If the first one is in the rebuildBodies, we have to add it
@@ -1595,6 +1631,9 @@
// For now just don't initialize from this dill.
throw const PackageChangedError();
}
+ // Note: If a library has a NonNullableByDefaultCompiledMode.invalid
+ // we will throw and we won't initialize from it.
+ // That's wanted behavior.
if (compiledMode !=
mergeCompilationModeOrThrow(
compiledMode, lib.nonNullableByDefaultCompiledMode)) {
diff --git a/pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart b/pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart
index 0885714..ec6d37e 100644
--- a/pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart
@@ -606,9 +606,17 @@
}
Member getDispatchTargetKernel(Class cls, Name name, bool isSetter) {
- return getNodeFromClass(cls)
- .getDispatchTarget(name, isSetter)
- ?.getMember(this);
+ ClassMember classMember =
+ getNodeFromClass(cls).getDispatchTarget(name, isSetter);
+ Member member = classMember?.getMember(this);
+ if (member != null && member.isAbstract) {
+ if (cls.superclass != null) {
+ return getDispatchTargetKernel(cls.superclass, name, isSetter);
+ } else {
+ return null;
+ }
+ }
+ return member;
}
Member getCombinedMemberSignatureKernel(Class cls, Name name, bool isSetter,
diff --git a/pkg/front_end/lib/src/fasta/kernel/forwarding_node.dart b/pkg/front_end/lib/src/fasta/kernel/forwarding_node.dart
index 53f6b2d..0b4a166 100644
--- a/pkg/front_end/lib/src/fasta/kernel/forwarding_node.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/forwarding_node.dart
@@ -162,6 +162,12 @@
Arguments arguments = new Arguments(positionalArguments,
types: typeArguments, named: namedArguments);
Expression superCall;
+ assert(superTarget != null,
+ "No super target found for '${name}' in ${enclosingClass}.");
+ assert(
+ !superTarget.isAbstract,
+ "Abstract super target $superTarget found for '${name}' in "
+ "${enclosingClass}.");
switch (kind) {
case ProcedureKind.Method:
case ProcedureKind.Operator:
diff --git a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
index 79b0476..58d2b99 100644
--- a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
@@ -5929,14 +5929,11 @@
new FunctionNode(
node.initializer == null
? late_lowering.createGetterBodyWithoutInitializer(
- inferrer.coreTypes,
- fileOffset,
- node.name,
- node.type,
- 'Local',
+ inferrer.coreTypes, fileOffset, node.name, node.type,
createVariableRead: createVariableRead,
createIsSetRead: createIsSetRead,
- isSetEncoding: isSetEncoding)
+ isSetEncoding: isSetEncoding,
+ forField: false)
: late_lowering.createGetterWithInitializer(
inferrer.coreTypes,
fileOffset,
@@ -5976,13 +5973,13 @@
node.name,
setterParameter,
node.type,
- 'Local',
shouldReturnValue: true,
createVariableRead: createVariableRead,
createVariableWrite: createVariableWrite,
createIsSetRead: createIsSetRead,
createIsSetWrite: createIsSetWrite,
- isSetEncoding: isSetEncoding)
+ isSetEncoding: isSetEncoding,
+ forField: false)
: late_lowering.createSetterBody(inferrer.coreTypes,
fileOffset, node.name, setterParameter, node.type,
shouldReturnValue: true,
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
index 17161dfb..ba8a8b3 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -7,6 +7,8 @@
import 'dart:async' show Future;
import 'package:front_end/src/api_prototype/experimental_flags.dart';
+import 'package:front_end/src/fasta/dill/dill_library_builder.dart'
+ show DillLibraryBuilder;
import 'package:kernel/ast.dart'
show
Arguments,
@@ -39,28 +41,20 @@
TypeParameterType,
VariableDeclaration,
VariableGet;
-
import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
-
import 'package:kernel/clone.dart' show CloneVisitorNotMembers;
-
import 'package:kernel/core_types.dart';
-
import 'package:kernel/reference_from_index.dart' show IndexedClass;
-
-import 'package:kernel/type_algebra.dart' show substitute;
import 'package:kernel/target/changed_structure_notifier.dart'
show ChangedStructureNotifier;
import 'package:kernel/target/targets.dart' show DiagnosticReporter;
-import 'package:kernel/type_environment.dart' show TypeEnvironment;
-
import 'package:kernel/transformations/value_class.dart' as valueClass;
-
+import 'package:kernel/type_algebra.dart' show substitute;
+import 'package:kernel/type_environment.dart' show TypeEnvironment;
import 'package:package_config/package_config.dart';
import '../../api_prototype/file_system.dart' show FileSystem;
import '../../base/nnbd_mode.dart';
-
import '../builder/builder.dart';
import '../builder/class_builder.dart';
import '../builder/constructor_builder.dart';
@@ -78,27 +72,25 @@
import '../builder/type_declaration_builder.dart';
import '../builder/type_variable_builder.dart';
import '../builder/void_type_declaration_builder.dart';
-
import '../compiler_context.dart' show CompilerContext;
-
import '../crash.dart' show withCrashReporting;
-
-import '../dill/dill_target.dart' show DillTarget;
-
import '../dill/dill_member_builder.dart' show DillMemberBuilder;
-
-import '../fasta_codes.dart' show Message, LocatedMessage;
-
+import '../dill/dill_target.dart' show DillTarget;
+import '../fasta_codes.dart' show LocatedMessage, Message;
import '../loader.dart' show Loader;
-
import '../messages.dart'
show
FormattedMessage,
+ messageAgnosticWithStrongDillLibrary,
+ messageAgnosticWithWeakDillLibrary,
messageConstConstructorLateFinalFieldCause,
messageConstConstructorLateFinalFieldError,
messageConstConstructorNonFinalField,
messageConstConstructorNonFinalFieldCause,
messageConstConstructorRedirectionToNonConst,
+ messageInvalidNnbdDillLibrary,
+ messageStrongWithWeakDillLibrary,
+ messageWeakWithStrongDillLibrary,
noLength,
templateFieldNonNullableNotInitializedByConstructorError,
templateFieldNonNullableWithoutInitializerError,
@@ -107,28 +99,17 @@
templateInferredPackageUri,
templateMissingImplementationCause,
templateSuperclassHasNoDefaultConstructor;
-
import '../problems.dart' show unhandled;
-
import '../scope.dart' show AmbiguousBuilder;
-
import '../source/source_class_builder.dart' show SourceClassBuilder;
-
import '../source/source_library_builder.dart' show SourceLibraryBuilder;
-
import '../source/source_loader.dart' show SourceLoader;
-
import '../target_implementation.dart' show TargetImplementation;
-
import '../uri_translator.dart' show UriTranslator;
-
import 'constant_evaluator.dart' as constants
show EvaluationMode, transformLibraries, transformProcedure;
-
import 'kernel_constants.dart' show KernelConstantErrorReporter;
-
import 'metadata_collector.dart' show MetadataCollector;
-
import 'verifier.dart' show verifyComponent, verifyGetStaticType;
class KernelTarget extends TargetImplementation {
@@ -273,10 +254,44 @@
if (dillTarget.isLoaded) {
LibraryBuilder builder = dillTarget.loader.builders[uri];
if (builder != null) {
- if (loader.nnbdMode == NnbdMode.Strong ||
- loader.nnbdMode == NnbdMode.Agnostic) {
- if (!builder.isNonNullableByDefault) {
- loader.registerStrongOptOutLibrary(builder);
+ if (!builder.isNonNullableByDefault &&
+ (loader.nnbdMode == NnbdMode.Strong ||
+ loader.nnbdMode == NnbdMode.Agnostic)) {
+ loader.registerStrongOptOutLibrary(builder);
+ } else if (builder is DillLibraryBuilder) {
+ NonNullableByDefaultCompiledMode libraryMode =
+ builder.library.nonNullableByDefaultCompiledMode;
+ if (libraryMode == NonNullableByDefaultCompiledMode.Invalid) {
+ loader.registerNnbdMismatchLibrary(
+ builder, messageInvalidNnbdDillLibrary);
+ } else {
+ switch (loader.nnbdMode) {
+ case NnbdMode.Weak:
+ if (libraryMode != NonNullableByDefaultCompiledMode.Agnostic &&
+ libraryMode != NonNullableByDefaultCompiledMode.Weak) {
+ loader.registerNnbdMismatchLibrary(
+ builder, messageWeakWithStrongDillLibrary);
+ }
+ break;
+ case NnbdMode.Strong:
+ if (libraryMode != NonNullableByDefaultCompiledMode.Agnostic &&
+ libraryMode != NonNullableByDefaultCompiledMode.Strong) {
+ loader.registerNnbdMismatchLibrary(
+ builder, messageStrongWithWeakDillLibrary);
+ }
+ break;
+ case NnbdMode.Agnostic:
+ if (libraryMode != NonNullableByDefaultCompiledMode.Agnostic) {
+ if (libraryMode == NonNullableByDefaultCompiledMode.Strong) {
+ loader.registerNnbdMismatchLibrary(
+ builder, messageAgnosticWithStrongDillLibrary);
+ } else {
+ loader.registerNnbdMismatchLibrary(
+ builder, messageAgnosticWithWeakDillLibrary);
+ }
+ }
+ break;
+ }
}
}
return builder;
@@ -441,6 +456,9 @@
} else {
compiledMode = NonNullableByDefaultCompiledMode.Weak;
}
+ if (loader.hasInvalidNnbdModeLibrary) {
+ compiledMode = NonNullableByDefaultCompiledMode.Invalid;
+ }
Reference mainReference;
@@ -464,11 +482,88 @@
if (metadataCollector != null) {
component.addMetadataRepository(metadataCollector.repository);
}
+ assert(_getLibraryNnbdModeError(component) == null,
+ "Got error: ${_getLibraryNnbdModeError(component)}");
ticker.logMs("Linked component");
return component;
}
+ String _getLibraryNnbdModeError(Component component) {
+ if (loader.hasInvalidNnbdModeLibrary) {
+ // At least 1 library should be invalid or there should be a mix of strong
+ // and weak. For libraries we've just compiled it will be marked as
+ // invalid, but for libraries loaded from dill they have their original
+ // value (i.e. either strong or weak).
+ bool foundInvalid = false;
+ bool foundStrong = false;
+ bool foundWeak = false;
+ for (Library library in component.libraries) {
+ if (library.nonNullableByDefaultCompiledMode ==
+ NonNullableByDefaultCompiledMode.Invalid) {
+ foundInvalid = true;
+ break;
+ } else if (!foundWeak &&
+ library.nonNullableByDefaultCompiledMode ==
+ NonNullableByDefaultCompiledMode.Weak) {
+ foundWeak = true;
+ if (foundStrong) break;
+ } else if (!foundStrong &&
+ library.nonNullableByDefaultCompiledMode ==
+ NonNullableByDefaultCompiledMode.Strong) {
+ foundStrong = true;
+ if (foundWeak) break;
+ }
+ }
+ if (!foundInvalid && !(foundStrong && foundWeak)) {
+ return "hasInvalidNnbdModeLibrary is true, but no library was invalid "
+ "and there was no weak/strong mix.";
+ }
+ if (component.mode != NonNullableByDefaultCompiledMode.Invalid) {
+ return "Component mode is not invalid as expected";
+ }
+ } else {
+ // No libraries are allowed to be invalid, and should all be compatible
+ // with the component nnbd mode setting.
+ if (component.mode == NonNullableByDefaultCompiledMode.Invalid) {
+ return "Component mode is invalid which was not expected";
+ }
+ if (component.modeRaw == null) {
+ return "Component mode not set at all";
+ }
+ for (Library library in component.libraries) {
+ if (component.mode == NonNullableByDefaultCompiledMode.Strong) {
+ if (library.nonNullableByDefaultCompiledMode !=
+ NonNullableByDefaultCompiledMode.Strong &&
+ library.nonNullableByDefaultCompiledMode !=
+ NonNullableByDefaultCompiledMode.Agnostic) {
+ return "Expected library ${library.importUri} to be strong or "
+ "agnostic, but was ${library.nonNullableByDefaultCompiledMode}";
+ }
+ } else if (component.mode == NonNullableByDefaultCompiledMode.Weak) {
+ if (library.nonNullableByDefaultCompiledMode !=
+ NonNullableByDefaultCompiledMode.Weak &&
+ library.nonNullableByDefaultCompiledMode !=
+ NonNullableByDefaultCompiledMode.Agnostic) {
+ return "Expected library ${library.importUri} to be weak or "
+ "agnostic, but was ${library.nonNullableByDefaultCompiledMode}";
+ }
+ } else if (component.mode ==
+ NonNullableByDefaultCompiledMode.Agnostic) {
+ if (library.nonNullableByDefaultCompiledMode !=
+ NonNullableByDefaultCompiledMode.Agnostic) {
+ return "Expected library ${library.importUri} to be agnostic, "
+ "but was ${library.nonNullableByDefaultCompiledMode}";
+ }
+ } else {
+ return "Expected component mode to be either strong, "
+ "weak or agnostic but was ${component.mode}";
+ }
+ }
+ }
+ return null;
+ }
+
void installDefaultSupertypes() {
Class objectClass = this.objectClass;
loader.builders.forEach((Uri uri, LibraryBuilder library) {
diff --git a/pkg/front_end/lib/src/fasta/kernel/late_lowering.dart b/pkg/front_end/lib/src/fasta/kernel/late_lowering.dart
index 3458ee9..f1b548e 100644
--- a/pkg/front_end/lib/src/fasta/kernel/late_lowering.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/late_lowering.dart
@@ -126,28 +126,21 @@
/// which a `LateInitializationError` should be thrown. Late final locals
/// cannot have writes during initialization since they are not in scope in
/// their own initializer.
-Statement createGetterWithInitializerWithRecheck(
- CoreTypes coreTypes,
- int fileOffset,
- String name,
- DartType type,
- String variableKindName,
- Expression initializer,
+Statement createGetterWithInitializerWithRecheck(CoreTypes coreTypes,
+ int fileOffset, String name, DartType type, Expression initializer,
{Expression createVariableRead({bool needsPromotion}),
Expression createVariableWrite(Expression value),
Expression createIsSetRead(),
Expression createIsSetWrite(Expression value),
IsSetEncoding isSetEncoding}) {
- Expression exception = new Throw(new ConstructorInvocation(
- coreTypes.lateInitializationErrorConstructor,
- new Arguments(<Expression>[
- new StringLiteral(
- "$variableKindName '${name}' has been assigned during "
- "initialization.")
- ..fileOffset = fileOffset
- ])
+ Expression exception = new Throw(
+ new ConstructorInvocation(
+ coreTypes
+ .lateInitializationFieldAssignedDuringInitializationConstructor,
+ new Arguments(
+ <Expression>[new StringLiteral(name)..fileOffset = fileOffset])
+ ..fileOffset = fileOffset)
..fileOffset = fileOffset)
- ..fileOffset = fileOffset)
..fileOffset = fileOffset;
VariableDeclaration temp =
new VariableDeclaration.forValue(initializer, type: type)
@@ -291,21 +284,23 @@
/// Creates the body for the synthesized getter used to encode the lowering
/// of a late field or local without an initializer.
-Statement createGetterBodyWithoutInitializer(CoreTypes coreTypes,
- int fileOffset, String name, DartType type, String variableKindName,
+Statement createGetterBodyWithoutInitializer(
+ CoreTypes coreTypes, int fileOffset, String name, DartType type,
{Expression createVariableRead({bool needsPromotion}),
Expression createIsSetRead(),
- IsSetEncoding isSetEncoding}) {
+ IsSetEncoding isSetEncoding,
+ bool forField}) {
+ assert(forField != null);
assert(isSetEncoding != null);
- Expression exception = new Throw(new ConstructorInvocation(
- coreTypes.lateInitializationErrorConstructor,
- new Arguments(<Expression>[
- new StringLiteral(
- "$variableKindName '${name}' has not been initialized.")
- ..fileOffset = fileOffset
- ])
+ Expression exception = new Throw(
+ new ConstructorInvocation(
+ forField
+ ? coreTypes.lateInitializationFieldNotInitializedConstructor
+ : coreTypes.lateInitializationLocalNotInitializedConstructor,
+ new Arguments(
+ <Expression>[new StringLiteral(name)..fileOffset = fileOffset])
+ ..fileOffset = fileOffset)
..fileOffset = fileOffset)
- ..fileOffset = fileOffset)
..fileOffset = fileOffset;
switch (isSetEncoding) {
case IsSetEncoding.useIsSetField:
@@ -425,29 +420,26 @@
/// Creates the body for the synthesized setter used to encode the lowering
/// of a final late field or local.
-Statement createSetterBodyFinal(
- CoreTypes coreTypes,
- int fileOffset,
- String name,
- VariableDeclaration parameter,
- DartType type,
- String variableKindName,
+Statement createSetterBodyFinal(CoreTypes coreTypes, int fileOffset,
+ String name, VariableDeclaration parameter, DartType type,
{bool shouldReturnValue,
Expression createVariableRead(),
Expression createVariableWrite(Expression value),
Expression createIsSetRead(),
Expression createIsSetWrite(Expression value),
- IsSetEncoding isSetEncoding}) {
+ IsSetEncoding isSetEncoding,
+ bool forField}) {
+ assert(forField != null);
assert(isSetEncoding != null);
- Expression exception = new Throw(new ConstructorInvocation(
- coreTypes.lateInitializationErrorConstructor,
- new Arguments(<Expression>[
- new StringLiteral(
- "${variableKindName} '${name}' has already been initialized.")
- ..fileOffset = fileOffset
- ])
+ Expression exception = new Throw(
+ new ConstructorInvocation(
+ forField
+ ? coreTypes.lateInitializationFieldAlreadyInitializedConstructor
+ : coreTypes.lateInitializationLocalAlreadyInitializedConstructor,
+ new Arguments(
+ <Expression>[new StringLiteral(name)..fileOffset = fileOffset])
+ ..fileOffset = fileOffset)
..fileOffset = fileOffset)
- ..fileOffset = fileOffset)
..fileOffset = fileOffset;
Statement createReturn(Expression value) {
diff --git a/pkg/front_end/lib/src/fasta/kernel/member_covariance.dart b/pkg/front_end/lib/src/fasta/kernel/member_covariance.dart
index 956f0fd..5d1d77f 100644
--- a/pkg/front_end/lib/src/fasta/kernel/member_covariance.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/member_covariance.dart
@@ -61,14 +61,25 @@
/// If no type parameters are generic-covariant-impl, this is `null`.
final List<bool> _typeParameters;
- const Covariance.internal(
- this._positionalParameters, this._namedParameters, this._typeParameters);
+ Covariance.internal(
+ this._positionalParameters, this._namedParameters, this._typeParameters) {
+ assert(_positionalParameters == null ||
+ _positionalParameters.any((element) => element != 0));
+ assert(_namedParameters == null ||
+ _namedParameters.values.isNotEmpty &&
+ _namedParameters.values.every((element) => element != 0));
+ assert(
+ _typeParameters == null || _typeParameters.any((element) => element));
+ }
/// The empty covariance.
///
/// This is used for all members that do not use any covariance, regardless
/// of parameter structure.
- const Covariance.empty() : this.internal(null, null, null);
+ const Covariance.empty()
+ : _positionalParameters = null,
+ _namedParameters = null,
+ _typeParameters = null;
/// Computes the covariance for the setter aspect of [field].
///
@@ -287,7 +298,7 @@
int hash = 0;
if (_positionalParameters != null) {
for (int covariance in _positionalParameters) {
- hash = hash * 13 + covariance.hashCode * 17;
+ hash += covariance.hashCode * 17;
}
}
if (_namedParameters != null) {
@@ -297,7 +308,9 @@
}
if (_typeParameters != null) {
for (bool covariance in _typeParameters) {
- hash = hash * 29 + covariance.hashCode * 31;
+ if (covariance) {
+ hash += covariance.hashCode * 31;
+ }
}
}
return hash;
@@ -312,12 +325,10 @@
other._positionalParameters == null) {
return false;
}
- if (_positionalParameters.length !=
- other._positionalParameters.length) {
- return false;
- }
- for (int i = 0; i < _positionalParameters.length; i++) {
- if (_positionalParameters[i] != other._positionalParameters[i]) {
+ int positionalParameterCount = max(
+ _positionalParameters.length, other._positionalParameters.length);
+ for (int i = 0; i < positionalParameterCount; i++) {
+ if (getPositionalVariance(i) != other.getPositionalVariance(i)) {
return false;
}
}
@@ -326,13 +337,12 @@
if (_namedParameters == null || other._namedParameters == null) {
return false;
}
- if (_namedParameters.length != other._namedParameters.length) {
- return false;
- }
- for (String name in _namedParameters.keys) {
- int covariance = _namedParameters[name];
- int otherCovariance = other._namedParameters[name];
- if (covariance != otherCovariance) {
+ Set<String> names = {
+ ..._namedParameters.keys,
+ ...other._namedParameters.keys
+ };
+ for (String name in names) {
+ if (getNamedVariance(name) != other.getNamedVariance(name)) {
return false;
}
}
@@ -341,11 +351,11 @@
if (_typeParameters == null || other._typeParameters == null) {
return false;
}
- if (_typeParameters.length != other._typeParameters.length) {
- return false;
- }
- for (int i = 0; i < _typeParameters.length; i++) {
- if (_typeParameters[i] != other._typeParameters[i]) {
+ int typeParameterCount =
+ max(_typeParameters.length, other._typeParameters.length);
+ for (int i = 0; i < typeParameterCount; i++) {
+ if (isTypeParameterGenericCovariantImpl(i) !=
+ other.isTypeParameterGenericCovariantImpl(i)) {
return false;
}
}
@@ -354,4 +364,71 @@
}
return false;
}
+
+ @override
+ String toString() {
+ StringBuffer sb = new StringBuffer();
+ if (isEmpty) {
+ sb.write('Covariance.empty()');
+ } else {
+ sb.write('Covariance(');
+ String comma = '';
+ if (_positionalParameters != null) {
+ for (int index = 0; index < _positionalParameters.length; index++) {
+ if (_positionalParameters[index] != 0) {
+ sb.write(comma);
+ sb.write('$index:');
+ switch (_positionalParameters[index]) {
+ case GenericCovariantImpl:
+ sb.write('GenericCovariantImpl');
+ break;
+ case Covariant:
+ sb.write('Covariant');
+ break;
+ default:
+ sb.write('GenericCovariantImpl+Covariant');
+ break;
+ }
+ comma = ',';
+ }
+ }
+ }
+ if (_namedParameters != null) {
+ for (String name in _namedParameters.keys) {
+ int covariance = _namedParameters[name];
+ if (covariance != 0) {
+ sb.write(comma);
+ sb.write('$name:');
+
+ switch (covariance) {
+ case GenericCovariantImpl:
+ sb.write('GenericCovariantImpl');
+ break;
+ case Covariant:
+ sb.write('Covariant');
+ break;
+ default:
+ sb.write('GenericCovariantImpl+Covariant');
+ break;
+ }
+ comma = ',';
+ }
+ }
+ }
+ if (_typeParameters != null) {
+ sb.write(comma);
+ sb.write('types:');
+ comma = '';
+ for (int index = 0; index < _typeParameters.length; index++) {
+ if (_typeParameters[index]) {
+ sb.write(comma);
+ sb.write('$index');
+ comma = ',';
+ }
+ }
+ }
+ sb.write(')');
+ }
+ return sb.toString();
+ }
}
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
index badb049..b70ba48 100644
--- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
@@ -487,19 +487,20 @@
LanguageVersion get languageVersion => _languageVersion;
void markLanguageVersionFinal() {
- if (enableNonNullableInLibrary &&
+ if (!isNonNullableByDefault &&
(loader.nnbdMode == NnbdMode.Strong ||
loader.nnbdMode == NnbdMode.Agnostic)) {
// In strong and agnostic mode, the language version is not allowed to
// opt a library out of nnbd.
- if (!isNonNullableByDefault) {
- if (_languageVersion.isExplicit) {
- addPostponedProblem(messageStrongModeNNBDButOptOut,
- _languageVersion.charOffset, _languageVersion.charCount, fileUri);
- } else {
- loader.registerStrongOptOutLibrary(this);
- }
+ if (_languageVersion.isExplicit) {
+ addPostponedProblem(messageStrongModeNNBDButOptOut,
+ _languageVersion.charOffset, _languageVersion.charCount, fileUri);
+ } else {
+ loader.registerStrongOptOutLibrary(this);
}
+ library.nonNullableByDefaultCompiledMode =
+ NonNullableByDefaultCompiledMode.Invalid;
+ loader.hasInvalidNnbdModeLibrary = true;
}
_languageVersion.isFinal = true;
_ensureIsNonNullableByDefault();
diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart
index a8a4a63..215bba5 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -323,6 +323,18 @@
void registerStrongOptOutLibrary(LibraryBuilder libraryBuilder) {
_strongOptOutLibraries ??= {};
_strongOptOutLibraries.add(libraryBuilder);
+ hasInvalidNnbdModeLibrary = true;
+ }
+
+ bool hasInvalidNnbdModeLibrary = false;
+
+ Map<LibraryBuilder, Message> _nnbdMismatchLibraries;
+
+ void registerNnbdMismatchLibrary(
+ LibraryBuilder libraryBuilder, Message message) {
+ _nnbdMismatchLibraries ??= {};
+ _nnbdMismatchLibraries[libraryBuilder] = message;
+ hasInvalidNnbdModeLibrary = true;
}
@override
@@ -395,6 +407,13 @@
_strongOptOutLibraries = null;
}
}
+ if (_nnbdMismatchLibraries != null) {
+ for (MapEntry<LibraryBuilder, Message> entry
+ in _nnbdMismatchLibraries.entries) {
+ addProblem(entry.value, -1, noLength, entry.key.fileUri);
+ }
+ _nnbdMismatchLibraries = null;
+ }
}
List<int> getSource(List<int> bytes) {
diff --git a/pkg/front_end/lib/src/kernel_generator_impl.dart b/pkg/front_end/lib/src/kernel_generator_impl.dart
index 66dbc7b..78a0c68 100644
--- a/pkg/front_end/lib/src/kernel_generator_impl.dart
+++ b/pkg/front_end/lib/src/kernel_generator_impl.dart
@@ -138,6 +138,9 @@
compiledMode = NonNullableByDefaultCompiledMode.Agnostic;
break;
}
+ if (kernelTarget.loader.hasInvalidNnbdModeLibrary) {
+ compiledMode = NonNullableByDefaultCompiledMode.Invalid;
+ }
trimmedSummaryComponent.setMainMethodAndMode(
trimmedSummaryComponent.mainMethodName, false, compiledMode);
diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status
index 5dad4ce..329faa1 100644
--- a/pkg/front_end/messages.status
+++ b/pkg/front_end/messages.status
@@ -14,6 +14,11 @@
AbstractRedirectedClassInstantiation/example: Fail
AccessError/analyzerCode: Fail
AccessError/example: Fail
+AgnosticWithStrongDillLibrary/analyzerCode: Fail
+AgnosticWithStrongDillLibrary/example: Fail
+AgnosticWithWeakDillLibrary/analyzerCode: Fail
+AgnosticWithWeakDillLibrary/example: Fail
+AgnosticWithWeakDillLibrary/spelling: Fail
AmbiguousExtensionMethod/analyzerCode: Fail
AmbiguousExtensionOperator/analyzerCode: Fail
AmbiguousExtensionProperty/analyzerCode: Fail
@@ -167,8 +172,6 @@
DirectiveAfterDeclaration/part_wrapped_script2: Fail
DirectiveAfterDeclaration/script1: Fail
DirectiveAfterDeclaration/script2: Fail
-DuplicateDeferred/example: Fail
-DuplicatePrefix/example: Fail
DuplicatedDeclarationUse/analyzerCode: Fail # No corresponding analyzer code.
DuplicatedDeclarationUse/part_wrapped_script1: Fail
DuplicatedDeclarationUse/part_wrapped_script2: Fail
@@ -176,6 +179,7 @@
DuplicatedDeclarationUse/script2: Fail # Wrong error.
DuplicatedDefinition/analyzerCode: Fail
DuplicatedDefinition/example: Fail
+DuplicateDeferred/example: Fail
DuplicatedExport/part_wrapped_script: Fail # Exporting file in the (now) part.
DuplicatedExportInType/analyzerCode: Fail
DuplicatedExportInType/example: Fail
@@ -187,6 +191,7 @@
DuplicatedName/example: Fail
DuplicatedNamedArgument/example: Fail
DuplicatedParameterName/example: Fail
+DuplicatePrefix/example: Fail
Encoding/analyzerCode: Fail
EnumConstantSameNameAsEnclosing/example: Fail
EnumInstantiation/example: Fail
@@ -266,6 +271,7 @@
ExternalFactoryWithBody/script1: Fail
ExternalFieldConstructorInitializer/analyzerCode: Fail
ExternalFieldInitializer/analyzerCode: Fail
+ExtraneousModifier/part_wrapped_script1: Fail
ExtraneousModifier/part_wrapped_script10: Fail
ExtraneousModifier/part_wrapped_script11: Fail
ExtraneousModifier/part_wrapped_script12: Fail
@@ -274,9 +280,8 @@
ExtraneousModifier/part_wrapped_script17: Fail
ExtraneousModifier/part_wrapped_script18: Fail
ExtraneousModifier/part_wrapped_script19: Fail
-ExtraneousModifier/part_wrapped_script1: Fail
-ExtraneousModifier/part_wrapped_script20: Fail
ExtraneousModifier/part_wrapped_script2: Fail
+ExtraneousModifier/part_wrapped_script20: Fail
ExtraneousModifier/part_wrapped_script3: Fail
ExtraneousModifier/part_wrapped_script4: Fail
ExtraneousModifier/part_wrapped_script5: Fail
@@ -284,6 +289,7 @@
ExtraneousModifier/part_wrapped_script7: Fail
ExtraneousModifier/part_wrapped_script8: Fail
ExtraneousModifier/part_wrapped_script9: Fail
+ExtraneousModifier/script1: Fail
ExtraneousModifier/script10: Fail
ExtraneousModifier/script11: Fail
ExtraneousModifier/script12: Fail
@@ -292,9 +298,8 @@
ExtraneousModifier/script17: Fail
ExtraneousModifier/script18: Fail
ExtraneousModifier/script19: Fail
-ExtraneousModifier/script1: Fail
-ExtraneousModifier/script20: Fail
ExtraneousModifier/script2: Fail
+ExtraneousModifier/script20: Fail
ExtraneousModifier/script3: Fail
ExtraneousModifier/script4: Fail
ExtraneousModifier/script5: Fail
@@ -389,10 +394,10 @@
IncompatibleRedirecteeFunctionType/part_wrapped_script6: Fail
IncompatibleRedirecteeFunctionType/script6: Fail # Triggers multiple errors.
IncompatibleRedirecteeFunctionTypeWarning/example: Fail
+IncorrectTypeArgumentInferredWarning/example: Fail
IncorrectTypeArgumentInReturnTypeWarning/example: Fail
IncorrectTypeArgumentInSupertypeInferredWarning/example: Fail
IncorrectTypeArgumentInSupertypeWarning/example: Fail
-IncorrectTypeArgumentInferredWarning/example: Fail
IncorrectTypeArgumentQualifiedInferredWarning/example: Fail
IncorrectTypeArgumentQualifiedWarning/example: Fail
IncorrectTypeArgumentWarning/example: Fail
@@ -438,6 +443,8 @@
InvalidGetterSetterTypeSetterInheritedGetter/analyzerCode: Fail
InvalidGetterSetterTypeSetterInheritedGetterLegacy/analyzerCode: Fail
InvalidInitializer/example: Fail
+InvalidNnbdDillLibrary/analyzerCode: Fail
+InvalidNnbdDillLibrary/example: Fail
InvalidPackageUri/analyzerCode: Fail
InvalidPackageUri/example: Fail
InvalidReturn/analyzerCode: Fail
@@ -549,9 +556,6 @@
NeverValueWarning/analyzerCode: Fail
NeverValueWarning/example: Fail
NoFormals/example: Fail
-NoSuchNamedParameter/example: Fail
-NoUnnamedConstructorInObject/analyzerCode: Fail
-NoUnnamedConstructorInObject/example: Fail
NonAgnosticConstant/analyzerCode: Fail
NonAgnosticConstant/example: Fail
NonAsciiIdentifier/expression: Fail
@@ -559,7 +563,6 @@
NonConstConstructor/example: Fail
NonConstFactory/example: Fail
NonInstanceTypeVariableUse/example: Fail
-NonNullAwareSpreadIsNull/analyzerCode: Fail # There's no analyzer code for that error yet.
NonNullableInNullAware/analyzerCode: Fail
NonNullableInNullAware/example: Fail
NonNullableNotAssignedError/analyzerCode: Fail
@@ -569,14 +572,17 @@
NonNullableOptOutExplicit/example: Fail
NonNullableOptOutImplicit/analyzerCode: Fail
NonNullableOptOutImplicit/example: Fail
+NonNullAwareSpreadIsNull/analyzerCode: Fail # There's no analyzer code for that error yet.
NonPartOfDirectiveInPart/part_wrapped_script1: Fail
NonPartOfDirectiveInPart/script1: Fail
+NoSuchNamedParameter/example: Fail
NotAConstantExpression/example: Fail
-NotAType/example: Fail
NotAnLvalue/example: Fail
+NotAType/example: Fail
NotBinaryOperator/analyzerCode: Fail
NotConstantExpression/example: Fail
-NullAwareCascadeOutOfOrder/example: Fail
+NoUnnamedConstructorInObject/analyzerCode: Fail
+NoUnnamedConstructorInObject/example: Fail
NullableExpressionCallError/analyzerCode: Fail
NullableExpressionCallError/example: Fail
NullableExpressionCallWarning/analyzerCode: Fail
@@ -611,6 +617,7 @@
NullableTearoffError/example: Fail
NullableTearoffWarning/analyzerCode: Fail
NullableTearoffWarning/example: Fail
+NullAwareCascadeOutOfOrder/example: Fail
OperatorMinusParameterMismatch/example: Fail
OperatorParameterMismatch0/analyzerCode: Fail
OperatorParameterMismatch0/example: Fail
@@ -705,15 +712,18 @@
StrongModeNNBDButOptOut/example: Fail
StrongModeNNBDPackageOptOut/analyzerCode: Fail
StrongModeNNBDPackageOptOut/example: Fail
+StrongWithWeakDillLibrary/analyzerCode: Fail
+StrongWithWeakDillLibrary/example: Fail
+StrongWithWeakDillLibrary/spelling: Fail
SuperAsExpression/example: Fail
SuperAsIdentifier/example: Fail
-SuperNullAware/example: Fail
SuperclassHasNoDefaultConstructor/example: Fail
SuperclassHasNoGetter/example: Fail
SuperclassHasNoMethod/example: Fail
SuperclassHasNoSetter/example: Fail
SuperclassMethodArgumentMismatch/analyzerCode: Fail
SuperclassMethodArgumentMismatch/example: Fail
+SuperNullAware/example: Fail
SupertypeIsFunction/analyzerCode: Fail
SupertypeIsFunction/example: Fail
SupertypeIsIllegal/example: Fail
@@ -738,14 +748,14 @@
TypeArgumentMismatch/example: Fail
TypeArgumentsOnTypeVariable/part_wrapped_script1: Fail
TypeArgumentsOnTypeVariable/script1: Fail
-TypeNotFound/example: Fail
-TypeVariableDuplicatedName/example: Fail
-TypeVariableSameNameAsEnclosing/example: Fail
TypedefNotFunction/example: Fail
TypedefNotType/example: Fail # Feature not yet enabled by default.
TypedefNullableType/analyzerCode: Fail
TypedefTypeVariableNotConstructor/analyzerCode: Fail # Feature not yet enabled by default.
TypedefTypeVariableNotConstructor/example: Fail # Feature not yet enabled by default.
+TypeNotFound/example: Fail
+TypeVariableDuplicatedName/example: Fail
+TypeVariableSameNameAsEnclosing/example: Fail
UnexpectedToken/part_wrapped_script1: Fail
UnexpectedToken/script1: Fail
UnmatchedToken/part_wrapped_script1: Fail
@@ -775,6 +785,8 @@
ValueForRequiredParameterNotProvidedWarning/example: Fail
VarAsTypeName/part_wrapped_script1: Fail
VarAsTypeName/script1: Fail # Too many problems
+WeakWithStrongDillLibrary/analyzerCode: Fail
+WeakWithStrongDillLibrary/example: Fail
WebLiteralCannotBeRepresentedExactly/analyzerCode: Fail
WebLiteralCannotBeRepresentedExactly/example: Fail
YieldAsIdentifier/example: Fail
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index cb15a5f..dea2312 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -1333,6 +1333,21 @@
Run 'pub outdated --mode=null-safety' to determine if versions of your
dependencies supporting null safety are available.
+WeakWithStrongDillLibrary:
+ template: "Loaded library is compiled with sound null safety and cannot be used in compilation for unsound null safety."
+
+StrongWithWeakDillLibrary:
+ template: "Loaded library is compiled with unsound null safety and cannot be used in compilation for sound null safety."
+
+AgnosticWithStrongDillLibrary:
+ template: "Loaded library is compiled with sound null safety and cannot be used in compilation for agnostic null safety."
+
+AgnosticWithWeakDillLibrary:
+ template: "Loaded library is compiled with unsound null safety and cannot be used in compilation for agnostic null safety."
+
+InvalidNnbdDillLibrary:
+ template: "Trying to use library with invalid null safety."
+
AbstractNotSync:
template: "Abstract methods can't use 'async', 'async*', or 'sync*'."
analyzerCode: NON_SYNC_ABSTRACT_METHOD
diff --git a/pkg/front_end/test/fasta/testing/suite.dart b/pkg/front_end/test/fasta/testing/suite.dart
index 8c4d01e..4ccb3b1 100644
--- a/pkg/front_end/test/fasta/testing/suite.dart
+++ b/pkg/front_end/test/fasta/testing/suite.dart
@@ -83,6 +83,7 @@
Library,
Member,
Node,
+ NonNullableByDefaultCompiledMode,
TreeNode,
UnevaluatedConstant,
Version,
@@ -756,7 +757,19 @@
} finally {
await generated.parent.delete(recursive: true);
}
- return process.toResult();
+ Result<int> runResult = process.toResult();
+ if (result.component.mode == NonNullableByDefaultCompiledMode.Invalid) {
+ // In this case we expect and want a runtime error.
+ if (runResult.outcome == ExpectationSet.Default["RuntimeError"]) {
+ // We convert this to pass because that's exactly what we'd expect.
+ return pass(0);
+ } else {
+ // Different outcome - that's a failure!
+ return new Result<int>(runResult.output,
+ ExpectationSet.Default["MissingRuntimeError"], runResult.error);
+ }
+ }
+ return runResult;
case "none":
case "noneWithJs":
return pass(0);
diff --git a/pkg/front_end/test/member_covariance_test.dart b/pkg/front_end/test/member_covariance_test.dart
new file mode 100644
index 0000000..6f541df
--- /dev/null
+++ b/pkg/front_end/test/member_covariance_test.dart
@@ -0,0 +1,214 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:expect/expect.dart';
+import 'package:front_end/src/fasta/kernel/kernel_ast_api.dart';
+import 'package:front_end/src/fasta/kernel/member_covariance.dart';
+
+main() {
+ void checkEquals(Covariance a, Covariance b) {
+ Expect.equals(a, b);
+ Expect.equals(a.hashCode, b.hashCode);
+ }
+
+ checkEquals(const Covariance.empty(), new Covariance.empty());
+
+ Expect.isTrue(const Covariance.empty().isEmpty);
+ Expect.isTrue(new Covariance.empty().isEmpty);
+ Expect.isTrue(new Covariance.internal(null, null, null).isEmpty);
+
+ checkEquals(
+ const Covariance.empty(), new Covariance.internal(null, null, null));
+
+ Expect.throws(() => new Covariance.internal([], null, null));
+ Expect.throws(() => new Covariance.internal([0], null, null));
+
+ checkEquals(
+ new Covariance.internal([Covariance.GenericCovariantImpl], null, null),
+ new Covariance.internal(
+ [Covariance.GenericCovariantImpl, 0], null, null));
+
+ checkEquals(new Covariance.internal([Covariance.Covariant], null, null),
+ new Covariance.internal([Covariance.Covariant, 0], null, null));
+
+ checkEquals(new Covariance.internal([0, Covariance.Covariant], null, null),
+ new Covariance.internal([0, Covariance.Covariant, 0], null, null));
+
+ Expect.throws(() => new Covariance.internal(null, {}, null));
+ Expect.throws(() => new Covariance.internal(null, {'a': 0}, null));
+
+ checkEquals(new Covariance.internal(null, {'a': Covariance.Covariant}, null),
+ new Covariance.internal(null, {'a': Covariance.Covariant}, null));
+
+ Expect.throws(() => new Covariance.internal(null, null, []));
+
+ Expect.throws(() => new Covariance.internal(null, null, [false]));
+
+ checkEquals(new Covariance.internal(null, null, [true]),
+ new Covariance.internal(null, null, [true, false]));
+
+ Covariance covariance = new Covariance.internal([
+ Covariance.Covariant,
+ Covariance.GenericCovariantImpl,
+ 0,
+ Covariance.Covariant | Covariance.GenericCovariantImpl
+ ], {
+ 'a': Covariance.Covariant,
+ 'b': Covariance.GenericCovariantImpl,
+ 'd': Covariance.Covariant | Covariance.GenericCovariantImpl
+ }, [
+ false,
+ true
+ ]);
+
+ Expect.equals(Covariance.Covariant, covariance.getPositionalVariance(0));
+ Expect.equals(
+ Covariance.GenericCovariantImpl, covariance.getPositionalVariance(1));
+ Expect.equals(0, covariance.getPositionalVariance(2));
+ Expect.equals(Covariance.Covariant | Covariance.GenericCovariantImpl,
+ covariance.getPositionalVariance(3));
+ Expect.equals(0, covariance.getPositionalVariance(4));
+
+ Expect.equals(Covariance.Covariant, covariance.getNamedVariance('a'));
+ Expect.equals(
+ Covariance.GenericCovariantImpl, covariance.getNamedVariance('b'));
+ Expect.equals(0, covariance.getNamedVariance('c'));
+ Expect.equals(Covariance.Covariant | Covariance.GenericCovariantImpl,
+ covariance.getNamedVariance('d'));
+ Expect.equals(0, covariance.getNamedVariance('e'));
+
+ Expect.isFalse(covariance.isTypeParameterGenericCovariantImpl(0));
+ Expect.isTrue(covariance.isTypeParameterGenericCovariantImpl(1));
+ Expect.isFalse(covariance.isTypeParameterGenericCovariantImpl(0));
+
+ Expect.stringEquals(
+ 'Covariance('
+ '0:Covariant,1:GenericCovariantImpl,3:GenericCovariantImpl+Covariant,'
+ 'a:Covariant,b:GenericCovariantImpl,d:GenericCovariantImpl+Covariant,'
+ 'types:1)',
+ covariance.toString());
+
+ Procedure noParameterProcedure =
+ new Procedure(null, ProcedureKind.Method, new FunctionNode(null));
+ Covariance noParameterProcedureCovariance =
+ new Covariance.fromMember(noParameterProcedure, forSetter: false);
+ Expect.isTrue(noParameterProcedureCovariance.isEmpty);
+
+ covariance.applyCovariance(noParameterProcedure);
+ noParameterProcedureCovariance =
+ new Covariance.fromMember(noParameterProcedure, forSetter: false);
+ Expect.isTrue(noParameterProcedureCovariance.isEmpty);
+
+ Procedure oneParameterProcedure = new Procedure(
+ null,
+ ProcedureKind.Method,
+ new FunctionNode(null,
+ positionalParameters: [new VariableDeclaration(null)]));
+ Covariance oneParameterProcedureCovariance =
+ new Covariance.fromMember(oneParameterProcedure, forSetter: false);
+ Expect.isTrue(oneParameterProcedureCovariance.isEmpty);
+
+ covariance.applyCovariance(oneParameterProcedure);
+ oneParameterProcedureCovariance =
+ new Covariance.fromMember(oneParameterProcedure, forSetter: false);
+ Expect.isFalse(oneParameterProcedureCovariance.isEmpty);
+ Expect.equals(new Covariance.internal([Covariance.Covariant], null, null),
+ oneParameterProcedureCovariance);
+
+ Procedure positionalParametersProcedure = new Procedure(
+ null,
+ ProcedureKind.Method,
+ new FunctionNode(null, positionalParameters: [
+ new VariableDeclaration(null),
+ new VariableDeclaration(null),
+ new VariableDeclaration(null),
+ new VariableDeclaration(null),
+ new VariableDeclaration(null)
+ ]));
+ Covariance positionalParametersProcedureCovariance =
+ new Covariance.fromMember(positionalParametersProcedure,
+ forSetter: false);
+ Expect.isTrue(positionalParametersProcedureCovariance.isEmpty);
+
+ covariance.applyCovariance(positionalParametersProcedure);
+ positionalParametersProcedureCovariance = new Covariance.fromMember(
+ positionalParametersProcedure,
+ forSetter: false);
+ Expect.isFalse(positionalParametersProcedureCovariance.isEmpty);
+ checkEquals(
+ new Covariance.internal([
+ Covariance.Covariant,
+ Covariance.GenericCovariantImpl,
+ 0,
+ Covariance.Covariant | Covariance.GenericCovariantImpl
+ ], null, null),
+ positionalParametersProcedureCovariance);
+
+ Procedure namedParametersProcedure = new Procedure(
+ null,
+ ProcedureKind.Method,
+ new FunctionNode(null, namedParameters: [
+ new VariableDeclaration('a'),
+ new VariableDeclaration('b'),
+ new VariableDeclaration('c'),
+ new VariableDeclaration('d'),
+ new VariableDeclaration('e')
+ ]));
+ Covariance namedParametersProcedureCovariance =
+ new Covariance.fromMember(namedParametersProcedure, forSetter: false);
+ Expect.isTrue(namedParametersProcedureCovariance.isEmpty);
+
+ covariance.applyCovariance(namedParametersProcedure);
+ namedParametersProcedureCovariance =
+ new Covariance.fromMember(namedParametersProcedure, forSetter: false);
+ Expect.isFalse(namedParametersProcedureCovariance.isEmpty);
+ checkEquals(
+ new Covariance.internal(
+ null,
+ {
+ 'a': Covariance.Covariant,
+ 'b': Covariance.GenericCovariantImpl,
+ 'd': Covariance.Covariant | Covariance.GenericCovariantImpl
+ },
+ null),
+ namedParametersProcedureCovariance);
+
+ Procedure typeParametersProcedure = new Procedure(
+ null,
+ ProcedureKind.Method,
+ new FunctionNode(null, typeParameters: [
+ new TypeParameter(null),
+ new TypeParameter(null),
+ new TypeParameter(null),
+ ]));
+ Covariance typeParametersProcedureCovariance =
+ new Covariance.fromMember(typeParametersProcedure, forSetter: false);
+ Expect.isTrue(typeParametersProcedureCovariance.isEmpty);
+
+ covariance.applyCovariance(typeParametersProcedure);
+ typeParametersProcedureCovariance =
+ new Covariance.fromMember(typeParametersProcedure, forSetter: false);
+ Expect.isFalse(typeParametersProcedureCovariance.isEmpty);
+ checkEquals(new Covariance.internal(null, null, [false, true]),
+ typeParametersProcedureCovariance);
+
+ Covariance merged =
+ const Covariance.empty().merge(positionalParametersProcedureCovariance);
+ checkEquals(positionalParametersProcedureCovariance, merged);
+ merged = merged.merge(namedParametersProcedureCovariance);
+ checkEquals(
+ new Covariance.internal([
+ Covariance.Covariant,
+ Covariance.GenericCovariantImpl,
+ 0,
+ Covariance.GenericCovariantImpl | Covariance.Covariant
+ ], {
+ 'a': Covariance.Covariant,
+ 'b': Covariance.GenericCovariantImpl,
+ 'd': Covariance.Covariant | Covariance.GenericCovariantImpl
+ }, null),
+ merged);
+ merged = merged.merge(typeParametersProcedureCovariance);
+ checkEquals(covariance, merged);
+}
diff --git a/pkg/front_end/test/spell_checking_list_code.txt b/pkg/front_end/test/spell_checking_list_code.txt
index 1b3dce8..a339577 100644
--- a/pkg/front_end/test/spell_checking_list_code.txt
+++ b/pkg/front_end/test/spell_checking_list_code.txt
@@ -20,6 +20,7 @@
acon
acov
across
+adi
affecting
afterwards
agree
@@ -514,6 +515,7 @@
imitate
immutability
impl
+impl+
implementers
imply
implying
@@ -592,8 +594,8 @@
lacks
lang
largest
-launcher
lattice
+launcher
layer
layout
lc
diff --git a/pkg/front_end/test/spell_checking_list_messages.txt b/pkg/front_end/test/spell_checking_list_messages.txt
index a0c8cae..324b76d 100644
--- a/pkg/front_end/test/spell_checking_list_messages.txt
+++ b/pkg/front_end/test/spell_checking_list_messages.txt
@@ -62,5 +62,6 @@
this.x
type3.#name
u
+unsound
v
x
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_29.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_29.yaml.world.1.expect
index 317d3e2..d7ee3e7 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_29.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_29.yaml.world.1.expect
@@ -33,7 +33,7 @@
this.{main::C::_#C#field5} = #t1;
}
get field6() → dart.core::int?
- return this.{main::C::_#C#field6#isSet} ?{dart.core::int?} this.{main::C::_#C#field6} : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field6' has not been initialized.");
+ return this.{main::C::_#C#field6#isSet} ?{dart.core::int?} this.{main::C::_#C#field6} : throw new dart._internal::LateError::fieldNI("field6");
set field6(dart.core::int? #t2) → void {
this.{main::C::_#C#field6#isSet} = true;
this.{main::C::_#C#field6} = #t2;
@@ -42,17 +42,17 @@
if(!this.{main::C::_#C#field7#isSet}) {
final dart.core::int? #t3 = 42;
if(this.{main::C::_#C#field7#isSet})
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field7' has been assigned during initialization.");
+ throw new dart._internal::LateError::fieldADI("field7");
this.{main::C::_#C#field7} = #t3;
this.{main::C::_#C#field7#isSet} = true;
}
return this.{main::C::_#C#field7};
}
get field8() → dart.core::int?
- return this.{main::C::_#C#field8#isSet} ?{dart.core::int?} this.{main::C::_#C#field8} : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field8' has not been initialized.");
+ return this.{main::C::_#C#field8#isSet} ?{dart.core::int?} this.{main::C::_#C#field8} : throw new dart._internal::LateError::fieldNI("field8");
set field8(dart.core::int? #t4) → void
if(this.{main::C::_#C#field8#isSet})
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field8' has already been initialized.");
+ throw new dart._internal::LateError::fieldAI("field8");
else {
this.{main::C::_#C#field8#isSet} = true;
this.{main::C::_#C#field8} = #t4;
@@ -69,7 +69,7 @@
main::C::_#field9 = #t5;
}
static get field10() → dart.core::int?
- return main::C::_#field10#isSet ?{dart.core::int?} main::C::_#field10 : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field10' has not been initialized.");
+ return main::C::_#field10#isSet ?{dart.core::int?} main::C::_#field10 : throw new dart._internal::LateError::fieldNI("field10");
static set field10(dart.core::int? #t6) → void {
main::C::_#field10#isSet = true;
main::C::_#field10 = #t6;
@@ -78,17 +78,17 @@
if(!main::C::_#field11#isSet) {
final dart.core::int? #t7 = 42;
if(main::C::_#field11#isSet)
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field11' has been assigned during initialization.");
+ throw new dart._internal::LateError::fieldADI("field11");
main::C::_#field11 = #t7;
main::C::_#field11#isSet = true;
}
return main::C::_#field11;
}
static get field12() → dart.core::int?
- return main::C::_#field12#isSet ?{dart.core::int?} main::C::_#field12 : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field12' has not been initialized.");
+ return main::C::_#field12#isSet ?{dart.core::int?} main::C::_#field12 : throw new dart._internal::LateError::fieldNI("field12");
static set field12(dart.core::int? #t8) → void
if(main::C::_#field12#isSet)
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field12' has already been initialized.");
+ throw new dart._internal::LateError::fieldAI("field12");
else {
main::C::_#field12#isSet = true;
main::C::_#field12 = #t8;
@@ -114,7 +114,7 @@
main::_#field1 = #t9;
}
static get field2() → dart.core::int?
- return main::_#field2#isSet ?{dart.core::int?} main::_#field2 : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field2' has not been initialized.");
+ return main::_#field2#isSet ?{dart.core::int?} main::_#field2 : throw new dart._internal::LateError::fieldNI("field2");
static set field2(dart.core::int? #t10) → void {
main::_#field2#isSet = true;
main::_#field2 = #t10;
@@ -123,17 +123,17 @@
if(!main::_#field3#isSet) {
final dart.core::int? #t11 = 42;
if(main::_#field3#isSet)
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field3' has been assigned during initialization.");
+ throw new dart._internal::LateError::fieldADI("field3");
main::_#field3 = #t11;
main::_#field3#isSet = true;
}
return main::_#field3;
}
static get field4() → dart.core::int?
- return main::_#field4#isSet ?{dart.core::int?} main::_#field4 : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field4' has not been initialized.");
+ return main::_#field4#isSet ?{dart.core::int?} main::_#field4 : throw new dart._internal::LateError::fieldNI("field4");
static set field4(dart.core::int? #t12) → void
if(main::_#field4#isSet)
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field4' has already been initialized.");
+ throw new dart._internal::LateError::fieldAI("field4");
else {
main::_#field4#isSet = true;
main::_#field4 = #t12;
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_29.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_29.yaml.world.2.expect
index 4e90b8f..12260c8 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_29.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_29.yaml.world.2.expect
@@ -33,7 +33,7 @@
this.{main::C::_#C#field5} = #t1;
}
get field6() → dart.core::int?
- return this.{main::C::_#C#field6#isSet} ?{dart.core::int?} this.{main::C::_#C#field6} : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field6' has not been initialized.");
+ return this.{main::C::_#C#field6#isSet} ?{dart.core::int?} this.{main::C::_#C#field6} : throw new dart._internal::LateError::fieldNI("field6");
set field6(dart.core::int? #t2) → void {
this.{main::C::_#C#field6#isSet} = true;
this.{main::C::_#C#field6} = #t2;
@@ -42,17 +42,17 @@
if(!this.{main::C::_#C#field7#isSet}) {
final dart.core::int? #t3 = 42;
if(this.{main::C::_#C#field7#isSet})
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field7' has been assigned during initialization.");
+ throw new dart._internal::LateError::fieldADI("field7");
this.{main::C::_#C#field7} = #t3;
this.{main::C::_#C#field7#isSet} = true;
}
return this.{main::C::_#C#field7};
}
get field8() → dart.core::int?
- return this.{main::C::_#C#field8#isSet} ?{dart.core::int?} this.{main::C::_#C#field8} : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field8' has not been initialized.");
+ return this.{main::C::_#C#field8#isSet} ?{dart.core::int?} this.{main::C::_#C#field8} : throw new dart._internal::LateError::fieldNI("field8");
set field8(dart.core::int? #t4) → void
if(this.{main::C::_#C#field8#isSet})
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field8' has already been initialized.");
+ throw new dart._internal::LateError::fieldAI("field8");
else {
this.{main::C::_#C#field8#isSet} = true;
this.{main::C::_#C#field8} = #t4;
@@ -69,7 +69,7 @@
main::C::_#field9 = #t5;
}
static get field10() → dart.core::int?
- return main::C::_#field10#isSet ?{dart.core::int?} main::C::_#field10 : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field10' has not been initialized.");
+ return main::C::_#field10#isSet ?{dart.core::int?} main::C::_#field10 : throw new dart._internal::LateError::fieldNI("field10");
static set field10(dart.core::int? #t6) → void {
main::C::_#field10#isSet = true;
main::C::_#field10 = #t6;
@@ -78,17 +78,17 @@
if(!main::C::_#field11#isSet) {
final dart.core::int? #t7 = 42;
if(main::C::_#field11#isSet)
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field11' has been assigned during initialization.");
+ throw new dart._internal::LateError::fieldADI("field11");
main::C::_#field11 = #t7;
main::C::_#field11#isSet = true;
}
return main::C::_#field11;
}
static get field12() → dart.core::int?
- return main::C::_#field12#isSet ?{dart.core::int?} main::C::_#field12 : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field12' has not been initialized.");
+ return main::C::_#field12#isSet ?{dart.core::int?} main::C::_#field12 : throw new dart._internal::LateError::fieldNI("field12");
static set field12(dart.core::int? #t8) → void
if(main::C::_#field12#isSet)
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field12' has already been initialized.");
+ throw new dart._internal::LateError::fieldAI("field12");
else {
main::C::_#field12#isSet = true;
main::C::_#field12 = #t8;
@@ -114,7 +114,7 @@
main::_#field1 = #t9;
}
static get field2() → dart.core::int?
- return main::_#field2#isSet ?{dart.core::int?} main::_#field2 : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field2' has not been initialized.");
+ return main::_#field2#isSet ?{dart.core::int?} main::_#field2 : throw new dart._internal::LateError::fieldNI("field2");
static set field2(dart.core::int? #t10) → void {
main::_#field2#isSet = true;
main::_#field2 = #t10;
@@ -123,17 +123,17 @@
if(!main::_#field3#isSet) {
final dart.core::int? #t11 = 42;
if(main::_#field3#isSet)
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field3' has been assigned during initialization.");
+ throw new dart._internal::LateError::fieldADI("field3");
main::_#field3 = #t11;
main::_#field3#isSet = true;
}
return main::_#field3;
}
static get field4() → dart.core::int?
- return main::_#field4#isSet ?{dart.core::int?} main::_#field4 : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field4' has not been initialized.");
+ return main::_#field4#isSet ?{dart.core::int?} main::_#field4 : throw new dart._internal::LateError::fieldNI("field4");
static set field4(dart.core::int? #t12) → void
if(main::_#field4#isSet)
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field4' has already been initialized.");
+ throw new dart._internal::LateError::fieldAI("field4");
else {
main::_#field4#isSet = true;
main::_#field4 = #t12;
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_31.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_31.yaml.world.1.expect
index a34308e..3f3bb1a 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_31.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_31.yaml.world.1.expect
@@ -51,7 +51,7 @@
main::_#field1 = #t1;
}
static get field2() → dart.core::int?
- return main::_#field2#isSet ?{dart.core::int?} main::_#field2 : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field2' has not been initialized.");
+ return main::_#field2#isSet ?{dart.core::int?} main::_#field2 : throw new dart._internal::LateError::fieldNI("field2");
static set field2(dart.core::int? #t2) → void {
main::_#field2#isSet = true;
main::_#field2 = #t2;
@@ -60,17 +60,17 @@
if(!main::_#field3#isSet) {
final dart.core::int? #t3 = 42;
if(main::_#field3#isSet)
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field3' has been assigned during initialization.");
+ throw new dart._internal::LateError::fieldADI("field3");
main::_#field3 = #t3;
main::_#field3#isSet = true;
}
return main::_#field3;
}
static get field4() → dart.core::int?
- return main::_#field4#isSet ?{dart.core::int?} main::_#field4 : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field4' has not been initialized.");
+ return main::_#field4#isSet ?{dart.core::int?} main::_#field4 : throw new dart._internal::LateError::fieldNI("field4");
static set field4(dart.core::int? #t4) → void
if(main::_#field4#isSet)
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field4' has already been initialized.");
+ throw new dart._internal::LateError::fieldAI("field4");
else {
main::_#field4#isSet = true;
main::_#field4 = #t4;
@@ -87,7 +87,7 @@
main::_#_extension#0|field5 = #t5;
}
static get _extension#0|field6() → dart.core::int?
- return main::_#_extension#0|field6#isSet ?{dart.core::int?} main::_#_extension#0|field6 : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field6' has not been initialized.");
+ return main::_#_extension#0|field6#isSet ?{dart.core::int?} main::_#_extension#0|field6 : throw new dart._internal::LateError::fieldNI("field6");
static set _extension#0|field6(dart.core::int? #t6) → void {
main::_#_extension#0|field6#isSet = true;
main::_#_extension#0|field6 = #t6;
@@ -96,17 +96,17 @@
if(!main::_#_extension#0|field7#isSet) {
final dart.core::int? #t7 = 42;
if(main::_#_extension#0|field7#isSet)
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field7' has been assigned during initialization.");
+ throw new dart._internal::LateError::fieldADI("field7");
main::_#_extension#0|field7 = #t7;
main::_#_extension#0|field7#isSet = true;
}
return main::_#_extension#0|field7;
}
static get _extension#0|field8() → dart.core::int?
- return main::_#_extension#0|field8#isSet ?{dart.core::int?} main::_#_extension#0|field8 : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field8' has not been initialized.");
+ return main::_#_extension#0|field8#isSet ?{dart.core::int?} main::_#_extension#0|field8 : throw new dart._internal::LateError::fieldNI("field8");
static set _extension#0|field8(dart.core::int? #t8) → void
if(main::_#_extension#0|field8#isSet)
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field8' has already been initialized.");
+ throw new dart._internal::LateError::fieldAI("field8");
else {
main::_#_extension#0|field8#isSet = true;
main::_#_extension#0|field8 = #t8;
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_31.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_31.yaml.world.2.expect
index 246b57d..9e27104 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_31.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_31.yaml.world.2.expect
@@ -51,7 +51,7 @@
main::_#field1 = #t1;
}
static get field2() → dart.core::int?
- return main::_#field2#isSet ?{dart.core::int?} main::_#field2 : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field2' has not been initialized.");
+ return main::_#field2#isSet ?{dart.core::int?} main::_#field2 : throw new dart._internal::LateError::fieldNI("field2");
static set field2(dart.core::int? #t2) → void {
main::_#field2#isSet = true;
main::_#field2 = #t2;
@@ -60,17 +60,17 @@
if(!main::_#field3#isSet) {
final dart.core::int? #t3 = 42;
if(main::_#field3#isSet)
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field3' has been assigned during initialization.");
+ throw new dart._internal::LateError::fieldADI("field3");
main::_#field3 = #t3;
main::_#field3#isSet = true;
}
return main::_#field3;
}
static get field4() → dart.core::int?
- return main::_#field4#isSet ?{dart.core::int?} main::_#field4 : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field4' has not been initialized.");
+ return main::_#field4#isSet ?{dart.core::int?} main::_#field4 : throw new dart._internal::LateError::fieldNI("field4");
static set field4(dart.core::int? #t4) → void
if(main::_#field4#isSet)
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field4' has already been initialized.");
+ throw new dart._internal::LateError::fieldAI("field4");
else {
main::_#field4#isSet = true;
main::_#field4 = #t4;
@@ -87,7 +87,7 @@
main::_#_extension#0|field5 = #t5;
}
static get _extension#0|field6() → dart.core::int?
- return main::_#_extension#0|field6#isSet ?{dart.core::int?} main::_#_extension#0|field6 : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field6' has not been initialized.");
+ return main::_#_extension#0|field6#isSet ?{dart.core::int?} main::_#_extension#0|field6 : throw new dart._internal::LateError::fieldNI("field6");
static set _extension#0|field6(dart.core::int? #t6) → void {
main::_#_extension#0|field6#isSet = true;
main::_#_extension#0|field6 = #t6;
@@ -96,17 +96,17 @@
if(!main::_#_extension#0|field7#isSet) {
final dart.core::int? #t7 = 42;
if(main::_#_extension#0|field7#isSet)
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field7' has been assigned during initialization.");
+ throw new dart._internal::LateError::fieldADI("field7");
main::_#_extension#0|field7 = #t7;
main::_#_extension#0|field7#isSet = true;
}
return main::_#_extension#0|field7;
}
static get _extension#0|field8() → dart.core::int?
- return main::_#_extension#0|field8#isSet ?{dart.core::int?} main::_#_extension#0|field8 : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field8' has not been initialized.");
+ return main::_#_extension#0|field8#isSet ?{dart.core::int?} main::_#_extension#0|field8 : throw new dart._internal::LateError::fieldNI("field8");
static set _extension#0|field8(dart.core::int? #t8) → void
if(main::_#_extension#0|field8#isSet)
- throw new dart._internal::LateInitializationErrorImpl::•("Field 'field8' has already been initialized.");
+ throw new dart._internal::LateError::fieldAI("field8");
else {
main::_#_extension#0|field8#isSet = true;
main::_#_extension#0|field8 = #t8;
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_41.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_41.yaml.world.1.expect
index e3247db..46264b3 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_41.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_41.yaml.world.1.expect
@@ -4,7 +4,7 @@
static field dart.core::int? _#field = null;
static field dart.core::bool _#field#isSet = false;
static get field() → dart.core::int
- return lib1::_#field#isSet ?{dart.core::int} let final dart.core::int? #t1 = lib1::_#field in #t1{dart.core::int} : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field' has not been initialized.");
+ return lib1::_#field#isSet ?{dart.core::int} let final dart.core::int? #t1 = lib1::_#field in #t1{dart.core::int} : throw new dart._internal::LateError::fieldNI("field");
static set field(dart.core::int #t2) → void {
lib1::_#field#isSet = true;
lib1::_#field = #t2;
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_41.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_41.yaml.world.2.expect
index 9b51348..d5dbbb5 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_41.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_41.yaml.world.2.expect
@@ -4,7 +4,7 @@
static field dart.core::int? _#field = null;
static field dart.core::bool _#field#isSet = false;
static get field() → dart.core::int
- return lib1::_#field#isSet ?{dart.core::int} let final dart.core::int? #t1 = lib1::_#field in #t1{dart.core::int} : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field' has not been initialized.");
+ return lib1::_#field#isSet ?{dart.core::int} let final dart.core::int? #t1 = lib1::_#field in #t1{dart.core::int} : throw new dart._internal::LateError::fieldNI("field");
static set field(dart.core::int #t2) → void {
lib1::_#field#isSet = true;
lib1::_#field = #t2;
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_41.yaml.world.3.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_41.yaml.world.3.expect
index e26c7e9..3f093e6 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_41.yaml.world.3.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_41.yaml.world.3.expect
@@ -4,7 +4,7 @@
static field dart.core::int? _#field = null;
static field dart.core::bool _#field#isSet = false;
static get field() → dart.core::int
- return lib1::_#field#isSet ?{dart.core::int} let final dart.core::int? #t1 = lib1::_#field in #t1{dart.core::int} : throw new dart._internal::LateInitializationErrorImpl::•("Field 'field' has not been initialized.");
+ return lib1::_#field#isSet ?{dart.core::int} let final dart.core::int? #t1 = lib1::_#field in #t1{dart.core::int} : throw new dart._internal::LateError::fieldNI("field");
static set field(dart.core::int #t2) → void {
lib1::_#field#isSet = true;
lib1::_#field = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/compound.dart.strong.expect b/pkg/front_end/testcases/late_lowering/compound.dart.strong.expect
index 5940e75..43cd6f1 100644
--- a/pkg/front_end/testcases/late_lowering/compound.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/compound.dart.strong.expect
@@ -13,7 +13,7 @@
static method main() → dynamic {
core::int? local1;
function #local1#get() → core::int
- return let final core::int? #t1 = local1 in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local1' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = local1 in #t1.==(null) ?{core::int} throw new _in::LateError::localNI("local1") : #t1{core::int};
function #local1#set(core::int #t2) → dynamic
return local1 = #t2;
#local1#set.call(0);
@@ -32,12 +32,12 @@
static method error() → dynamic {
final core::int? local;
function #local#get() → core::int
- return let final core::int? #t5 = local in #t5.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local' has not been initialized.") : #t5{core::int};
+ return let final core::int? #t5 = local in #t5.==(null) ?{core::int} throw new _in::LateError::localNI("local") : #t5{core::int};
function #local#set(core::int #t6) → dynamic
if(local.==(null))
return local = #t6;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local' has already been initialized.");
+ throw new _in::LateError::localAI("local");
#local#set.call((let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/late_lowering/compound.dart:20:3: Error: Late variable 'local' without initializer is definitely unassigned.
local += 0;
^^^^^" in #local#get.call()).{core::num::+}(0));
diff --git a/pkg/front_end/testcases/late_lowering/compound.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/compound.dart.strong.transformed.expect
index 5940e75..43cd6f1 100644
--- a/pkg/front_end/testcases/late_lowering/compound.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/compound.dart.strong.transformed.expect
@@ -13,7 +13,7 @@
static method main() → dynamic {
core::int? local1;
function #local1#get() → core::int
- return let final core::int? #t1 = local1 in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local1' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = local1 in #t1.==(null) ?{core::int} throw new _in::LateError::localNI("local1") : #t1{core::int};
function #local1#set(core::int #t2) → dynamic
return local1 = #t2;
#local1#set.call(0);
@@ -32,12 +32,12 @@
static method error() → dynamic {
final core::int? local;
function #local#get() → core::int
- return let final core::int? #t5 = local in #t5.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local' has not been initialized.") : #t5{core::int};
+ return let final core::int? #t5 = local in #t5.==(null) ?{core::int} throw new _in::LateError::localNI("local") : #t5{core::int};
function #local#set(core::int #t6) → dynamic
if(local.==(null))
return local = #t6;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local' has already been initialized.");
+ throw new _in::LateError::localAI("local");
#local#set.call((let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/late_lowering/compound.dart:20:3: Error: Late variable 'local' without initializer is definitely unassigned.
local += 0;
^^^^^" in #local#get.call()).{core::num::+}(0));
diff --git a/pkg/front_end/testcases/late_lowering/compound.dart.weak.expect b/pkg/front_end/testcases/late_lowering/compound.dart.weak.expect
index b568136..991bc7a 100644
--- a/pkg/front_end/testcases/late_lowering/compound.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/compound.dart.weak.expect
@@ -14,7 +14,7 @@
core::int? local1;
core::bool #local1#isSet = false;
function #local1#get() → core::int
- return #local1#isSet ?{core::int} local1{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local1' has not been initialized.");
+ return #local1#isSet ?{core::int} local1{core::int} : throw new _in::LateError::localNI("local1");
function #local1#set(core::int #t1) → dynamic {
#local1#isSet = true;
return local1 = #t1;
@@ -44,10 +44,10 @@
final core::int? local;
core::bool #local#isSet = false;
function #local#get() → core::int
- return #local#isSet ?{core::int} local{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local' has not been initialized.");
+ return #local#isSet ?{core::int} local{core::int} : throw new _in::LateError::localNI("local");
function #local#set(core::int #t3) → dynamic
if(#local#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local' has already been initialized.");
+ throw new _in::LateError::localAI("local");
else {
#local#isSet = true;
return local = #t3;
diff --git a/pkg/front_end/testcases/late_lowering/compound.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/compound.dart.weak.transformed.expect
index b568136..991bc7a 100644
--- a/pkg/front_end/testcases/late_lowering/compound.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/compound.dart.weak.transformed.expect
@@ -14,7 +14,7 @@
core::int? local1;
core::bool #local1#isSet = false;
function #local1#get() → core::int
- return #local1#isSet ?{core::int} local1{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local1' has not been initialized.");
+ return #local1#isSet ?{core::int} local1{core::int} : throw new _in::LateError::localNI("local1");
function #local1#set(core::int #t1) → dynamic {
#local1#isSet = true;
return local1 = #t1;
@@ -44,10 +44,10 @@
final core::int? local;
core::bool #local#isSet = false;
function #local#get() → core::int
- return #local#isSet ?{core::int} local{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local' has not been initialized.");
+ return #local#isSet ?{core::int} local{core::int} : throw new _in::LateError::localNI("local");
function #local#set(core::int #t3) → dynamic
if(#local#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local' has already been initialized.");
+ throw new _in::LateError::localAI("local");
else {
#local#isSet = true;
return local = #t3;
diff --git a/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.strong.expect b/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.strong.expect
index 0d317bf..4a03bd6 100644
--- a/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.strong.expect
@@ -21,11 +21,11 @@
: super core::Object::•()
;
get invariantField() → core::num
- return let final core::num? #t1 = this.{self::A::_#A#invariantField} in #t1.==(null) ?{core::num} throw new _in::LateInitializationErrorImpl::•("Field 'invariantField' has not been initialized.") : #t1{core::num};
+ return let final core::num? #t1 = this.{self::A::_#A#invariantField} in #t1.==(null) ?{core::num} throw new _in::LateError::fieldNI("invariantField") : #t1{core::num};
set invariantField(core::num #t2) → void
this.{self::A::_#A#invariantField} = #t2;
get covariantField() → core::num
- return let final core::num? #t3 = this.{self::A::_#A#covariantField} in #t3.==(null) ?{core::num} throw new _in::LateInitializationErrorImpl::•("Field 'covariantField' has not been initialized.") : #t3{core::num};
+ return let final core::num? #t3 = this.{self::A::_#A#covariantField} in #t3.==(null) ?{core::num} throw new _in::LateError::fieldNI("covariantField") : #t3{core::num};
set covariantField(covariant core::num #t4) → void
this.{self::A::_#A#covariantField} = #t4;
}
diff --git a/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.weak.expect b/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.weak.expect
index 6bf2ce0..1ef4b89 100644
--- a/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.weak.expect
@@ -23,13 +23,13 @@
: super core::Object::•()
;
get invariantField() → core::num
- return this.{self::A::_#A#invariantField#isSet} ?{core::num} let final core::num? #t1 = this.{self::A::_#A#invariantField} in #t1{core::num} : throw new _in::LateInitializationErrorImpl::•("Field 'invariantField' has not been initialized.");
+ return this.{self::A::_#A#invariantField#isSet} ?{core::num} let final core::num? #t1 = this.{self::A::_#A#invariantField} in #t1{core::num} : throw new _in::LateError::fieldNI("invariantField");
set invariantField(core::num #t2) → void {
this.{self::A::_#A#invariantField#isSet} = true;
this.{self::A::_#A#invariantField} = #t2;
}
get covariantField() → core::num
- return this.{self::A::_#A#covariantField#isSet} ?{core::num} let final core::num? #t3 = this.{self::A::_#A#covariantField} in #t3{core::num} : throw new _in::LateInitializationErrorImpl::•("Field 'covariantField' has not been initialized.");
+ return this.{self::A::_#A#covariantField#isSet} ?{core::num} let final core::num? #t3 = this.{self::A::_#A#covariantField} in #t3{core::num} : throw new _in::LateError::fieldNI("covariantField");
set covariantField(covariant core::num #t4) → void {
this.{self::A::_#A#covariantField#isSet} = true;
this.{self::A::_#A#covariantField} = #t4;
diff --git a/pkg/front_end/testcases/late_lowering/definitely_assigned.dart.strong.expect b/pkg/front_end/testcases/late_lowering/definitely_assigned.dart.strong.expect
index 7c2c33b..3ef6e6c 100644
--- a/pkg/front_end/testcases/late_lowering/definitely_assigned.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/definitely_assigned.dart.strong.expect
@@ -68,30 +68,30 @@
final T? local2;
core::bool #local2#isSet = false;
function #local2#get() → T%
- return #local2#isSet ?{T%} local2{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{T%} local2{T%} : throw new _in::LateError::localNI("local2");
function #local2#set(T% #t1) → dynamic
if(#local2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local2' has already been initialized.");
+ throw new _in::LateError::localAI("local2");
else {
#local2#isSet = true;
return local2 = #t1;
}
final core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t2 = local4 in #t2.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t2{core::int};
+ return let final core::int? #t2 = local4 in #t2.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t2{core::int};
function #local4#set(core::int #t3) → dynamic
if(local4.==(null))
return local4 = #t3;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
final FutureOr<core::int>? local6;
function #local6#get() → FutureOr<core::int>
- return let final FutureOr<core::int>? #t4 = local6 in #t4.==(null) ?{FutureOr<core::int>} throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.") : #t4{FutureOr<core::int>};
+ return let final FutureOr<core::int>? #t4 = local6 in #t4.==(null) ?{FutureOr<core::int>} throw new _in::LateError::localNI("local6") : #t4{FutureOr<core::int>};
function #local6#set(FutureOr<core::int>#t5) → dynamic
if(local6.==(null))
return local6 = #t5;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local6' has already been initialized.");
+ throw new _in::LateError::localAI("local6");
#local2#set.call(value);
#local4#set.call(0);
#local6#set.call(0);
@@ -109,30 +109,30 @@
final T? local2;
core::bool #local2#isSet = false;
function #local2#get() → T%
- return #local2#isSet ?{T%} local2{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{T%} local2{T%} : throw new _in::LateError::localNI("local2");
function #local2#set(T% #t9) → dynamic
if(#local2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local2' has already been initialized.");
+ throw new _in::LateError::localAI("local2");
else {
#local2#isSet = true;
return local2 = #t9;
}
final core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t10 = local4 in #t10.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t10{core::int};
+ return let final core::int? #t10 = local4 in #t10.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t10{core::int};
function #local4#set(core::int #t11) → dynamic
if(local4.==(null))
return local4 = #t11;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
final FutureOr<core::int>? local6;
function #local6#get() → FutureOr<core::int>
- return let final FutureOr<core::int>? #t12 = local6 in #t12.==(null) ?{FutureOr<core::int>} throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.") : #t12{FutureOr<core::int>};
+ return let final FutureOr<core::int>? #t12 = local6 in #t12.==(null) ?{FutureOr<core::int>} throw new _in::LateError::localNI("local6") : #t12{FutureOr<core::int>};
function #local6#set(FutureOr<core::int>#t13) → dynamic
if(local6.==(null))
return local6 = #t13;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local6' has already been initialized.");
+ throw new _in::LateError::localAI("local6");
if(b) {
#local2#set.call(value);
#local4#set.call(0);
@@ -154,12 +154,12 @@
static field () → core::Null? fieldCompound = () → core::Null? {
final core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t17 = local4 in #t17.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t17{core::int};
+ return let final core::int? #t17 = local4 in #t17.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t17{core::int};
function #local4#set(core::int #t18) → dynamic
if(local4.==(null))
return local4 = #t18;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
#local4#set.call(0);
let final<BottomType> #t19 = invalid-expression "pkg/front_end/testcases/late_lowering/definitely_assigned.dart:88:3: Error: Late final variable 'local4' definitely assigned.
local4 += 0; // error
@@ -169,30 +169,30 @@
final self::methodDirect::T? local2;
core::bool #local2#isSet = false;
function #local2#get() → self::methodDirect::T%
- return #local2#isSet ?{self::methodDirect::T%} local2{self::methodDirect::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{self::methodDirect::T%} local2{self::methodDirect::T%} : throw new _in::LateError::localNI("local2");
function #local2#set(self::methodDirect::T% #t20) → dynamic
if(#local2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local2' has already been initialized.");
+ throw new _in::LateError::localAI("local2");
else {
#local2#isSet = true;
return local2 = #t20;
}
final core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t21 = local4 in #t21.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t21{core::int};
+ return let final core::int? #t21 = local4 in #t21.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t21{core::int};
function #local4#set(core::int #t22) → dynamic
if(local4.==(null))
return local4 = #t22;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
final FutureOr<core::int>? local6;
function #local6#get() → FutureOr<core::int>
- return let final FutureOr<core::int>? #t23 = local6 in #t23.==(null) ?{FutureOr<core::int>} throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.") : #t23{FutureOr<core::int>};
+ return let final FutureOr<core::int>? #t23 = local6 in #t23.==(null) ?{FutureOr<core::int>} throw new _in::LateError::localNI("local6") : #t23{FutureOr<core::int>};
function #local6#set(FutureOr<core::int>#t24) → dynamic
if(local6.==(null))
return local6 = #t24;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local6' has already been initialized.");
+ throw new _in::LateError::localAI("local6");
#local2#set.call(value);
#local4#set.call(0);
#local6#set.call(0);
@@ -210,30 +210,30 @@
final self::methodConditional::T? local2;
core::bool #local2#isSet = false;
function #local2#get() → self::methodConditional::T%
- return #local2#isSet ?{self::methodConditional::T%} local2{self::methodConditional::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{self::methodConditional::T%} local2{self::methodConditional::T%} : throw new _in::LateError::localNI("local2");
function #local2#set(self::methodConditional::T% #t28) → dynamic
if(#local2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local2' has already been initialized.");
+ throw new _in::LateError::localAI("local2");
else {
#local2#isSet = true;
return local2 = #t28;
}
final core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t29 = local4 in #t29.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t29{core::int};
+ return let final core::int? #t29 = local4 in #t29.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t29{core::int};
function #local4#set(core::int #t30) → dynamic
if(local4.==(null))
return local4 = #t30;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
final FutureOr<core::int>? local6;
function #local6#get() → FutureOr<core::int>
- return let final FutureOr<core::int>? #t31 = local6 in #t31.==(null) ?{FutureOr<core::int>} throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.") : #t31{FutureOr<core::int>};
+ return let final FutureOr<core::int>? #t31 = local6 in #t31.==(null) ?{FutureOr<core::int>} throw new _in::LateError::localNI("local6") : #t31{FutureOr<core::int>};
function #local6#set(FutureOr<core::int>#t32) → dynamic
if(local6.==(null))
return local6 = #t32;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local6' has already been initialized.");
+ throw new _in::LateError::localAI("local6");
if(b) {
#local2#set.call(value);
#local4#set.call(0);
@@ -255,12 +255,12 @@
static method methodCompound() → dynamic {
final core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t36 = local4 in #t36.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t36{core::int};
+ return let final core::int? #t36 = local4 in #t36.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t36{core::int};
function #local4#set(core::int #t37) → dynamic
if(local4.==(null))
return local4 = #t37;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
#local4#set.call(0);
let final<BottomType> #t38 = invalid-expression "pkg/front_end/testcases/late_lowering/definitely_assigned.dart:80:3: Error: Late final variable 'local4' definitely assigned.
local4 += 0; // error
diff --git a/pkg/front_end/testcases/late_lowering/definitely_assigned.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/definitely_assigned.dart.strong.transformed.expect
index 7c2c33b..3ef6e6c 100644
--- a/pkg/front_end/testcases/late_lowering/definitely_assigned.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/definitely_assigned.dart.strong.transformed.expect
@@ -68,30 +68,30 @@
final T? local2;
core::bool #local2#isSet = false;
function #local2#get() → T%
- return #local2#isSet ?{T%} local2{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{T%} local2{T%} : throw new _in::LateError::localNI("local2");
function #local2#set(T% #t1) → dynamic
if(#local2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local2' has already been initialized.");
+ throw new _in::LateError::localAI("local2");
else {
#local2#isSet = true;
return local2 = #t1;
}
final core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t2 = local4 in #t2.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t2{core::int};
+ return let final core::int? #t2 = local4 in #t2.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t2{core::int};
function #local4#set(core::int #t3) → dynamic
if(local4.==(null))
return local4 = #t3;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
final FutureOr<core::int>? local6;
function #local6#get() → FutureOr<core::int>
- return let final FutureOr<core::int>? #t4 = local6 in #t4.==(null) ?{FutureOr<core::int>} throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.") : #t4{FutureOr<core::int>};
+ return let final FutureOr<core::int>? #t4 = local6 in #t4.==(null) ?{FutureOr<core::int>} throw new _in::LateError::localNI("local6") : #t4{FutureOr<core::int>};
function #local6#set(FutureOr<core::int>#t5) → dynamic
if(local6.==(null))
return local6 = #t5;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local6' has already been initialized.");
+ throw new _in::LateError::localAI("local6");
#local2#set.call(value);
#local4#set.call(0);
#local6#set.call(0);
@@ -109,30 +109,30 @@
final T? local2;
core::bool #local2#isSet = false;
function #local2#get() → T%
- return #local2#isSet ?{T%} local2{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{T%} local2{T%} : throw new _in::LateError::localNI("local2");
function #local2#set(T% #t9) → dynamic
if(#local2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local2' has already been initialized.");
+ throw new _in::LateError::localAI("local2");
else {
#local2#isSet = true;
return local2 = #t9;
}
final core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t10 = local4 in #t10.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t10{core::int};
+ return let final core::int? #t10 = local4 in #t10.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t10{core::int};
function #local4#set(core::int #t11) → dynamic
if(local4.==(null))
return local4 = #t11;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
final FutureOr<core::int>? local6;
function #local6#get() → FutureOr<core::int>
- return let final FutureOr<core::int>? #t12 = local6 in #t12.==(null) ?{FutureOr<core::int>} throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.") : #t12{FutureOr<core::int>};
+ return let final FutureOr<core::int>? #t12 = local6 in #t12.==(null) ?{FutureOr<core::int>} throw new _in::LateError::localNI("local6") : #t12{FutureOr<core::int>};
function #local6#set(FutureOr<core::int>#t13) → dynamic
if(local6.==(null))
return local6 = #t13;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local6' has already been initialized.");
+ throw new _in::LateError::localAI("local6");
if(b) {
#local2#set.call(value);
#local4#set.call(0);
@@ -154,12 +154,12 @@
static field () → core::Null? fieldCompound = () → core::Null? {
final core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t17 = local4 in #t17.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t17{core::int};
+ return let final core::int? #t17 = local4 in #t17.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t17{core::int};
function #local4#set(core::int #t18) → dynamic
if(local4.==(null))
return local4 = #t18;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
#local4#set.call(0);
let final<BottomType> #t19 = invalid-expression "pkg/front_end/testcases/late_lowering/definitely_assigned.dart:88:3: Error: Late final variable 'local4' definitely assigned.
local4 += 0; // error
@@ -169,30 +169,30 @@
final self::methodDirect::T? local2;
core::bool #local2#isSet = false;
function #local2#get() → self::methodDirect::T%
- return #local2#isSet ?{self::methodDirect::T%} local2{self::methodDirect::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{self::methodDirect::T%} local2{self::methodDirect::T%} : throw new _in::LateError::localNI("local2");
function #local2#set(self::methodDirect::T% #t20) → dynamic
if(#local2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local2' has already been initialized.");
+ throw new _in::LateError::localAI("local2");
else {
#local2#isSet = true;
return local2 = #t20;
}
final core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t21 = local4 in #t21.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t21{core::int};
+ return let final core::int? #t21 = local4 in #t21.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t21{core::int};
function #local4#set(core::int #t22) → dynamic
if(local4.==(null))
return local4 = #t22;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
final FutureOr<core::int>? local6;
function #local6#get() → FutureOr<core::int>
- return let final FutureOr<core::int>? #t23 = local6 in #t23.==(null) ?{FutureOr<core::int>} throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.") : #t23{FutureOr<core::int>};
+ return let final FutureOr<core::int>? #t23 = local6 in #t23.==(null) ?{FutureOr<core::int>} throw new _in::LateError::localNI("local6") : #t23{FutureOr<core::int>};
function #local6#set(FutureOr<core::int>#t24) → dynamic
if(local6.==(null))
return local6 = #t24;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local6' has already been initialized.");
+ throw new _in::LateError::localAI("local6");
#local2#set.call(value);
#local4#set.call(0);
#local6#set.call(0);
@@ -210,30 +210,30 @@
final self::methodConditional::T? local2;
core::bool #local2#isSet = false;
function #local2#get() → self::methodConditional::T%
- return #local2#isSet ?{self::methodConditional::T%} local2{self::methodConditional::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{self::methodConditional::T%} local2{self::methodConditional::T%} : throw new _in::LateError::localNI("local2");
function #local2#set(self::methodConditional::T% #t28) → dynamic
if(#local2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local2' has already been initialized.");
+ throw new _in::LateError::localAI("local2");
else {
#local2#isSet = true;
return local2 = #t28;
}
final core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t29 = local4 in #t29.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t29{core::int};
+ return let final core::int? #t29 = local4 in #t29.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t29{core::int};
function #local4#set(core::int #t30) → dynamic
if(local4.==(null))
return local4 = #t30;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
final FutureOr<core::int>? local6;
function #local6#get() → FutureOr<core::int>
- return let final FutureOr<core::int>? #t31 = local6 in #t31.==(null) ?{FutureOr<core::int>} throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.") : #t31{FutureOr<core::int>};
+ return let final FutureOr<core::int>? #t31 = local6 in #t31.==(null) ?{FutureOr<core::int>} throw new _in::LateError::localNI("local6") : #t31{FutureOr<core::int>};
function #local6#set(FutureOr<core::int>#t32) → dynamic
if(local6.==(null))
return local6 = #t32;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local6' has already been initialized.");
+ throw new _in::LateError::localAI("local6");
if(b) {
#local2#set.call(value);
#local4#set.call(0);
@@ -255,12 +255,12 @@
static method methodCompound() → dynamic {
final core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t36 = local4 in #t36.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t36{core::int};
+ return let final core::int? #t36 = local4 in #t36.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t36{core::int};
function #local4#set(core::int #t37) → dynamic
if(local4.==(null))
return local4 = #t37;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
#local4#set.call(0);
let final<BottomType> #t38 = invalid-expression "pkg/front_end/testcases/late_lowering/definitely_assigned.dart:80:3: Error: Late final variable 'local4' definitely assigned.
local4 += 0; // error
diff --git a/pkg/front_end/testcases/late_lowering/definitely_assigned.dart.weak.expect b/pkg/front_end/testcases/late_lowering/definitely_assigned.dart.weak.expect
index fcbfeb4..20cf2a00 100644
--- a/pkg/front_end/testcases/late_lowering/definitely_assigned.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/definitely_assigned.dart.weak.expect
@@ -68,10 +68,10 @@
final T? local2;
core::bool #local2#isSet = false;
function #local2#get() → T%
- return #local2#isSet ?{T%} local2{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{T%} local2{T%} : throw new _in::LateError::localNI("local2");
function #local2#set(T% #t1) → dynamic
if(#local2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local2' has already been initialized.");
+ throw new _in::LateError::localAI("local2");
else {
#local2#isSet = true;
return local2 = #t1;
@@ -79,10 +79,10 @@
final core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t2) → dynamic
if(#local4#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
else {
#local4#isSet = true;
return local4 = #t2;
@@ -90,10 +90,10 @@
final FutureOr<core::int>? local6;
core::bool #local6#isSet = false;
function #local6#get() → FutureOr<core::int>
- return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.");
+ return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateError::localNI("local6");
function #local6#set(FutureOr<core::int>#t3) → dynamic
if(#local6#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local6' has already been initialized.");
+ throw new _in::LateError::localAI("local6");
else {
#local6#isSet = true;
return local6 = #t3;
@@ -115,10 +115,10 @@
final T? local2;
core::bool #local2#isSet = false;
function #local2#get() → T%
- return #local2#isSet ?{T%} local2{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{T%} local2{T%} : throw new _in::LateError::localNI("local2");
function #local2#set(T% #t7) → dynamic
if(#local2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local2' has already been initialized.");
+ throw new _in::LateError::localAI("local2");
else {
#local2#isSet = true;
return local2 = #t7;
@@ -126,10 +126,10 @@
final core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t8) → dynamic
if(#local4#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
else {
#local4#isSet = true;
return local4 = #t8;
@@ -137,10 +137,10 @@
final FutureOr<core::int>? local6;
core::bool #local6#isSet = false;
function #local6#get() → FutureOr<core::int>
- return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.");
+ return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateError::localNI("local6");
function #local6#set(FutureOr<core::int>#t9) → dynamic
if(#local6#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local6' has already been initialized.");
+ throw new _in::LateError::localAI("local6");
else {
#local6#isSet = true;
return local6 = #t9;
@@ -167,10 +167,10 @@
final core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t13) → dynamic
if(#local4#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
else {
#local4#isSet = true;
return local4 = #t13;
@@ -184,10 +184,10 @@
final self::methodDirect::T? local2;
core::bool #local2#isSet = false;
function #local2#get() → self::methodDirect::T%
- return #local2#isSet ?{self::methodDirect::T%} local2{self::methodDirect::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{self::methodDirect::T%} local2{self::methodDirect::T%} : throw new _in::LateError::localNI("local2");
function #local2#set(self::methodDirect::T% #t15) → dynamic
if(#local2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local2' has already been initialized.");
+ throw new _in::LateError::localAI("local2");
else {
#local2#isSet = true;
return local2 = #t15;
@@ -195,10 +195,10 @@
final core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t16) → dynamic
if(#local4#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
else {
#local4#isSet = true;
return local4 = #t16;
@@ -206,10 +206,10 @@
final FutureOr<core::int>? local6;
core::bool #local6#isSet = false;
function #local6#get() → FutureOr<core::int>
- return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.");
+ return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateError::localNI("local6");
function #local6#set(FutureOr<core::int>#t17) → dynamic
if(#local6#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local6' has already been initialized.");
+ throw new _in::LateError::localAI("local6");
else {
#local6#isSet = true;
return local6 = #t17;
@@ -231,10 +231,10 @@
final self::methodConditional::T? local2;
core::bool #local2#isSet = false;
function #local2#get() → self::methodConditional::T%
- return #local2#isSet ?{self::methodConditional::T%} local2{self::methodConditional::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{self::methodConditional::T%} local2{self::methodConditional::T%} : throw new _in::LateError::localNI("local2");
function #local2#set(self::methodConditional::T% #t21) → dynamic
if(#local2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local2' has already been initialized.");
+ throw new _in::LateError::localAI("local2");
else {
#local2#isSet = true;
return local2 = #t21;
@@ -242,10 +242,10 @@
final core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t22) → dynamic
if(#local4#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
else {
#local4#isSet = true;
return local4 = #t22;
@@ -253,10 +253,10 @@
final FutureOr<core::int>? local6;
core::bool #local6#isSet = false;
function #local6#get() → FutureOr<core::int>
- return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.");
+ return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateError::localNI("local6");
function #local6#set(FutureOr<core::int>#t23) → dynamic
if(#local6#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local6' has already been initialized.");
+ throw new _in::LateError::localAI("local6");
else {
#local6#isSet = true;
return local6 = #t23;
@@ -283,10 +283,10 @@
final core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t27) → dynamic
if(#local4#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
else {
#local4#isSet = true;
return local4 = #t27;
diff --git a/pkg/front_end/testcases/late_lowering/definitely_assigned.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/definitely_assigned.dart.weak.transformed.expect
index fcbfeb4..20cf2a00 100644
--- a/pkg/front_end/testcases/late_lowering/definitely_assigned.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/definitely_assigned.dart.weak.transformed.expect
@@ -68,10 +68,10 @@
final T? local2;
core::bool #local2#isSet = false;
function #local2#get() → T%
- return #local2#isSet ?{T%} local2{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{T%} local2{T%} : throw new _in::LateError::localNI("local2");
function #local2#set(T% #t1) → dynamic
if(#local2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local2' has already been initialized.");
+ throw new _in::LateError::localAI("local2");
else {
#local2#isSet = true;
return local2 = #t1;
@@ -79,10 +79,10 @@
final core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t2) → dynamic
if(#local4#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
else {
#local4#isSet = true;
return local4 = #t2;
@@ -90,10 +90,10 @@
final FutureOr<core::int>? local6;
core::bool #local6#isSet = false;
function #local6#get() → FutureOr<core::int>
- return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.");
+ return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateError::localNI("local6");
function #local6#set(FutureOr<core::int>#t3) → dynamic
if(#local6#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local6' has already been initialized.");
+ throw new _in::LateError::localAI("local6");
else {
#local6#isSet = true;
return local6 = #t3;
@@ -115,10 +115,10 @@
final T? local2;
core::bool #local2#isSet = false;
function #local2#get() → T%
- return #local2#isSet ?{T%} local2{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{T%} local2{T%} : throw new _in::LateError::localNI("local2");
function #local2#set(T% #t7) → dynamic
if(#local2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local2' has already been initialized.");
+ throw new _in::LateError::localAI("local2");
else {
#local2#isSet = true;
return local2 = #t7;
@@ -126,10 +126,10 @@
final core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t8) → dynamic
if(#local4#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
else {
#local4#isSet = true;
return local4 = #t8;
@@ -137,10 +137,10 @@
final FutureOr<core::int>? local6;
core::bool #local6#isSet = false;
function #local6#get() → FutureOr<core::int>
- return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.");
+ return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateError::localNI("local6");
function #local6#set(FutureOr<core::int>#t9) → dynamic
if(#local6#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local6' has already been initialized.");
+ throw new _in::LateError::localAI("local6");
else {
#local6#isSet = true;
return local6 = #t9;
@@ -167,10 +167,10 @@
final core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t13) → dynamic
if(#local4#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
else {
#local4#isSet = true;
return local4 = #t13;
@@ -184,10 +184,10 @@
final self::methodDirect::T? local2;
core::bool #local2#isSet = false;
function #local2#get() → self::methodDirect::T%
- return #local2#isSet ?{self::methodDirect::T%} local2{self::methodDirect::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{self::methodDirect::T%} local2{self::methodDirect::T%} : throw new _in::LateError::localNI("local2");
function #local2#set(self::methodDirect::T% #t15) → dynamic
if(#local2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local2' has already been initialized.");
+ throw new _in::LateError::localAI("local2");
else {
#local2#isSet = true;
return local2 = #t15;
@@ -195,10 +195,10 @@
final core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t16) → dynamic
if(#local4#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
else {
#local4#isSet = true;
return local4 = #t16;
@@ -206,10 +206,10 @@
final FutureOr<core::int>? local6;
core::bool #local6#isSet = false;
function #local6#get() → FutureOr<core::int>
- return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.");
+ return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateError::localNI("local6");
function #local6#set(FutureOr<core::int>#t17) → dynamic
if(#local6#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local6' has already been initialized.");
+ throw new _in::LateError::localAI("local6");
else {
#local6#isSet = true;
return local6 = #t17;
@@ -231,10 +231,10 @@
final self::methodConditional::T? local2;
core::bool #local2#isSet = false;
function #local2#get() → self::methodConditional::T%
- return #local2#isSet ?{self::methodConditional::T%} local2{self::methodConditional::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{self::methodConditional::T%} local2{self::methodConditional::T%} : throw new _in::LateError::localNI("local2");
function #local2#set(self::methodConditional::T% #t21) → dynamic
if(#local2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local2' has already been initialized.");
+ throw new _in::LateError::localAI("local2");
else {
#local2#isSet = true;
return local2 = #t21;
@@ -242,10 +242,10 @@
final core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t22) → dynamic
if(#local4#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
else {
#local4#isSet = true;
return local4 = #t22;
@@ -253,10 +253,10 @@
final FutureOr<core::int>? local6;
core::bool #local6#isSet = false;
function #local6#get() → FutureOr<core::int>
- return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.");
+ return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateError::localNI("local6");
function #local6#set(FutureOr<core::int>#t23) → dynamic
if(#local6#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local6' has already been initialized.");
+ throw new _in::LateError::localAI("local6");
else {
#local6#isSet = true;
return local6 = #t23;
@@ -283,10 +283,10 @@
final core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t27) → dynamic
if(#local4#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'local4' has already been initialized.");
+ throw new _in::LateError::localAI("local4");
else {
#local4#isSet = true;
return local4 = #t27;
diff --git a/pkg/front_end/testcases/late_lowering/definitely_unassigned.dart.strong.expect b/pkg/front_end/testcases/late_lowering/definitely_unassigned.dart.strong.expect
index 2ebcbaf..00d7254 100644
--- a/pkg/front_end/testcases/late_lowering/definitely_unassigned.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/definitely_unassigned.dart.strong.expect
@@ -101,7 +101,7 @@
T? local2;
core::bool #local2#isSet = false;
function #local2#get() → T%
- return #local2#isSet ?{T%} local2{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{T%} local2{T%} : throw new _in::LateError::localNI("local2");
function #local2#set(T% #t1) → dynamic {
#local2#isSet = true;
return local2 = #t1;
@@ -109,13 +109,13 @@
core::int local3;
core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t2 = local4 in #t2.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t2{core::int};
+ return let final core::int? #t2 = local4 in #t2.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t2{core::int};
function #local4#set(core::int #t3) → dynamic
return local4 = #t3;
FutureOr<core::int>local5;
FutureOr<core::int>? local6;
function #local6#get() → FutureOr<core::int>
- return let final FutureOr<core::int>? #t4 = local6 in #t4.==(null) ?{FutureOr<core::int>} throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.") : #t4{FutureOr<core::int>};
+ return let final FutureOr<core::int>? #t4 = local6 in #t4.==(null) ?{FutureOr<core::int>} throw new _in::LateError::localNI("local6") : #t4{FutureOr<core::int>};
function #local6#set(FutureOr<core::int>#t5) → dynamic
return local6 = #t5;
T? local7;
@@ -156,7 +156,7 @@
T? local2;
core::bool #local2#isSet = false;
function #local2#get() → T%
- return #local2#isSet ?{T%} local2{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{T%} local2{T%} : throw new _in::LateError::localNI("local2");
function #local2#set(T% #t13) → dynamic {
#local2#isSet = true;
return local2 = #t13;
@@ -164,13 +164,13 @@
core::int local3;
core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t14 = local4 in #t14.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t14{core::int};
+ return let final core::int? #t14 = local4 in #t14.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t14{core::int};
function #local4#set(core::int #t15) → dynamic
return local4 = #t15;
FutureOr<core::int>local5;
FutureOr<core::int>? local6;
function #local6#get() → FutureOr<core::int>
- return let final FutureOr<core::int>? #t16 = local6 in #t16.==(null) ?{FutureOr<core::int>} throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.") : #t16{FutureOr<core::int>};
+ return let final FutureOr<core::int>? #t16 = local6 in #t16.==(null) ?{FutureOr<core::int>} throw new _in::LateError::localNI("local6") : #t16{FutureOr<core::int>};
function #local6#set(FutureOr<core::int>#t17) → dynamic
return local6 = #t17;
T? local7;
@@ -213,7 +213,7 @@
core::int local3;
core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t22 = local4 in #t22.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t22{core::int};
+ return let final core::int? #t22 = local4 in #t22.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t22{core::int};
function #local4#set(core::int #t23) → dynamic
return local4 = #t23;
local3 = (let final<BottomType> #t24 = invalid-expression "pkg/front_end/testcases/late_lowering/definitely_unassigned.dart:111:3: Error: Non-nullable variable 'local3' must be assigned before it can be used.
@@ -228,7 +228,7 @@
self::methodDirect::T? local2;
core::bool #local2#isSet = false;
function #local2#get() → self::methodDirect::T%
- return #local2#isSet ?{self::methodDirect::T%} local2{self::methodDirect::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{self::methodDirect::T%} local2{self::methodDirect::T%} : throw new _in::LateError::localNI("local2");
function #local2#set(self::methodDirect::T% #t26) → dynamic {
#local2#isSet = true;
return local2 = #t26;
@@ -236,13 +236,13 @@
core::int local3;
core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t27 = local4 in #t27.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t27{core::int};
+ return let final core::int? #t27 = local4 in #t27.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t27{core::int};
function #local4#set(core::int #t28) → dynamic
return local4 = #t28;
FutureOr<core::int>local5;
FutureOr<core::int>? local6;
function #local6#get() → FutureOr<core::int>
- return let final FutureOr<core::int>? #t29 = local6 in #t29.==(null) ?{FutureOr<core::int>} throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.") : #t29{FutureOr<core::int>};
+ return let final FutureOr<core::int>? #t29 = local6 in #t29.==(null) ?{FutureOr<core::int>} throw new _in::LateError::localNI("local6") : #t29{FutureOr<core::int>};
function #local6#set(FutureOr<core::int>#t30) → dynamic
return local6 = #t30;
self::methodDirect::T? local7;
@@ -283,7 +283,7 @@
self::methodConditional::T? local2;
core::bool #local2#isSet = false;
function #local2#get() → self::methodConditional::T%
- return #local2#isSet ?{self::methodConditional::T%} local2{self::methodConditional::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{self::methodConditional::T%} local2{self::methodConditional::T%} : throw new _in::LateError::localNI("local2");
function #local2#set(self::methodConditional::T% #t38) → dynamic {
#local2#isSet = true;
return local2 = #t38;
@@ -291,13 +291,13 @@
core::int local3;
core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t39 = local4 in #t39.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t39{core::int};
+ return let final core::int? #t39 = local4 in #t39.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t39{core::int};
function #local4#set(core::int #t40) → dynamic
return local4 = #t40;
FutureOr<core::int>local5;
FutureOr<core::int>? local6;
function #local6#get() → FutureOr<core::int>
- return let final FutureOr<core::int>? #t41 = local6 in #t41.==(null) ?{FutureOr<core::int>} throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.") : #t41{FutureOr<core::int>};
+ return let final FutureOr<core::int>? #t41 = local6 in #t41.==(null) ?{FutureOr<core::int>} throw new _in::LateError::localNI("local6") : #t41{FutureOr<core::int>};
function #local6#set(FutureOr<core::int>#t42) → dynamic
return local6 = #t42;
self::methodConditional::T? local7;
@@ -340,7 +340,7 @@
core::int local3;
core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t47 = local4 in #t47.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t47{core::int};
+ return let final core::int? #t47 = local4 in #t47.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t47{core::int};
function #local4#set(core::int #t48) → dynamic
return local4 = #t48;
local3 = (let final<BottomType> #t49 = invalid-expression "pkg/front_end/testcases/late_lowering/definitely_unassigned.dart:103:3: Error: Non-nullable variable 'local3' must be assigned before it can be used.
diff --git a/pkg/front_end/testcases/late_lowering/definitely_unassigned.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/definitely_unassigned.dart.strong.transformed.expect
index 2ebcbaf..00d7254 100644
--- a/pkg/front_end/testcases/late_lowering/definitely_unassigned.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/definitely_unassigned.dart.strong.transformed.expect
@@ -101,7 +101,7 @@
T? local2;
core::bool #local2#isSet = false;
function #local2#get() → T%
- return #local2#isSet ?{T%} local2{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{T%} local2{T%} : throw new _in::LateError::localNI("local2");
function #local2#set(T% #t1) → dynamic {
#local2#isSet = true;
return local2 = #t1;
@@ -109,13 +109,13 @@
core::int local3;
core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t2 = local4 in #t2.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t2{core::int};
+ return let final core::int? #t2 = local4 in #t2.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t2{core::int};
function #local4#set(core::int #t3) → dynamic
return local4 = #t3;
FutureOr<core::int>local5;
FutureOr<core::int>? local6;
function #local6#get() → FutureOr<core::int>
- return let final FutureOr<core::int>? #t4 = local6 in #t4.==(null) ?{FutureOr<core::int>} throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.") : #t4{FutureOr<core::int>};
+ return let final FutureOr<core::int>? #t4 = local6 in #t4.==(null) ?{FutureOr<core::int>} throw new _in::LateError::localNI("local6") : #t4{FutureOr<core::int>};
function #local6#set(FutureOr<core::int>#t5) → dynamic
return local6 = #t5;
T? local7;
@@ -156,7 +156,7 @@
T? local2;
core::bool #local2#isSet = false;
function #local2#get() → T%
- return #local2#isSet ?{T%} local2{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{T%} local2{T%} : throw new _in::LateError::localNI("local2");
function #local2#set(T% #t13) → dynamic {
#local2#isSet = true;
return local2 = #t13;
@@ -164,13 +164,13 @@
core::int local3;
core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t14 = local4 in #t14.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t14{core::int};
+ return let final core::int? #t14 = local4 in #t14.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t14{core::int};
function #local4#set(core::int #t15) → dynamic
return local4 = #t15;
FutureOr<core::int>local5;
FutureOr<core::int>? local6;
function #local6#get() → FutureOr<core::int>
- return let final FutureOr<core::int>? #t16 = local6 in #t16.==(null) ?{FutureOr<core::int>} throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.") : #t16{FutureOr<core::int>};
+ return let final FutureOr<core::int>? #t16 = local6 in #t16.==(null) ?{FutureOr<core::int>} throw new _in::LateError::localNI("local6") : #t16{FutureOr<core::int>};
function #local6#set(FutureOr<core::int>#t17) → dynamic
return local6 = #t17;
T? local7;
@@ -213,7 +213,7 @@
core::int local3;
core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t22 = local4 in #t22.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t22{core::int};
+ return let final core::int? #t22 = local4 in #t22.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t22{core::int};
function #local4#set(core::int #t23) → dynamic
return local4 = #t23;
local3 = (let final<BottomType> #t24 = invalid-expression "pkg/front_end/testcases/late_lowering/definitely_unassigned.dart:111:3: Error: Non-nullable variable 'local3' must be assigned before it can be used.
@@ -228,7 +228,7 @@
self::methodDirect::T? local2;
core::bool #local2#isSet = false;
function #local2#get() → self::methodDirect::T%
- return #local2#isSet ?{self::methodDirect::T%} local2{self::methodDirect::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{self::methodDirect::T%} local2{self::methodDirect::T%} : throw new _in::LateError::localNI("local2");
function #local2#set(self::methodDirect::T% #t26) → dynamic {
#local2#isSet = true;
return local2 = #t26;
@@ -236,13 +236,13 @@
core::int local3;
core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t27 = local4 in #t27.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t27{core::int};
+ return let final core::int? #t27 = local4 in #t27.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t27{core::int};
function #local4#set(core::int #t28) → dynamic
return local4 = #t28;
FutureOr<core::int>local5;
FutureOr<core::int>? local6;
function #local6#get() → FutureOr<core::int>
- return let final FutureOr<core::int>? #t29 = local6 in #t29.==(null) ?{FutureOr<core::int>} throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.") : #t29{FutureOr<core::int>};
+ return let final FutureOr<core::int>? #t29 = local6 in #t29.==(null) ?{FutureOr<core::int>} throw new _in::LateError::localNI("local6") : #t29{FutureOr<core::int>};
function #local6#set(FutureOr<core::int>#t30) → dynamic
return local6 = #t30;
self::methodDirect::T? local7;
@@ -283,7 +283,7 @@
self::methodConditional::T? local2;
core::bool #local2#isSet = false;
function #local2#get() → self::methodConditional::T%
- return #local2#isSet ?{self::methodConditional::T%} local2{self::methodConditional::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{self::methodConditional::T%} local2{self::methodConditional::T%} : throw new _in::LateError::localNI("local2");
function #local2#set(self::methodConditional::T% #t38) → dynamic {
#local2#isSet = true;
return local2 = #t38;
@@ -291,13 +291,13 @@
core::int local3;
core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t39 = local4 in #t39.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t39{core::int};
+ return let final core::int? #t39 = local4 in #t39.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t39{core::int};
function #local4#set(core::int #t40) → dynamic
return local4 = #t40;
FutureOr<core::int>local5;
FutureOr<core::int>? local6;
function #local6#get() → FutureOr<core::int>
- return let final FutureOr<core::int>? #t41 = local6 in #t41.==(null) ?{FutureOr<core::int>} throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.") : #t41{FutureOr<core::int>};
+ return let final FutureOr<core::int>? #t41 = local6 in #t41.==(null) ?{FutureOr<core::int>} throw new _in::LateError::localNI("local6") : #t41{FutureOr<core::int>};
function #local6#set(FutureOr<core::int>#t42) → dynamic
return local6 = #t42;
self::methodConditional::T? local7;
@@ -340,7 +340,7 @@
core::int local3;
core::int? local4;
function #local4#get() → core::int
- return let final core::int? #t47 = local4 in #t47.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.") : #t47{core::int};
+ return let final core::int? #t47 = local4 in #t47.==(null) ?{core::int} throw new _in::LateError::localNI("local4") : #t47{core::int};
function #local4#set(core::int #t48) → dynamic
return local4 = #t48;
local3 = (let final<BottomType> #t49 = invalid-expression "pkg/front_end/testcases/late_lowering/definitely_unassigned.dart:103:3: Error: Non-nullable variable 'local3' must be assigned before it can be used.
diff --git a/pkg/front_end/testcases/late_lowering/definitely_unassigned.dart.weak.expect b/pkg/front_end/testcases/late_lowering/definitely_unassigned.dart.weak.expect
index bc917d2..c162162 100644
--- a/pkg/front_end/testcases/late_lowering/definitely_unassigned.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/definitely_unassigned.dart.weak.expect
@@ -101,7 +101,7 @@
T? local2;
core::bool #local2#isSet = false;
function #local2#get() → T%
- return #local2#isSet ?{T%} local2{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{T%} local2{T%} : throw new _in::LateError::localNI("local2");
function #local2#set(T% #t1) → dynamic {
#local2#isSet = true;
return local2 = #t1;
@@ -110,7 +110,7 @@
core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t2) → dynamic {
#local4#isSet = true;
return local4 = #t2;
@@ -119,7 +119,7 @@
FutureOr<core::int>? local6;
core::bool #local6#isSet = false;
function #local6#get() → FutureOr<core::int>
- return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.");
+ return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateError::localNI("local6");
function #local6#set(FutureOr<core::int>#t3) → dynamic {
#local6#isSet = true;
return local6 = #t3;
@@ -162,7 +162,7 @@
T? local2;
core::bool #local2#isSet = false;
function #local2#get() → T%
- return #local2#isSet ?{T%} local2{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{T%} local2{T%} : throw new _in::LateError::localNI("local2");
function #local2#set(T% #t11) → dynamic {
#local2#isSet = true;
return local2 = #t11;
@@ -171,7 +171,7 @@
core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t12) → dynamic {
#local4#isSet = true;
return local4 = #t12;
@@ -180,7 +180,7 @@
FutureOr<core::int>? local6;
core::bool #local6#isSet = false;
function #local6#get() → FutureOr<core::int>
- return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.");
+ return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateError::localNI("local6");
function #local6#set(FutureOr<core::int>#t13) → dynamic {
#local6#isSet = true;
return local6 = #t13;
@@ -226,7 +226,7 @@
core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t18) → dynamic {
#local4#isSet = true;
return local4 = #t18;
@@ -243,7 +243,7 @@
self::methodDirect::T? local2;
core::bool #local2#isSet = false;
function #local2#get() → self::methodDirect::T%
- return #local2#isSet ?{self::methodDirect::T%} local2{self::methodDirect::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{self::methodDirect::T%} local2{self::methodDirect::T%} : throw new _in::LateError::localNI("local2");
function #local2#set(self::methodDirect::T% #t21) → dynamic {
#local2#isSet = true;
return local2 = #t21;
@@ -252,7 +252,7 @@
core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t22) → dynamic {
#local4#isSet = true;
return local4 = #t22;
@@ -261,7 +261,7 @@
FutureOr<core::int>? local6;
core::bool #local6#isSet = false;
function #local6#get() → FutureOr<core::int>
- return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.");
+ return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateError::localNI("local6");
function #local6#set(FutureOr<core::int>#t23) → dynamic {
#local6#isSet = true;
return local6 = #t23;
@@ -304,7 +304,7 @@
self::methodConditional::T? local2;
core::bool #local2#isSet = false;
function #local2#get() → self::methodConditional::T%
- return #local2#isSet ?{self::methodConditional::T%} local2{self::methodConditional::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{self::methodConditional::T%} local2{self::methodConditional::T%} : throw new _in::LateError::localNI("local2");
function #local2#set(self::methodConditional::T% #t31) → dynamic {
#local2#isSet = true;
return local2 = #t31;
@@ -313,7 +313,7 @@
core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t32) → dynamic {
#local4#isSet = true;
return local4 = #t32;
@@ -322,7 +322,7 @@
FutureOr<core::int>? local6;
core::bool #local6#isSet = false;
function #local6#get() → FutureOr<core::int>
- return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.");
+ return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateError::localNI("local6");
function #local6#set(FutureOr<core::int>#t33) → dynamic {
#local6#isSet = true;
return local6 = #t33;
@@ -368,7 +368,7 @@
core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t38) → dynamic {
#local4#isSet = true;
return local4 = #t38;
diff --git a/pkg/front_end/testcases/late_lowering/definitely_unassigned.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/definitely_unassigned.dart.weak.transformed.expect
index bc917d2..c162162 100644
--- a/pkg/front_end/testcases/late_lowering/definitely_unassigned.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/definitely_unassigned.dart.weak.transformed.expect
@@ -101,7 +101,7 @@
T? local2;
core::bool #local2#isSet = false;
function #local2#get() → T%
- return #local2#isSet ?{T%} local2{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{T%} local2{T%} : throw new _in::LateError::localNI("local2");
function #local2#set(T% #t1) → dynamic {
#local2#isSet = true;
return local2 = #t1;
@@ -110,7 +110,7 @@
core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t2) → dynamic {
#local4#isSet = true;
return local4 = #t2;
@@ -119,7 +119,7 @@
FutureOr<core::int>? local6;
core::bool #local6#isSet = false;
function #local6#get() → FutureOr<core::int>
- return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.");
+ return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateError::localNI("local6");
function #local6#set(FutureOr<core::int>#t3) → dynamic {
#local6#isSet = true;
return local6 = #t3;
@@ -162,7 +162,7 @@
T? local2;
core::bool #local2#isSet = false;
function #local2#get() → T%
- return #local2#isSet ?{T%} local2{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{T%} local2{T%} : throw new _in::LateError::localNI("local2");
function #local2#set(T% #t11) → dynamic {
#local2#isSet = true;
return local2 = #t11;
@@ -171,7 +171,7 @@
core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t12) → dynamic {
#local4#isSet = true;
return local4 = #t12;
@@ -180,7 +180,7 @@
FutureOr<core::int>? local6;
core::bool #local6#isSet = false;
function #local6#get() → FutureOr<core::int>
- return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.");
+ return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateError::localNI("local6");
function #local6#set(FutureOr<core::int>#t13) → dynamic {
#local6#isSet = true;
return local6 = #t13;
@@ -226,7 +226,7 @@
core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t18) → dynamic {
#local4#isSet = true;
return local4 = #t18;
@@ -243,7 +243,7 @@
self::methodDirect::T? local2;
core::bool #local2#isSet = false;
function #local2#get() → self::methodDirect::T%
- return #local2#isSet ?{self::methodDirect::T%} local2{self::methodDirect::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{self::methodDirect::T%} local2{self::methodDirect::T%} : throw new _in::LateError::localNI("local2");
function #local2#set(self::methodDirect::T% #t21) → dynamic {
#local2#isSet = true;
return local2 = #t21;
@@ -252,7 +252,7 @@
core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t22) → dynamic {
#local4#isSet = true;
return local4 = #t22;
@@ -261,7 +261,7 @@
FutureOr<core::int>? local6;
core::bool #local6#isSet = false;
function #local6#get() → FutureOr<core::int>
- return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.");
+ return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateError::localNI("local6");
function #local6#set(FutureOr<core::int>#t23) → dynamic {
#local6#isSet = true;
return local6 = #t23;
@@ -304,7 +304,7 @@
self::methodConditional::T? local2;
core::bool #local2#isSet = false;
function #local2#get() → self::methodConditional::T%
- return #local2#isSet ?{self::methodConditional::T%} local2{self::methodConditional::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{self::methodConditional::T%} local2{self::methodConditional::T%} : throw new _in::LateError::localNI("local2");
function #local2#set(self::methodConditional::T% #t31) → dynamic {
#local2#isSet = true;
return local2 = #t31;
@@ -313,7 +313,7 @@
core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t32) → dynamic {
#local4#isSet = true;
return local4 = #t32;
@@ -322,7 +322,7 @@
FutureOr<core::int>? local6;
core::bool #local6#isSet = false;
function #local6#get() → FutureOr<core::int>
- return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateInitializationErrorImpl::•("Local 'local6' has not been initialized.");
+ return #local6#isSet ?{FutureOr<core::int>} local6{FutureOr<core::int>} : throw new _in::LateError::localNI("local6");
function #local6#set(FutureOr<core::int>#t33) → dynamic {
#local6#isSet = true;
return local6 = #t33;
@@ -368,7 +368,7 @@
core::int? local4;
core::bool #local4#isSet = false;
function #local4#get() → core::int
- return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{core::int} local4{core::int} : throw new _in::LateError::localNI("local4");
function #local4#set(core::int #t38) → dynamic {
#local4#isSet = true;
return local4 = #t38;
diff --git a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.expect b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.expect
index 9248820..1e3b9c1 100644
--- a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.expect
@@ -45,17 +45,17 @@
: self::A::_#A#property4 = property4, self::A::_#A#property5#isSet = true, self::A::_#A#property5 = property5, self::A::_#A#property6 = property6, super core::Object::•()
;
get property4() → core::int
- return let final core::int? #t1 = this.{self::A::_#A#property4} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::A::_#A#property4} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("property4") : #t1{core::int};
set property4(core::int #t2) → void
this.{self::A::_#A#property4} = #t2;
get property5() → core::int?
- return this.{self::A::_#A#property5#isSet} ?{core::int?} this.{self::A::_#A#property5} : throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.");
+ return this.{self::A::_#A#property5#isSet} ?{core::int?} this.{self::A::_#A#property5} : throw new _in::LateError::fieldNI("property5");
set property5(core::int? #t3) → void {
this.{self::A::_#A#property5#isSet} = true;
this.{self::A::_#A#property5} = #t3;
}
get property6() → core::int
- return let final core::int? #t4 = this.{self::A::_#A#property6} in #t4.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.") : #t4{core::int};
+ return let final core::int? #t4 = this.{self::A::_#A#property6} in #t4.==(null) ?{core::int} throw new _in::LateError::fieldNI("property6") : #t4{core::int};
set property6(covariant core::int #t5) → void
this.{self::A::_#A#property6} = #t5;
}
@@ -68,24 +68,24 @@
: self::B1::_#B1#property4 = property4, self::B1::_#B1#property5 = property5, self::B1::_#B1#property6#isSet = true, self::B1::_#B1#property6 = property6, super core::Object::•()
;
get property4() → core::int
- return let final core::int? #t6 = this.{self::B1::_#B1#property4} in #t6.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.") : #t6{core::int};
+ return let final core::int? #t6 = this.{self::B1::_#B1#property4} in #t6.==(null) ?{core::int} throw new _in::LateError::fieldNI("property4") : #t6{core::int};
set property4(core::int #t7) → void
if(this.{self::B1::_#B1#property4}.==(null))
this.{self::B1::_#B1#property4} = #t7;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'property4' has already been initialized.");
+ throw new _in::LateError::fieldAI("property4");
get property5() → core::int
- return let final core::int? #t8 = this.{self::B1::_#B1#property5} in #t8.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.") : #t8{core::int};
+ return let final core::int? #t8 = this.{self::B1::_#B1#property5} in #t8.==(null) ?{core::int} throw new _in::LateError::fieldNI("property5") : #t8{core::int};
set property5(core::int #t9) → void
if(this.{self::B1::_#B1#property5}.==(null))
this.{self::B1::_#B1#property5} = #t9;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'property5' has already been initialized.");
+ throw new _in::LateError::fieldAI("property5");
get property6() → core::int?
- return this.{self::B1::_#B1#property6#isSet} ?{core::int?} this.{self::B1::_#B1#property6} : throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.");
+ return this.{self::B1::_#B1#property6#isSet} ?{core::int?} this.{self::B1::_#B1#property6} : throw new _in::LateError::fieldNI("property6");
set property6(core::int? #t10) → void
if(this.{self::B1::_#B1#property6#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'property6' has already been initialized.");
+ throw new _in::LateError::fieldAI("property6");
else {
this.{self::B1::_#B1#property6#isSet} = true;
this.{self::B1::_#B1#property6} = #t10;
@@ -107,15 +107,15 @@
: self::C1::_#C1#property4 = property4, self::C1::_#C1#property5 = property5, self::C1::_#C1#property6 = property6, super core::Object::•()
;
get property4() → core::int
- return let final core::int? #t11 = this.{self::C1::_#C1#property4} in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.") : #t11{core::int};
+ return let final core::int? #t11 = this.{self::C1::_#C1#property4} in #t11.==(null) ?{core::int} throw new _in::LateError::fieldNI("property4") : #t11{core::int};
set property4(core::int #t12) → void
this.{self::C1::_#C1#property4} = #t12;
get property5() → core::int
- return let final core::int? #t13 = this.{self::C1::_#C1#property5} in #t13.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.") : #t13{core::int};
+ return let final core::int? #t13 = this.{self::C1::_#C1#property5} in #t13.==(null) ?{core::int} throw new _in::LateError::fieldNI("property5") : #t13{core::int};
set property5(core::int #t14) → void
this.{self::C1::_#C1#property5} = #t14;
get property6() → core::int
- return let final core::int? #t15 = this.{self::C1::_#C1#property6} in #t15.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.") : #t15{core::int};
+ return let final core::int? #t15 = this.{self::C1::_#C1#property6} in #t15.==(null) ?{core::int} throw new _in::LateError::fieldNI("property6") : #t15{core::int};
set property6(core::int #t16) → void
this.{self::C1::_#C1#property6} = #t16;
}
diff --git a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.transformed.expect
index 9248820..1e3b9c1 100644
--- a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.transformed.expect
@@ -45,17 +45,17 @@
: self::A::_#A#property4 = property4, self::A::_#A#property5#isSet = true, self::A::_#A#property5 = property5, self::A::_#A#property6 = property6, super core::Object::•()
;
get property4() → core::int
- return let final core::int? #t1 = this.{self::A::_#A#property4} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::A::_#A#property4} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("property4") : #t1{core::int};
set property4(core::int #t2) → void
this.{self::A::_#A#property4} = #t2;
get property5() → core::int?
- return this.{self::A::_#A#property5#isSet} ?{core::int?} this.{self::A::_#A#property5} : throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.");
+ return this.{self::A::_#A#property5#isSet} ?{core::int?} this.{self::A::_#A#property5} : throw new _in::LateError::fieldNI("property5");
set property5(core::int? #t3) → void {
this.{self::A::_#A#property5#isSet} = true;
this.{self::A::_#A#property5} = #t3;
}
get property6() → core::int
- return let final core::int? #t4 = this.{self::A::_#A#property6} in #t4.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.") : #t4{core::int};
+ return let final core::int? #t4 = this.{self::A::_#A#property6} in #t4.==(null) ?{core::int} throw new _in::LateError::fieldNI("property6") : #t4{core::int};
set property6(covariant core::int #t5) → void
this.{self::A::_#A#property6} = #t5;
}
@@ -68,24 +68,24 @@
: self::B1::_#B1#property4 = property4, self::B1::_#B1#property5 = property5, self::B1::_#B1#property6#isSet = true, self::B1::_#B1#property6 = property6, super core::Object::•()
;
get property4() → core::int
- return let final core::int? #t6 = this.{self::B1::_#B1#property4} in #t6.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.") : #t6{core::int};
+ return let final core::int? #t6 = this.{self::B1::_#B1#property4} in #t6.==(null) ?{core::int} throw new _in::LateError::fieldNI("property4") : #t6{core::int};
set property4(core::int #t7) → void
if(this.{self::B1::_#B1#property4}.==(null))
this.{self::B1::_#B1#property4} = #t7;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'property4' has already been initialized.");
+ throw new _in::LateError::fieldAI("property4");
get property5() → core::int
- return let final core::int? #t8 = this.{self::B1::_#B1#property5} in #t8.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.") : #t8{core::int};
+ return let final core::int? #t8 = this.{self::B1::_#B1#property5} in #t8.==(null) ?{core::int} throw new _in::LateError::fieldNI("property5") : #t8{core::int};
set property5(core::int #t9) → void
if(this.{self::B1::_#B1#property5}.==(null))
this.{self::B1::_#B1#property5} = #t9;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'property5' has already been initialized.");
+ throw new _in::LateError::fieldAI("property5");
get property6() → core::int?
- return this.{self::B1::_#B1#property6#isSet} ?{core::int?} this.{self::B1::_#B1#property6} : throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.");
+ return this.{self::B1::_#B1#property6#isSet} ?{core::int?} this.{self::B1::_#B1#property6} : throw new _in::LateError::fieldNI("property6");
set property6(core::int? #t10) → void
if(this.{self::B1::_#B1#property6#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'property6' has already been initialized.");
+ throw new _in::LateError::fieldAI("property6");
else {
this.{self::B1::_#B1#property6#isSet} = true;
this.{self::B1::_#B1#property6} = #t10;
@@ -107,15 +107,15 @@
: self::C1::_#C1#property4 = property4, self::C1::_#C1#property5 = property5, self::C1::_#C1#property6 = property6, super core::Object::•()
;
get property4() → core::int
- return let final core::int? #t11 = this.{self::C1::_#C1#property4} in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.") : #t11{core::int};
+ return let final core::int? #t11 = this.{self::C1::_#C1#property4} in #t11.==(null) ?{core::int} throw new _in::LateError::fieldNI("property4") : #t11{core::int};
set property4(core::int #t12) → void
this.{self::C1::_#C1#property4} = #t12;
get property5() → core::int
- return let final core::int? #t13 = this.{self::C1::_#C1#property5} in #t13.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.") : #t13{core::int};
+ return let final core::int? #t13 = this.{self::C1::_#C1#property5} in #t13.==(null) ?{core::int} throw new _in::LateError::fieldNI("property5") : #t13{core::int};
set property5(core::int #t14) → void
this.{self::C1::_#C1#property5} = #t14;
get property6() → core::int
- return let final core::int? #t15 = this.{self::C1::_#C1#property6} in #t15.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.") : #t15{core::int};
+ return let final core::int? #t15 = this.{self::C1::_#C1#property6} in #t15.==(null) ?{core::int} throw new _in::LateError::fieldNI("property6") : #t15{core::int};
set property6(core::int #t16) → void
this.{self::C1::_#C1#property6} = #t16;
}
diff --git a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.expect b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.expect
index 7dd79a4..f3ffff6 100644
--- a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.expect
@@ -47,19 +47,19 @@
: self::A::_#A#property4#isSet = true, self::A::_#A#property4 = property4, self::A::_#A#property5#isSet = true, self::A::_#A#property5 = property5, self::A::_#A#property6#isSet = true, self::A::_#A#property6 = property6, super core::Object::•()
;
get property4() → core::int
- return this.{self::A::_#A#property4#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#property4} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.");
+ return this.{self::A::_#A#property4#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#property4} in #t1{core::int} : throw new _in::LateError::fieldNI("property4");
set property4(core::int #t2) → void {
this.{self::A::_#A#property4#isSet} = true;
this.{self::A::_#A#property4} = #t2;
}
get property5() → core::int?
- return this.{self::A::_#A#property5#isSet} ?{core::int?} this.{self::A::_#A#property5} : throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.");
+ return this.{self::A::_#A#property5#isSet} ?{core::int?} this.{self::A::_#A#property5} : throw new _in::LateError::fieldNI("property5");
set property5(core::int? #t3) → void {
this.{self::A::_#A#property5#isSet} = true;
this.{self::A::_#A#property5} = #t3;
}
get property6() → core::int
- return this.{self::A::_#A#property6#isSet} ?{core::int} let final core::int? #t4 = this.{self::A::_#A#property6} in #t4{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.");
+ return this.{self::A::_#A#property6#isSet} ?{core::int} let final core::int? #t4 = this.{self::A::_#A#property6} in #t4{core::int} : throw new _in::LateError::fieldNI("property6");
set property6(covariant core::int #t5) → void {
this.{self::A::_#A#property6#isSet} = true;
this.{self::A::_#A#property6} = #t5;
@@ -76,28 +76,28 @@
: self::B1::_#B1#property4#isSet = true, self::B1::_#B1#property4 = property4, self::B1::_#B1#property5#isSet = true, self::B1::_#B1#property5 = property5, self::B1::_#B1#property6#isSet = true, self::B1::_#B1#property6 = property6, super core::Object::•()
;
get property4() → core::int
- return this.{self::B1::_#B1#property4#isSet} ?{core::int} let final core::int? #t6 = this.{self::B1::_#B1#property4} in #t6{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.");
+ return this.{self::B1::_#B1#property4#isSet} ?{core::int} let final core::int? #t6 = this.{self::B1::_#B1#property4} in #t6{core::int} : throw new _in::LateError::fieldNI("property4");
set property4(core::int #t7) → void
if(this.{self::B1::_#B1#property4#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'property4' has already been initialized.");
+ throw new _in::LateError::fieldAI("property4");
else {
this.{self::B1::_#B1#property4#isSet} = true;
this.{self::B1::_#B1#property4} = #t7;
}
get property5() → core::int
- return this.{self::B1::_#B1#property5#isSet} ?{core::int} let final core::int? #t8 = this.{self::B1::_#B1#property5} in #t8{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.");
+ return this.{self::B1::_#B1#property5#isSet} ?{core::int} let final core::int? #t8 = this.{self::B1::_#B1#property5} in #t8{core::int} : throw new _in::LateError::fieldNI("property5");
set property5(core::int #t9) → void
if(this.{self::B1::_#B1#property5#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'property5' has already been initialized.");
+ throw new _in::LateError::fieldAI("property5");
else {
this.{self::B1::_#B1#property5#isSet} = true;
this.{self::B1::_#B1#property5} = #t9;
}
get property6() → core::int?
- return this.{self::B1::_#B1#property6#isSet} ?{core::int?} this.{self::B1::_#B1#property6} : throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.");
+ return this.{self::B1::_#B1#property6#isSet} ?{core::int?} this.{self::B1::_#B1#property6} : throw new _in::LateError::fieldNI("property6");
set property6(core::int? #t10) → void
if(this.{self::B1::_#B1#property6#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'property6' has already been initialized.");
+ throw new _in::LateError::fieldAI("property6");
else {
this.{self::B1::_#B1#property6#isSet} = true;
this.{self::B1::_#B1#property6} = #t10;
@@ -122,19 +122,19 @@
: self::C1::_#C1#property4#isSet = true, self::C1::_#C1#property4 = property4, self::C1::_#C1#property5#isSet = true, self::C1::_#C1#property5 = property5, self::C1::_#C1#property6#isSet = true, self::C1::_#C1#property6 = property6, super core::Object::•()
;
get property4() → core::int
- return this.{self::C1::_#C1#property4#isSet} ?{core::int} let final core::int? #t11 = this.{self::C1::_#C1#property4} in #t11{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.");
+ return this.{self::C1::_#C1#property4#isSet} ?{core::int} let final core::int? #t11 = this.{self::C1::_#C1#property4} in #t11{core::int} : throw new _in::LateError::fieldNI("property4");
set property4(core::int #t12) → void {
this.{self::C1::_#C1#property4#isSet} = true;
this.{self::C1::_#C1#property4} = #t12;
}
get property5() → core::int
- return this.{self::C1::_#C1#property5#isSet} ?{core::int} let final core::int? #t13 = this.{self::C1::_#C1#property5} in #t13{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.");
+ return this.{self::C1::_#C1#property5#isSet} ?{core::int} let final core::int? #t13 = this.{self::C1::_#C1#property5} in #t13{core::int} : throw new _in::LateError::fieldNI("property5");
set property5(core::int #t14) → void {
this.{self::C1::_#C1#property5#isSet} = true;
this.{self::C1::_#C1#property5} = #t14;
}
get property6() → core::int
- return this.{self::C1::_#C1#property6#isSet} ?{core::int} let final core::int? #t15 = this.{self::C1::_#C1#property6} in #t15{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.");
+ return this.{self::C1::_#C1#property6#isSet} ?{core::int} let final core::int? #t15 = this.{self::C1::_#C1#property6} in #t15{core::int} : throw new _in::LateError::fieldNI("property6");
set property6(core::int #t16) → void {
this.{self::C1::_#C1#property6#isSet} = true;
this.{self::C1::_#C1#property6} = #t16;
diff --git a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.transformed.expect
index 7dd79a4..f3ffff6 100644
--- a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.transformed.expect
@@ -47,19 +47,19 @@
: self::A::_#A#property4#isSet = true, self::A::_#A#property4 = property4, self::A::_#A#property5#isSet = true, self::A::_#A#property5 = property5, self::A::_#A#property6#isSet = true, self::A::_#A#property6 = property6, super core::Object::•()
;
get property4() → core::int
- return this.{self::A::_#A#property4#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#property4} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.");
+ return this.{self::A::_#A#property4#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#property4} in #t1{core::int} : throw new _in::LateError::fieldNI("property4");
set property4(core::int #t2) → void {
this.{self::A::_#A#property4#isSet} = true;
this.{self::A::_#A#property4} = #t2;
}
get property5() → core::int?
- return this.{self::A::_#A#property5#isSet} ?{core::int?} this.{self::A::_#A#property5} : throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.");
+ return this.{self::A::_#A#property5#isSet} ?{core::int?} this.{self::A::_#A#property5} : throw new _in::LateError::fieldNI("property5");
set property5(core::int? #t3) → void {
this.{self::A::_#A#property5#isSet} = true;
this.{self::A::_#A#property5} = #t3;
}
get property6() → core::int
- return this.{self::A::_#A#property6#isSet} ?{core::int} let final core::int? #t4 = this.{self::A::_#A#property6} in #t4{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.");
+ return this.{self::A::_#A#property6#isSet} ?{core::int} let final core::int? #t4 = this.{self::A::_#A#property6} in #t4{core::int} : throw new _in::LateError::fieldNI("property6");
set property6(covariant core::int #t5) → void {
this.{self::A::_#A#property6#isSet} = true;
this.{self::A::_#A#property6} = #t5;
@@ -76,28 +76,28 @@
: self::B1::_#B1#property4#isSet = true, self::B1::_#B1#property4 = property4, self::B1::_#B1#property5#isSet = true, self::B1::_#B1#property5 = property5, self::B1::_#B1#property6#isSet = true, self::B1::_#B1#property6 = property6, super core::Object::•()
;
get property4() → core::int
- return this.{self::B1::_#B1#property4#isSet} ?{core::int} let final core::int? #t6 = this.{self::B1::_#B1#property4} in #t6{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.");
+ return this.{self::B1::_#B1#property4#isSet} ?{core::int} let final core::int? #t6 = this.{self::B1::_#B1#property4} in #t6{core::int} : throw new _in::LateError::fieldNI("property4");
set property4(core::int #t7) → void
if(this.{self::B1::_#B1#property4#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'property4' has already been initialized.");
+ throw new _in::LateError::fieldAI("property4");
else {
this.{self::B1::_#B1#property4#isSet} = true;
this.{self::B1::_#B1#property4} = #t7;
}
get property5() → core::int
- return this.{self::B1::_#B1#property5#isSet} ?{core::int} let final core::int? #t8 = this.{self::B1::_#B1#property5} in #t8{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.");
+ return this.{self::B1::_#B1#property5#isSet} ?{core::int} let final core::int? #t8 = this.{self::B1::_#B1#property5} in #t8{core::int} : throw new _in::LateError::fieldNI("property5");
set property5(core::int #t9) → void
if(this.{self::B1::_#B1#property5#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'property5' has already been initialized.");
+ throw new _in::LateError::fieldAI("property5");
else {
this.{self::B1::_#B1#property5#isSet} = true;
this.{self::B1::_#B1#property5} = #t9;
}
get property6() → core::int?
- return this.{self::B1::_#B1#property6#isSet} ?{core::int?} this.{self::B1::_#B1#property6} : throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.");
+ return this.{self::B1::_#B1#property6#isSet} ?{core::int?} this.{self::B1::_#B1#property6} : throw new _in::LateError::fieldNI("property6");
set property6(core::int? #t10) → void
if(this.{self::B1::_#B1#property6#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'property6' has already been initialized.");
+ throw new _in::LateError::fieldAI("property6");
else {
this.{self::B1::_#B1#property6#isSet} = true;
this.{self::B1::_#B1#property6} = #t10;
@@ -122,19 +122,19 @@
: self::C1::_#C1#property4#isSet = true, self::C1::_#C1#property4 = property4, self::C1::_#C1#property5#isSet = true, self::C1::_#C1#property5 = property5, self::C1::_#C1#property6#isSet = true, self::C1::_#C1#property6 = property6, super core::Object::•()
;
get property4() → core::int
- return this.{self::C1::_#C1#property4#isSet} ?{core::int} let final core::int? #t11 = this.{self::C1::_#C1#property4} in #t11{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.");
+ return this.{self::C1::_#C1#property4#isSet} ?{core::int} let final core::int? #t11 = this.{self::C1::_#C1#property4} in #t11{core::int} : throw new _in::LateError::fieldNI("property4");
set property4(core::int #t12) → void {
this.{self::C1::_#C1#property4#isSet} = true;
this.{self::C1::_#C1#property4} = #t12;
}
get property5() → core::int
- return this.{self::C1::_#C1#property5#isSet} ?{core::int} let final core::int? #t13 = this.{self::C1::_#C1#property5} in #t13{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.");
+ return this.{self::C1::_#C1#property5#isSet} ?{core::int} let final core::int? #t13 = this.{self::C1::_#C1#property5} in #t13{core::int} : throw new _in::LateError::fieldNI("property5");
set property5(core::int #t14) → void {
this.{self::C1::_#C1#property5#isSet} = true;
this.{self::C1::_#C1#property5} = #t14;
}
get property6() → core::int
- return this.{self::C1::_#C1#property6#isSet} ?{core::int} let final core::int? #t15 = this.{self::C1::_#C1#property6} in #t15{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.");
+ return this.{self::C1::_#C1#property6#isSet} ?{core::int} let final core::int? #t15 = this.{self::C1::_#C1#property6} in #t15{core::int} : throw new _in::LateError::fieldNI("property6");
set property6(core::int #t16) → void {
this.{self::C1::_#C1#property6#isSet} = true;
this.{self::C1::_#C1#property6} = #t16;
diff --git a/pkg/front_end/testcases/late_lowering/infer_from_late_variable.dart.strong.expect b/pkg/front_end/testcases/late_lowering/infer_from_late_variable.dart.strong.expect
index 4c0d317..18df179 100644
--- a/pkg/front_end/testcases/late_lowering/infer_from_late_variable.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/infer_from_late_variable.dart.strong.expect
@@ -8,7 +8,7 @@
static method main() → dynamic {
core::int? local;
function #local#get() → core::int
- return let final core::int? #t1 = local in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = local in #t1.==(null) ?{core::int} throw new _in::LateError::localNI("local") : #t1{core::int};
function #local#set(core::int #t2) → dynamic
return local = #t2;
#local#set.call(self::f<core::int>(0));
diff --git a/pkg/front_end/testcases/late_lowering/infer_from_late_variable.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/infer_from_late_variable.dart.strong.transformed.expect
index 4c0d317..18df179 100644
--- a/pkg/front_end/testcases/late_lowering/infer_from_late_variable.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/infer_from_late_variable.dart.strong.transformed.expect
@@ -8,7 +8,7 @@
static method main() → dynamic {
core::int? local;
function #local#get() → core::int
- return let final core::int? #t1 = local in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = local in #t1.==(null) ?{core::int} throw new _in::LateError::localNI("local") : #t1{core::int};
function #local#set(core::int #t2) → dynamic
return local = #t2;
#local#set.call(self::f<core::int>(0));
diff --git a/pkg/front_end/testcases/late_lowering/infer_from_late_variable.dart.weak.expect b/pkg/front_end/testcases/late_lowering/infer_from_late_variable.dart.weak.expect
index 6dffe96..a9eee6d 100644
--- a/pkg/front_end/testcases/late_lowering/infer_from_late_variable.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/infer_from_late_variable.dart.weak.expect
@@ -9,7 +9,7 @@
core::int? local;
core::bool #local#isSet = false;
function #local#get() → core::int
- return #local#isSet ?{core::int} local{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local' has not been initialized.");
+ return #local#isSet ?{core::int} local{core::int} : throw new _in::LateError::localNI("local");
function #local#set(core::int #t1) → dynamic {
#local#isSet = true;
return local = #t1;
diff --git a/pkg/front_end/testcases/late_lowering/infer_from_late_variable.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/infer_from_late_variable.dart.weak.transformed.expect
index 6dffe96..a9eee6d 100644
--- a/pkg/front_end/testcases/late_lowering/infer_from_late_variable.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/infer_from_late_variable.dart.weak.transformed.expect
@@ -9,7 +9,7 @@
core::int? local;
core::bool #local#isSet = false;
function #local#get() → core::int
- return #local#isSet ?{core::int} local{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local' has not been initialized.");
+ return #local#isSet ?{core::int} local{core::int} : throw new _in::LateError::localNI("local");
function #local#set(core::int #t1) → dynamic {
#local#isSet = true;
return local = #t1;
diff --git a/pkg/front_end/testcases/late_lowering/infer_late_field_type.dart.strong.expect b/pkg/front_end/testcases/late_lowering/infer_late_field_type.dart.strong.expect
index 0cb82625..4055b4c 100644
--- a/pkg/front_end/testcases/late_lowering/infer_late_field_type.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/infer_late_field_type.dart.strong.expect
@@ -16,7 +16,7 @@
: super core::Object::•()
;
get field() → core::int?
- return this.{self::B::_#B#field#isSet} ?{core::int?} this.{self::B::_#B#field} : throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.");
+ return this.{self::B::_#B#field#isSet} ?{core::int?} this.{self::B::_#B#field} : throw new _in::LateError::fieldNI("field");
set field(core::int? #t1) → void {
this.{self::B::_#B#field#isSet} = true;
this.{self::B::_#B#field} = #t1;
diff --git a/pkg/front_end/testcases/late_lowering/infer_late_field_type.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/infer_late_field_type.dart.strong.transformed.expect
index 0cb82625..4055b4c 100644
--- a/pkg/front_end/testcases/late_lowering/infer_late_field_type.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/infer_late_field_type.dart.strong.transformed.expect
@@ -16,7 +16,7 @@
: super core::Object::•()
;
get field() → core::int?
- return this.{self::B::_#B#field#isSet} ?{core::int?} this.{self::B::_#B#field} : throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.");
+ return this.{self::B::_#B#field#isSet} ?{core::int?} this.{self::B::_#B#field} : throw new _in::LateError::fieldNI("field");
set field(core::int? #t1) → void {
this.{self::B::_#B#field#isSet} = true;
this.{self::B::_#B#field} = #t1;
diff --git a/pkg/front_end/testcases/late_lowering/infer_late_field_type.dart.weak.expect b/pkg/front_end/testcases/late_lowering/infer_late_field_type.dart.weak.expect
index 0cb82625..4055b4c 100644
--- a/pkg/front_end/testcases/late_lowering/infer_late_field_type.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/infer_late_field_type.dart.weak.expect
@@ -16,7 +16,7 @@
: super core::Object::•()
;
get field() → core::int?
- return this.{self::B::_#B#field#isSet} ?{core::int?} this.{self::B::_#B#field} : throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.");
+ return this.{self::B::_#B#field#isSet} ?{core::int?} this.{self::B::_#B#field} : throw new _in::LateError::fieldNI("field");
set field(core::int? #t1) → void {
this.{self::B::_#B#field#isSet} = true;
this.{self::B::_#B#field} = #t1;
diff --git a/pkg/front_end/testcases/late_lowering/infer_late_field_type.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/infer_late_field_type.dart.weak.transformed.expect
index 0cb82625..4055b4c 100644
--- a/pkg/front_end/testcases/late_lowering/infer_late_field_type.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/infer_late_field_type.dart.weak.transformed.expect
@@ -16,7 +16,7 @@
: super core::Object::•()
;
get field() → core::int?
- return this.{self::B::_#B#field#isSet} ?{core::int?} this.{self::B::_#B#field} : throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.");
+ return this.{self::B::_#B#field#isSet} ?{core::int?} this.{self::B::_#B#field} : throw new _in::LateError::fieldNI("field");
set field(core::int? #t1) → void {
this.{self::B::_#B#field#isSet} = true;
this.{self::B::_#B#field} = #t1;
diff --git a/pkg/front_end/testcases/late_lowering/initializer_rewrite.dart.strong.expect b/pkg/front_end/testcases/late_lowering/initializer_rewrite.dart.strong.expect
index 1edfa3c..16fa8e0 100644
--- a/pkg/front_end/testcases/late_lowering/initializer_rewrite.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/initializer_rewrite.dart.strong.expect
@@ -18,24 +18,24 @@
: super core::Object::•()
;
static get nonNullableStaticField() → core::int
- return let final core::int? #t1 = self::Class::_#nonNullableStaticField in #t1.==(null) ?{core::int} let final core::int #t2 = (let final core::int #t3 = self::Class::nonNullableStaticFieldReads in let final core::int #t4 = self::Class::nonNullableStaticFieldReads = #t3.{core::num::+}(1) in #t3).{core::num::==}(0) ?{core::int} self::Class::nonNullableStaticField.{core::num::+}(1) : 0 in self::Class::_#nonNullableStaticField.==(null) ?{core::int} self::Class::_#nonNullableStaticField = #t2 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableStaticField' has been assigned during initialization.") : #t1{core::int};
+ return let final core::int? #t1 = self::Class::_#nonNullableStaticField in #t1.==(null) ?{core::int} let final core::int #t2 = (let final core::int #t3 = self::Class::nonNullableStaticFieldReads in let final core::int #t4 = self::Class::nonNullableStaticFieldReads = #t3.{core::num::+}(1) in #t3).{core::num::==}(0) ?{core::int} self::Class::nonNullableStaticField.{core::num::+}(1) : 0 in self::Class::_#nonNullableStaticField.==(null) ?{core::int} self::Class::_#nonNullableStaticField = #t2 : throw new _in::LateError::fieldADI("nonNullableStaticField") : #t1{core::int};
static get nullableStaticField() → core::int? {
if(!self::Class::_#nullableStaticField#isSet) {
final core::int? #t5 = (let final core::int #t6 = self::Class::nullableStaticFieldReads in let final core::int #t7 = self::Class::nullableStaticFieldReads = #t6.{core::num::+}(1) in #t6).{core::num::==}(0) ?{core::int} self::Class::nullableStaticField.{core::Object::hashCode} : 0;
if(self::Class::_#nullableStaticField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableStaticField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableStaticField");
self::Class::_#nullableStaticField = #t5;
self::Class::_#nullableStaticField#isSet = true;
}
return self::Class::_#nullableStaticField;
}
get nonNullableInstanceField() → core::int
- return let final core::int? #t8 = this.{self::Class::_#Class#nonNullableInstanceField} in #t8.==(null) ?{core::int} let final core::int #t9 = (let final core::int #t10 = this.{self::Class::nonNullableInstanceFieldReads} in let final core::int #t11 = this.{self::Class::nonNullableInstanceFieldReads} = #t10.{core::num::+}(1) in #t10).{core::num::==}(0) ?{core::int} this.{self::Class::nonNullableInstanceField}.{core::num::+}(1) : 0 in this.{self::Class::_#Class#nonNullableInstanceField}.==(null) ?{core::int} this.{self::Class::_#Class#nonNullableInstanceField} = #t9 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableInstanceField' has been assigned during initialization.") : #t8{core::int};
+ return let final core::int? #t8 = this.{self::Class::_#Class#nonNullableInstanceField} in #t8.==(null) ?{core::int} let final core::int #t9 = (let final core::int #t10 = this.{self::Class::nonNullableInstanceFieldReads} in let final core::int #t11 = this.{self::Class::nonNullableInstanceFieldReads} = #t10.{core::num::+}(1) in #t10).{core::num::==}(0) ?{core::int} this.{self::Class::nonNullableInstanceField}.{core::num::+}(1) : 0 in this.{self::Class::_#Class#nonNullableInstanceField}.==(null) ?{core::int} this.{self::Class::_#Class#nonNullableInstanceField} = #t9 : throw new _in::LateError::fieldADI("nonNullableInstanceField") : #t8{core::int};
get nullableInstanceField() → core::int? {
if(!this.{self::Class::_#Class#nullableInstanceField#isSet}) {
final core::int? #t12 = (let final core::int #t13 = this.{self::Class::nullableInstanceFieldReads} in let final core::int #t14 = this.{self::Class::nullableInstanceFieldReads} = #t13.{core::num::+}(1) in #t13).{core::num::==}(0) ?{core::int} this.{self::Class::nullableInstanceField}.{core::Object::hashCode} : 0;
if(this.{self::Class::_#Class#nullableInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableInstanceField");
this.{self::Class::_#Class#nullableInstanceField} = #t12;
this.{self::Class::_#Class#nullableInstanceField#isSet} = true;
}
@@ -48,12 +48,12 @@
static field core::int? _#nullableTopLevelField = null;
static field core::bool _#nullableTopLevelField#isSet = false;
static get nonNullableTopLevelField() → core::int
- return let final core::int? #t15 = self::_#nonNullableTopLevelField in #t15.==(null) ?{core::int} let final core::int #t16 = (let final core::int #t17 = self::nonNullableTopLevelFieldReads in let final core::int #t18 = self::nonNullableTopLevelFieldReads = #t17.{core::num::+}(1) in #t17).{core::num::==}(0) ?{core::int} self::nonNullableTopLevelField.{core::num::+}(1) : 0 in self::_#nonNullableTopLevelField.==(null) ?{core::int} self::_#nonNullableTopLevelField = #t16 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableTopLevelField' has been assigned during initialization.") : #t15{core::int};
+ return let final core::int? #t15 = self::_#nonNullableTopLevelField in #t15.==(null) ?{core::int} let final core::int #t16 = (let final core::int #t17 = self::nonNullableTopLevelFieldReads in let final core::int #t18 = self::nonNullableTopLevelFieldReads = #t17.{core::num::+}(1) in #t17).{core::num::==}(0) ?{core::int} self::nonNullableTopLevelField.{core::num::+}(1) : 0 in self::_#nonNullableTopLevelField.==(null) ?{core::int} self::_#nonNullableTopLevelField = #t16 : throw new _in::LateError::fieldADI("nonNullableTopLevelField") : #t15{core::int};
static get nullableTopLevelField() → core::int? {
if(!self::_#nullableTopLevelField#isSet) {
final core::int? #t19 = (let final core::int #t20 = self::nullableTopLevelFieldReads in let final core::int #t21 = self::nullableTopLevelFieldReads = #t20.{core::num::+}(1) in #t20).{core::num::==}(0) ?{core::int} self::nullableTopLevelField.{core::Object::hashCode} : 0;
if(self::_#nullableTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableTopLevelField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableTopLevelField");
self::_#nullableTopLevelField = #t19;
self::_#nullableTopLevelField#isSet = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/initializer_rewrite.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/initializer_rewrite.dart.strong.transformed.expect
index 1edfa3c..16fa8e0 100644
--- a/pkg/front_end/testcases/late_lowering/initializer_rewrite.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/initializer_rewrite.dart.strong.transformed.expect
@@ -18,24 +18,24 @@
: super core::Object::•()
;
static get nonNullableStaticField() → core::int
- return let final core::int? #t1 = self::Class::_#nonNullableStaticField in #t1.==(null) ?{core::int} let final core::int #t2 = (let final core::int #t3 = self::Class::nonNullableStaticFieldReads in let final core::int #t4 = self::Class::nonNullableStaticFieldReads = #t3.{core::num::+}(1) in #t3).{core::num::==}(0) ?{core::int} self::Class::nonNullableStaticField.{core::num::+}(1) : 0 in self::Class::_#nonNullableStaticField.==(null) ?{core::int} self::Class::_#nonNullableStaticField = #t2 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableStaticField' has been assigned during initialization.") : #t1{core::int};
+ return let final core::int? #t1 = self::Class::_#nonNullableStaticField in #t1.==(null) ?{core::int} let final core::int #t2 = (let final core::int #t3 = self::Class::nonNullableStaticFieldReads in let final core::int #t4 = self::Class::nonNullableStaticFieldReads = #t3.{core::num::+}(1) in #t3).{core::num::==}(0) ?{core::int} self::Class::nonNullableStaticField.{core::num::+}(1) : 0 in self::Class::_#nonNullableStaticField.==(null) ?{core::int} self::Class::_#nonNullableStaticField = #t2 : throw new _in::LateError::fieldADI("nonNullableStaticField") : #t1{core::int};
static get nullableStaticField() → core::int? {
if(!self::Class::_#nullableStaticField#isSet) {
final core::int? #t5 = (let final core::int #t6 = self::Class::nullableStaticFieldReads in let final core::int #t7 = self::Class::nullableStaticFieldReads = #t6.{core::num::+}(1) in #t6).{core::num::==}(0) ?{core::int} self::Class::nullableStaticField.{core::Object::hashCode} : 0;
if(self::Class::_#nullableStaticField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableStaticField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableStaticField");
self::Class::_#nullableStaticField = #t5;
self::Class::_#nullableStaticField#isSet = true;
}
return self::Class::_#nullableStaticField;
}
get nonNullableInstanceField() → core::int
- return let final core::int? #t8 = this.{self::Class::_#Class#nonNullableInstanceField} in #t8.==(null) ?{core::int} let final core::int #t9 = (let final core::int #t10 = this.{self::Class::nonNullableInstanceFieldReads} in let final core::int #t11 = this.{self::Class::nonNullableInstanceFieldReads} = #t10.{core::num::+}(1) in #t10).{core::num::==}(0) ?{core::int} this.{self::Class::nonNullableInstanceField}.{core::num::+}(1) : 0 in this.{self::Class::_#Class#nonNullableInstanceField}.==(null) ?{core::int} this.{self::Class::_#Class#nonNullableInstanceField} = #t9 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableInstanceField' has been assigned during initialization.") : #t8{core::int};
+ return let final core::int? #t8 = this.{self::Class::_#Class#nonNullableInstanceField} in #t8.==(null) ?{core::int} let final core::int #t9 = (let final core::int #t10 = this.{self::Class::nonNullableInstanceFieldReads} in let final core::int #t11 = this.{self::Class::nonNullableInstanceFieldReads} = #t10.{core::num::+}(1) in #t10).{core::num::==}(0) ?{core::int} this.{self::Class::nonNullableInstanceField}.{core::num::+}(1) : 0 in this.{self::Class::_#Class#nonNullableInstanceField}.==(null) ?{core::int} this.{self::Class::_#Class#nonNullableInstanceField} = #t9 : throw new _in::LateError::fieldADI("nonNullableInstanceField") : #t8{core::int};
get nullableInstanceField() → core::int? {
if(!this.{self::Class::_#Class#nullableInstanceField#isSet}) {
final core::int? #t12 = (let final core::int #t13 = this.{self::Class::nullableInstanceFieldReads} in let final core::int #t14 = this.{self::Class::nullableInstanceFieldReads} = #t13.{core::num::+}(1) in #t13).{core::num::==}(0) ?{core::int} this.{self::Class::nullableInstanceField}.{core::Object::hashCode} : 0;
if(this.{self::Class::_#Class#nullableInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableInstanceField");
this.{self::Class::_#Class#nullableInstanceField} = #t12;
this.{self::Class::_#Class#nullableInstanceField#isSet} = true;
}
@@ -48,12 +48,12 @@
static field core::int? _#nullableTopLevelField = null;
static field core::bool _#nullableTopLevelField#isSet = false;
static get nonNullableTopLevelField() → core::int
- return let final core::int? #t15 = self::_#nonNullableTopLevelField in #t15.==(null) ?{core::int} let final core::int #t16 = (let final core::int #t17 = self::nonNullableTopLevelFieldReads in let final core::int #t18 = self::nonNullableTopLevelFieldReads = #t17.{core::num::+}(1) in #t17).{core::num::==}(0) ?{core::int} self::nonNullableTopLevelField.{core::num::+}(1) : 0 in self::_#nonNullableTopLevelField.==(null) ?{core::int} self::_#nonNullableTopLevelField = #t16 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableTopLevelField' has been assigned during initialization.") : #t15{core::int};
+ return let final core::int? #t15 = self::_#nonNullableTopLevelField in #t15.==(null) ?{core::int} let final core::int #t16 = (let final core::int #t17 = self::nonNullableTopLevelFieldReads in let final core::int #t18 = self::nonNullableTopLevelFieldReads = #t17.{core::num::+}(1) in #t17).{core::num::==}(0) ?{core::int} self::nonNullableTopLevelField.{core::num::+}(1) : 0 in self::_#nonNullableTopLevelField.==(null) ?{core::int} self::_#nonNullableTopLevelField = #t16 : throw new _in::LateError::fieldADI("nonNullableTopLevelField") : #t15{core::int};
static get nullableTopLevelField() → core::int? {
if(!self::_#nullableTopLevelField#isSet) {
final core::int? #t19 = (let final core::int #t20 = self::nullableTopLevelFieldReads in let final core::int #t21 = self::nullableTopLevelFieldReads = #t20.{core::num::+}(1) in #t20).{core::num::==}(0) ?{core::int} self::nullableTopLevelField.{core::Object::hashCode} : 0;
if(self::_#nullableTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableTopLevelField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableTopLevelField");
self::_#nullableTopLevelField = #t19;
self::_#nullableTopLevelField#isSet = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/initializer_rewrite.dart.weak.expect b/pkg/front_end/testcases/late_lowering/initializer_rewrite.dart.weak.expect
index 8784442..ad9e30d 100644
--- a/pkg/front_end/testcases/late_lowering/initializer_rewrite.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/initializer_rewrite.dart.weak.expect
@@ -23,7 +23,7 @@
if(!self::Class::_#nonNullableStaticField#isSet) {
final core::int #t1 = (let final core::int #t2 = self::Class::nonNullableStaticFieldReads in let final core::int #t3 = self::Class::nonNullableStaticFieldReads = #t2.{core::num::+}(1) in #t2).{core::num::==}(0) ?{core::int} self::Class::nonNullableStaticField.{core::num::+}(1) : 0;
if(self::Class::_#nonNullableStaticField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableStaticField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableStaticField");
self::Class::_#nonNullableStaticField = #t1;
self::Class::_#nonNullableStaticField#isSet = true;
}
@@ -33,7 +33,7 @@
if(!self::Class::_#nullableStaticField#isSet) {
final core::int? #t5 = (let final core::int #t6 = self::Class::nullableStaticFieldReads in let final core::int #t7 = self::Class::nullableStaticFieldReads = #t6.{core::num::+}(1) in #t6).{core::num::==}(0) ?{core::int} self::Class::nullableStaticField.{core::Object::hashCode} : 0;
if(self::Class::_#nullableStaticField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableStaticField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableStaticField");
self::Class::_#nullableStaticField = #t5;
self::Class::_#nullableStaticField#isSet = true;
}
@@ -43,7 +43,7 @@
if(!this.{self::Class::_#Class#nonNullableInstanceField#isSet}) {
final core::int #t8 = (let final core::int #t9 = this.{self::Class::nonNullableInstanceFieldReads} in let final core::int #t10 = this.{self::Class::nonNullableInstanceFieldReads} = #t9.{core::num::+}(1) in #t9).{core::num::==}(0) ?{core::int} this.{self::Class::nonNullableInstanceField}.{core::num::+}(1) : 0;
if(this.{self::Class::_#Class#nonNullableInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableInstanceField");
this.{self::Class::_#Class#nonNullableInstanceField} = #t8;
this.{self::Class::_#Class#nonNullableInstanceField#isSet} = true;
}
@@ -53,7 +53,7 @@
if(!this.{self::Class::_#Class#nullableInstanceField#isSet}) {
final core::int? #t12 = (let final core::int #t13 = this.{self::Class::nullableInstanceFieldReads} in let final core::int #t14 = this.{self::Class::nullableInstanceFieldReads} = #t13.{core::num::+}(1) in #t13).{core::num::==}(0) ?{core::int} this.{self::Class::nullableInstanceField}.{core::Object::hashCode} : 0;
if(this.{self::Class::_#Class#nullableInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableInstanceField");
this.{self::Class::_#Class#nullableInstanceField} = #t12;
this.{self::Class::_#Class#nullableInstanceField#isSet} = true;
}
@@ -70,7 +70,7 @@
if(!self::_#nonNullableTopLevelField#isSet) {
final core::int #t15 = (let final core::int #t16 = self::nonNullableTopLevelFieldReads in let final core::int #t17 = self::nonNullableTopLevelFieldReads = #t16.{core::num::+}(1) in #t16).{core::num::==}(0) ?{core::int} self::nonNullableTopLevelField.{core::num::+}(1) : 0;
if(self::_#nonNullableTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableTopLevelField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableTopLevelField");
self::_#nonNullableTopLevelField = #t15;
self::_#nonNullableTopLevelField#isSet = true;
}
@@ -80,7 +80,7 @@
if(!self::_#nullableTopLevelField#isSet) {
final core::int? #t19 = (let final core::int #t20 = self::nullableTopLevelFieldReads in let final core::int #t21 = self::nullableTopLevelFieldReads = #t20.{core::num::+}(1) in #t20).{core::num::==}(0) ?{core::int} self::nullableTopLevelField.{core::Object::hashCode} : 0;
if(self::_#nullableTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableTopLevelField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableTopLevelField");
self::_#nullableTopLevelField = #t19;
self::_#nullableTopLevelField#isSet = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/initializer_rewrite.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/initializer_rewrite.dart.weak.transformed.expect
index 8784442..ad9e30d 100644
--- a/pkg/front_end/testcases/late_lowering/initializer_rewrite.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/initializer_rewrite.dart.weak.transformed.expect
@@ -23,7 +23,7 @@
if(!self::Class::_#nonNullableStaticField#isSet) {
final core::int #t1 = (let final core::int #t2 = self::Class::nonNullableStaticFieldReads in let final core::int #t3 = self::Class::nonNullableStaticFieldReads = #t2.{core::num::+}(1) in #t2).{core::num::==}(0) ?{core::int} self::Class::nonNullableStaticField.{core::num::+}(1) : 0;
if(self::Class::_#nonNullableStaticField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableStaticField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableStaticField");
self::Class::_#nonNullableStaticField = #t1;
self::Class::_#nonNullableStaticField#isSet = true;
}
@@ -33,7 +33,7 @@
if(!self::Class::_#nullableStaticField#isSet) {
final core::int? #t5 = (let final core::int #t6 = self::Class::nullableStaticFieldReads in let final core::int #t7 = self::Class::nullableStaticFieldReads = #t6.{core::num::+}(1) in #t6).{core::num::==}(0) ?{core::int} self::Class::nullableStaticField.{core::Object::hashCode} : 0;
if(self::Class::_#nullableStaticField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableStaticField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableStaticField");
self::Class::_#nullableStaticField = #t5;
self::Class::_#nullableStaticField#isSet = true;
}
@@ -43,7 +43,7 @@
if(!this.{self::Class::_#Class#nonNullableInstanceField#isSet}) {
final core::int #t8 = (let final core::int #t9 = this.{self::Class::nonNullableInstanceFieldReads} in let final core::int #t10 = this.{self::Class::nonNullableInstanceFieldReads} = #t9.{core::num::+}(1) in #t9).{core::num::==}(0) ?{core::int} this.{self::Class::nonNullableInstanceField}.{core::num::+}(1) : 0;
if(this.{self::Class::_#Class#nonNullableInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableInstanceField");
this.{self::Class::_#Class#nonNullableInstanceField} = #t8;
this.{self::Class::_#Class#nonNullableInstanceField#isSet} = true;
}
@@ -53,7 +53,7 @@
if(!this.{self::Class::_#Class#nullableInstanceField#isSet}) {
final core::int? #t12 = (let final core::int #t13 = this.{self::Class::nullableInstanceFieldReads} in let final core::int #t14 = this.{self::Class::nullableInstanceFieldReads} = #t13.{core::num::+}(1) in #t13).{core::num::==}(0) ?{core::int} this.{self::Class::nullableInstanceField}.{core::Object::hashCode} : 0;
if(this.{self::Class::_#Class#nullableInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableInstanceField");
this.{self::Class::_#Class#nullableInstanceField} = #t12;
this.{self::Class::_#Class#nullableInstanceField#isSet} = true;
}
@@ -70,7 +70,7 @@
if(!self::_#nonNullableTopLevelField#isSet) {
final core::int #t15 = (let final core::int #t16 = self::nonNullableTopLevelFieldReads in let final core::int #t17 = self::nonNullableTopLevelFieldReads = #t16.{core::num::+}(1) in #t16).{core::num::==}(0) ?{core::int} self::nonNullableTopLevelField.{core::num::+}(1) : 0;
if(self::_#nonNullableTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableTopLevelField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableTopLevelField");
self::_#nonNullableTopLevelField = #t15;
self::_#nonNullableTopLevelField#isSet = true;
}
@@ -80,7 +80,7 @@
if(!self::_#nullableTopLevelField#isSet) {
final core::int? #t19 = (let final core::int #t20 = self::nullableTopLevelFieldReads in let final core::int #t21 = self::nullableTopLevelFieldReads = #t20.{core::num::+}(1) in #t20).{core::num::==}(0) ?{core::int} self::nullableTopLevelField.{core::Object::hashCode} : 0;
if(self::_#nullableTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableTopLevelField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableTopLevelField");
self::_#nullableTopLevelField = #t19;
self::_#nullableTopLevelField#isSet = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.strong.expect b/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.strong.expect
index cc020ed..df72516 100644
--- a/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.strong.expect
@@ -21,24 +21,24 @@
: super core::Object::•()
;
static get nonNullableStaticField() → core::int
- return let final core::int? #t1 = self::Class::_#nonNullableStaticField in #t1.==(null) ?{core::int} let final core::int #t2 = (let final core::int #t3 = self::Class::nonNullableStaticFieldReads in let final core::int #t4 = self::Class::nonNullableStaticFieldReads = #t3.{core::num::+}(1) in #t3).{core::num::==}(0) ?{core::int*} self::Class::nonNullableStaticField : ini::computeInitialValue() in self::Class::_#nonNullableStaticField.==(null) ?{core::int} self::Class::_#nonNullableStaticField = #t2 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableStaticField' has been assigned during initialization.") : #t1{core::int};
+ return let final core::int? #t1 = self::Class::_#nonNullableStaticField in #t1.==(null) ?{core::int} let final core::int #t2 = (let final core::int #t3 = self::Class::nonNullableStaticFieldReads in let final core::int #t4 = self::Class::nonNullableStaticFieldReads = #t3.{core::num::+}(1) in #t3).{core::num::==}(0) ?{core::int*} self::Class::nonNullableStaticField : ini::computeInitialValue() in self::Class::_#nonNullableStaticField.==(null) ?{core::int} self::Class::_#nonNullableStaticField = #t2 : throw new _in::LateError::fieldADI("nonNullableStaticField") : #t1{core::int};
static get nullableStaticField() → core::int? {
if(!self::Class::_#nullableStaticField#isSet) {
final core::int? #t5 = (let final core::int #t6 = self::Class::nullableStaticFieldReads in let final core::int #t7 = self::Class::nullableStaticFieldReads = #t6.{core::num::+}(1) in #t6).{core::num::==}(0) ?{core::int?} self::Class::nullableStaticField : ini::computeInitialValue();
if(self::Class::_#nullableStaticField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableStaticField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableStaticField");
self::Class::_#nullableStaticField = #t5;
self::Class::_#nullableStaticField#isSet = true;
}
return self::Class::_#nullableStaticField;
}
get nonNullableInstanceField() → core::int
- return let final core::int? #t8 = this.{self::Class::_#Class#nonNullableInstanceField} in #t8.==(null) ?{core::int} let final core::int #t9 = (let final core::int #t10 = this.{self::Class::nonNullableInstanceFieldReads} in let final core::int #t11 = this.{self::Class::nonNullableInstanceFieldReads} = #t10.{core::num::+}(1) in #t10).{core::num::==}(0) ?{core::int*} this.{self::Class::nonNullableInstanceField} : ini::computeInitialValue() in this.{self::Class::_#Class#nonNullableInstanceField}.==(null) ?{core::int} this.{self::Class::_#Class#nonNullableInstanceField} = #t9 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableInstanceField' has been assigned during initialization.") : #t8{core::int};
+ return let final core::int? #t8 = this.{self::Class::_#Class#nonNullableInstanceField} in #t8.==(null) ?{core::int} let final core::int #t9 = (let final core::int #t10 = this.{self::Class::nonNullableInstanceFieldReads} in let final core::int #t11 = this.{self::Class::nonNullableInstanceFieldReads} = #t10.{core::num::+}(1) in #t10).{core::num::==}(0) ?{core::int*} this.{self::Class::nonNullableInstanceField} : ini::computeInitialValue() in this.{self::Class::_#Class#nonNullableInstanceField}.==(null) ?{core::int} this.{self::Class::_#Class#nonNullableInstanceField} = #t9 : throw new _in::LateError::fieldADI("nonNullableInstanceField") : #t8{core::int};
get nullableInstanceField() → core::int? {
if(!this.{self::Class::_#Class#nullableInstanceField#isSet}) {
final core::int? #t12 = (let final core::int #t13 = this.{self::Class::nullableInstanceFieldReads} in let final core::int #t14 = this.{self::Class::nullableInstanceFieldReads} = #t13.{core::num::+}(1) in #t13).{core::num::==}(0) ?{core::int?} this.{self::Class::nullableInstanceField} : ini::computeInitialValue();
if(this.{self::Class::_#Class#nullableInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableInstanceField");
this.{self::Class::_#Class#nullableInstanceField} = #t12;
this.{self::Class::_#Class#nullableInstanceField#isSet} = true;
}
@@ -51,12 +51,12 @@
static field core::int? _#nullableTopLevelField = null;
static field core::bool _#nullableTopLevelField#isSet = false;
static get nonNullableTopLevelField() → core::int
- return let final core::int? #t15 = self::_#nonNullableTopLevelField in #t15.==(null) ?{core::int} let final core::int #t16 = (let final core::int #t17 = self::nonNullableTopLevelFieldReads in let final core::int #t18 = self::nonNullableTopLevelFieldReads = #t17.{core::num::+}(1) in #t17).{core::num::==}(0) ?{core::int*} self::nonNullableTopLevelField : ini::computeInitialValue() in self::_#nonNullableTopLevelField.==(null) ?{core::int} self::_#nonNullableTopLevelField = #t16 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableTopLevelField' has been assigned during initialization.") : #t15{core::int};
+ return let final core::int? #t15 = self::_#nonNullableTopLevelField in #t15.==(null) ?{core::int} let final core::int #t16 = (let final core::int #t17 = self::nonNullableTopLevelFieldReads in let final core::int #t18 = self::nonNullableTopLevelFieldReads = #t17.{core::num::+}(1) in #t17).{core::num::==}(0) ?{core::int*} self::nonNullableTopLevelField : ini::computeInitialValue() in self::_#nonNullableTopLevelField.==(null) ?{core::int} self::_#nonNullableTopLevelField = #t16 : throw new _in::LateError::fieldADI("nonNullableTopLevelField") : #t15{core::int};
static get nullableTopLevelField() → core::int? {
if(!self::_#nullableTopLevelField#isSet) {
final core::int? #t19 = (let final core::int #t20 = self::nullableTopLevelFieldReads in let final core::int #t21 = self::nullableTopLevelFieldReads = #t20.{core::num::+}(1) in #t20).{core::num::==}(0) ?{core::int?} self::nullableTopLevelField : ini::computeInitialValue();
if(self::_#nullableTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableTopLevelField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableTopLevelField");
self::_#nullableTopLevelField = #t19;
self::_#nullableTopLevelField#isSet = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.strong.transformed.expect
index cc020ed..df72516 100644
--- a/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.strong.transformed.expect
@@ -21,24 +21,24 @@
: super core::Object::•()
;
static get nonNullableStaticField() → core::int
- return let final core::int? #t1 = self::Class::_#nonNullableStaticField in #t1.==(null) ?{core::int} let final core::int #t2 = (let final core::int #t3 = self::Class::nonNullableStaticFieldReads in let final core::int #t4 = self::Class::nonNullableStaticFieldReads = #t3.{core::num::+}(1) in #t3).{core::num::==}(0) ?{core::int*} self::Class::nonNullableStaticField : ini::computeInitialValue() in self::Class::_#nonNullableStaticField.==(null) ?{core::int} self::Class::_#nonNullableStaticField = #t2 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableStaticField' has been assigned during initialization.") : #t1{core::int};
+ return let final core::int? #t1 = self::Class::_#nonNullableStaticField in #t1.==(null) ?{core::int} let final core::int #t2 = (let final core::int #t3 = self::Class::nonNullableStaticFieldReads in let final core::int #t4 = self::Class::nonNullableStaticFieldReads = #t3.{core::num::+}(1) in #t3).{core::num::==}(0) ?{core::int*} self::Class::nonNullableStaticField : ini::computeInitialValue() in self::Class::_#nonNullableStaticField.==(null) ?{core::int} self::Class::_#nonNullableStaticField = #t2 : throw new _in::LateError::fieldADI("nonNullableStaticField") : #t1{core::int};
static get nullableStaticField() → core::int? {
if(!self::Class::_#nullableStaticField#isSet) {
final core::int? #t5 = (let final core::int #t6 = self::Class::nullableStaticFieldReads in let final core::int #t7 = self::Class::nullableStaticFieldReads = #t6.{core::num::+}(1) in #t6).{core::num::==}(0) ?{core::int?} self::Class::nullableStaticField : ini::computeInitialValue();
if(self::Class::_#nullableStaticField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableStaticField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableStaticField");
self::Class::_#nullableStaticField = #t5;
self::Class::_#nullableStaticField#isSet = true;
}
return self::Class::_#nullableStaticField;
}
get nonNullableInstanceField() → core::int
- return let final core::int? #t8 = this.{self::Class::_#Class#nonNullableInstanceField} in #t8.==(null) ?{core::int} let final core::int #t9 = (let final core::int #t10 = this.{self::Class::nonNullableInstanceFieldReads} in let final core::int #t11 = this.{self::Class::nonNullableInstanceFieldReads} = #t10.{core::num::+}(1) in #t10).{core::num::==}(0) ?{core::int*} this.{self::Class::nonNullableInstanceField} : ini::computeInitialValue() in this.{self::Class::_#Class#nonNullableInstanceField}.==(null) ?{core::int} this.{self::Class::_#Class#nonNullableInstanceField} = #t9 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableInstanceField' has been assigned during initialization.") : #t8{core::int};
+ return let final core::int? #t8 = this.{self::Class::_#Class#nonNullableInstanceField} in #t8.==(null) ?{core::int} let final core::int #t9 = (let final core::int #t10 = this.{self::Class::nonNullableInstanceFieldReads} in let final core::int #t11 = this.{self::Class::nonNullableInstanceFieldReads} = #t10.{core::num::+}(1) in #t10).{core::num::==}(0) ?{core::int*} this.{self::Class::nonNullableInstanceField} : ini::computeInitialValue() in this.{self::Class::_#Class#nonNullableInstanceField}.==(null) ?{core::int} this.{self::Class::_#Class#nonNullableInstanceField} = #t9 : throw new _in::LateError::fieldADI("nonNullableInstanceField") : #t8{core::int};
get nullableInstanceField() → core::int? {
if(!this.{self::Class::_#Class#nullableInstanceField#isSet}) {
final core::int? #t12 = (let final core::int #t13 = this.{self::Class::nullableInstanceFieldReads} in let final core::int #t14 = this.{self::Class::nullableInstanceFieldReads} = #t13.{core::num::+}(1) in #t13).{core::num::==}(0) ?{core::int?} this.{self::Class::nullableInstanceField} : ini::computeInitialValue();
if(this.{self::Class::_#Class#nullableInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableInstanceField");
this.{self::Class::_#Class#nullableInstanceField} = #t12;
this.{self::Class::_#Class#nullableInstanceField#isSet} = true;
}
@@ -51,12 +51,12 @@
static field core::int? _#nullableTopLevelField = null;
static field core::bool _#nullableTopLevelField#isSet = false;
static get nonNullableTopLevelField() → core::int
- return let final core::int? #t15 = self::_#nonNullableTopLevelField in #t15.==(null) ?{core::int} let final core::int #t16 = (let final core::int #t17 = self::nonNullableTopLevelFieldReads in let final core::int #t18 = self::nonNullableTopLevelFieldReads = #t17.{core::num::+}(1) in #t17).{core::num::==}(0) ?{core::int*} self::nonNullableTopLevelField : ini::computeInitialValue() in self::_#nonNullableTopLevelField.==(null) ?{core::int} self::_#nonNullableTopLevelField = #t16 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableTopLevelField' has been assigned during initialization.") : #t15{core::int};
+ return let final core::int? #t15 = self::_#nonNullableTopLevelField in #t15.==(null) ?{core::int} let final core::int #t16 = (let final core::int #t17 = self::nonNullableTopLevelFieldReads in let final core::int #t18 = self::nonNullableTopLevelFieldReads = #t17.{core::num::+}(1) in #t17).{core::num::==}(0) ?{core::int*} self::nonNullableTopLevelField : ini::computeInitialValue() in self::_#nonNullableTopLevelField.==(null) ?{core::int} self::_#nonNullableTopLevelField = #t16 : throw new _in::LateError::fieldADI("nonNullableTopLevelField") : #t15{core::int};
static get nullableTopLevelField() → core::int? {
if(!self::_#nullableTopLevelField#isSet) {
final core::int? #t19 = (let final core::int #t20 = self::nullableTopLevelFieldReads in let final core::int #t21 = self::nullableTopLevelFieldReads = #t20.{core::num::+}(1) in #t20).{core::num::==}(0) ?{core::int?} self::nullableTopLevelField : ini::computeInitialValue();
if(self::_#nullableTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableTopLevelField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableTopLevelField");
self::_#nullableTopLevelField = #t19;
self::_#nullableTopLevelField#isSet = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.weak.expect b/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.weak.expect
index d58daaa..fc0e98b 100644
--- a/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.weak.expect
@@ -26,7 +26,7 @@
if(!self::Class::_#nonNullableStaticField#isSet) {
final core::int #t1 = (let final core::int #t2 = self::Class::nonNullableStaticFieldReads in let final core::int #t3 = self::Class::nonNullableStaticFieldReads = #t2.{core::num::+}(1) in #t2).{core::num::==}(0) ?{core::int*} self::Class::nonNullableStaticField : ini::computeInitialValue();
if(self::Class::_#nonNullableStaticField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableStaticField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableStaticField");
self::Class::_#nonNullableStaticField = #t1;
self::Class::_#nonNullableStaticField#isSet = true;
}
@@ -36,7 +36,7 @@
if(!self::Class::_#nullableStaticField#isSet) {
final core::int? #t5 = (let final core::int #t6 = self::Class::nullableStaticFieldReads in let final core::int #t7 = self::Class::nullableStaticFieldReads = #t6.{core::num::+}(1) in #t6).{core::num::==}(0) ?{core::int?} self::Class::nullableStaticField : ini::computeInitialValue();
if(self::Class::_#nullableStaticField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableStaticField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableStaticField");
self::Class::_#nullableStaticField = #t5;
self::Class::_#nullableStaticField#isSet = true;
}
@@ -46,7 +46,7 @@
if(!this.{self::Class::_#Class#nonNullableInstanceField#isSet}) {
final core::int #t8 = (let final core::int #t9 = this.{self::Class::nonNullableInstanceFieldReads} in let final core::int #t10 = this.{self::Class::nonNullableInstanceFieldReads} = #t9.{core::num::+}(1) in #t9).{core::num::==}(0) ?{core::int*} this.{self::Class::nonNullableInstanceField} : ini::computeInitialValue();
if(this.{self::Class::_#Class#nonNullableInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableInstanceField");
this.{self::Class::_#Class#nonNullableInstanceField} = #t8;
this.{self::Class::_#Class#nonNullableInstanceField#isSet} = true;
}
@@ -56,7 +56,7 @@
if(!this.{self::Class::_#Class#nullableInstanceField#isSet}) {
final core::int? #t12 = (let final core::int #t13 = this.{self::Class::nullableInstanceFieldReads} in let final core::int #t14 = this.{self::Class::nullableInstanceFieldReads} = #t13.{core::num::+}(1) in #t13).{core::num::==}(0) ?{core::int?} this.{self::Class::nullableInstanceField} : ini::computeInitialValue();
if(this.{self::Class::_#Class#nullableInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableInstanceField");
this.{self::Class::_#Class#nullableInstanceField} = #t12;
this.{self::Class::_#Class#nullableInstanceField#isSet} = true;
}
@@ -73,7 +73,7 @@
if(!self::_#nonNullableTopLevelField#isSet) {
final core::int #t15 = (let final core::int #t16 = self::nonNullableTopLevelFieldReads in let final core::int #t17 = self::nonNullableTopLevelFieldReads = #t16.{core::num::+}(1) in #t16).{core::num::==}(0) ?{core::int*} self::nonNullableTopLevelField : ini::computeInitialValue();
if(self::_#nonNullableTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableTopLevelField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableTopLevelField");
self::_#nonNullableTopLevelField = #t15;
self::_#nonNullableTopLevelField#isSet = true;
}
@@ -83,7 +83,7 @@
if(!self::_#nullableTopLevelField#isSet) {
final core::int? #t19 = (let final core::int #t20 = self::nullableTopLevelFieldReads in let final core::int #t21 = self::nullableTopLevelFieldReads = #t20.{core::num::+}(1) in #t20).{core::num::==}(0) ?{core::int?} self::nullableTopLevelField : ini::computeInitialValue();
if(self::_#nullableTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableTopLevelField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableTopLevelField");
self::_#nullableTopLevelField = #t19;
self::_#nullableTopLevelField#isSet = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.weak.transformed.expect
index d58daaa..fc0e98b 100644
--- a/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.weak.transformed.expect
@@ -26,7 +26,7 @@
if(!self::Class::_#nonNullableStaticField#isSet) {
final core::int #t1 = (let final core::int #t2 = self::Class::nonNullableStaticFieldReads in let final core::int #t3 = self::Class::nonNullableStaticFieldReads = #t2.{core::num::+}(1) in #t2).{core::num::==}(0) ?{core::int*} self::Class::nonNullableStaticField : ini::computeInitialValue();
if(self::Class::_#nonNullableStaticField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableStaticField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableStaticField");
self::Class::_#nonNullableStaticField = #t1;
self::Class::_#nonNullableStaticField#isSet = true;
}
@@ -36,7 +36,7 @@
if(!self::Class::_#nullableStaticField#isSet) {
final core::int? #t5 = (let final core::int #t6 = self::Class::nullableStaticFieldReads in let final core::int #t7 = self::Class::nullableStaticFieldReads = #t6.{core::num::+}(1) in #t6).{core::num::==}(0) ?{core::int?} self::Class::nullableStaticField : ini::computeInitialValue();
if(self::Class::_#nullableStaticField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableStaticField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableStaticField");
self::Class::_#nullableStaticField = #t5;
self::Class::_#nullableStaticField#isSet = true;
}
@@ -46,7 +46,7 @@
if(!this.{self::Class::_#Class#nonNullableInstanceField#isSet}) {
final core::int #t8 = (let final core::int #t9 = this.{self::Class::nonNullableInstanceFieldReads} in let final core::int #t10 = this.{self::Class::nonNullableInstanceFieldReads} = #t9.{core::num::+}(1) in #t9).{core::num::==}(0) ?{core::int*} this.{self::Class::nonNullableInstanceField} : ini::computeInitialValue();
if(this.{self::Class::_#Class#nonNullableInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableInstanceField");
this.{self::Class::_#Class#nonNullableInstanceField} = #t8;
this.{self::Class::_#Class#nonNullableInstanceField#isSet} = true;
}
@@ -56,7 +56,7 @@
if(!this.{self::Class::_#Class#nullableInstanceField#isSet}) {
final core::int? #t12 = (let final core::int #t13 = this.{self::Class::nullableInstanceFieldReads} in let final core::int #t14 = this.{self::Class::nullableInstanceFieldReads} = #t13.{core::num::+}(1) in #t13).{core::num::==}(0) ?{core::int?} this.{self::Class::nullableInstanceField} : ini::computeInitialValue();
if(this.{self::Class::_#Class#nullableInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableInstanceField");
this.{self::Class::_#Class#nullableInstanceField} = #t12;
this.{self::Class::_#Class#nullableInstanceField#isSet} = true;
}
@@ -73,7 +73,7 @@
if(!self::_#nonNullableTopLevelField#isSet) {
final core::int #t15 = (let final core::int #t16 = self::nonNullableTopLevelFieldReads in let final core::int #t17 = self::nonNullableTopLevelFieldReads = #t16.{core::num::+}(1) in #t16).{core::num::==}(0) ?{core::int*} self::nonNullableTopLevelField : ini::computeInitialValue();
if(self::_#nonNullableTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableTopLevelField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableTopLevelField");
self::_#nonNullableTopLevelField = #t15;
self::_#nonNullableTopLevelField#isSet = true;
}
@@ -83,7 +83,7 @@
if(!self::_#nullableTopLevelField#isSet) {
final core::int? #t19 = (let final core::int #t20 = self::nullableTopLevelFieldReads in let final core::int #t21 = self::nullableTopLevelFieldReads = #t20.{core::num::+}(1) in #t20).{core::num::==}(0) ?{core::int?} self::nullableTopLevelField : ini::computeInitialValue();
if(self::_#nullableTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableTopLevelField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableTopLevelField");
self::_#nullableTopLevelField = #t19;
self::_#nullableTopLevelField#isSet = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/injected_late_field_checks/main.dart.strong.expect b/pkg/front_end/testcases/late_lowering/injected_late_field_checks/main.dart.strong.expect
index ea024bb..3ed20f7 100644
--- a/pkg/front_end/testcases/late_lowering/injected_late_field_checks/main.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/injected_late_field_checks/main.dart.strong.expect
@@ -22,7 +22,7 @@
: self2::Class::_#Class#foo = foo, super core::Object::•()
;
get /* from org-dartlang-testcase:///patch_lib.dart */ foo() → core::int
- return let final core::int? #t1 = this.{self2::Class::_#Class#foo} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'foo' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self2::Class::_#Class#foo} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("foo") : #t1{core::int};
set /* from org-dartlang-testcase:///patch_lib.dart */ foo(core::int #t2) → void
this.{self2::Class::_#Class#foo} = #t2;
}
diff --git a/pkg/front_end/testcases/late_lowering/injected_late_field_checks/main.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/injected_late_field_checks/main.dart.strong.transformed.expect
index ea024bb..3ed20f7 100644
--- a/pkg/front_end/testcases/late_lowering/injected_late_field_checks/main.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/injected_late_field_checks/main.dart.strong.transformed.expect
@@ -22,7 +22,7 @@
: self2::Class::_#Class#foo = foo, super core::Object::•()
;
get /* from org-dartlang-testcase:///patch_lib.dart */ foo() → core::int
- return let final core::int? #t1 = this.{self2::Class::_#Class#foo} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'foo' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self2::Class::_#Class#foo} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("foo") : #t1{core::int};
set /* from org-dartlang-testcase:///patch_lib.dart */ foo(core::int #t2) → void
this.{self2::Class::_#Class#foo} = #t2;
}
diff --git a/pkg/front_end/testcases/late_lowering/injected_late_field_checks/main.dart.weak.expect b/pkg/front_end/testcases/late_lowering/injected_late_field_checks/main.dart.weak.expect
index e2b0019..7458102 100644
--- a/pkg/front_end/testcases/late_lowering/injected_late_field_checks/main.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/injected_late_field_checks/main.dart.weak.expect
@@ -23,7 +23,7 @@
: self2::Class::_#Class#foo#isSet = true, self2::Class::_#Class#foo = foo, super core::Object::•()
;
get /* from org-dartlang-testcase:///patch_lib.dart */ foo() → core::int
- return this.{self2::Class::_#Class#foo#isSet} ?{core::int} let final core::int? #t1 = this.{self2::Class::_#Class#foo} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'foo' has not been initialized.");
+ return this.{self2::Class::_#Class#foo#isSet} ?{core::int} let final core::int? #t1 = this.{self2::Class::_#Class#foo} in #t1{core::int} : throw new _in::LateError::fieldNI("foo");
set /* from org-dartlang-testcase:///patch_lib.dart */ foo(core::int #t2) → void {
this.{self2::Class::_#Class#foo#isSet} = true;
this.{self2::Class::_#Class#foo} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/injected_late_field_checks/main.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/injected_late_field_checks/main.dart.weak.transformed.expect
index e2b0019..7458102 100644
--- a/pkg/front_end/testcases/late_lowering/injected_late_field_checks/main.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/injected_late_field_checks/main.dart.weak.transformed.expect
@@ -23,7 +23,7 @@
: self2::Class::_#Class#foo#isSet = true, self2::Class::_#Class#foo = foo, super core::Object::•()
;
get /* from org-dartlang-testcase:///patch_lib.dart */ foo() → core::int
- return this.{self2::Class::_#Class#foo#isSet} ?{core::int} let final core::int? #t1 = this.{self2::Class::_#Class#foo} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'foo' has not been initialized.");
+ return this.{self2::Class::_#Class#foo#isSet} ?{core::int} let final core::int? #t1 = this.{self2::Class::_#Class#foo} in #t1{core::int} : throw new _in::LateError::fieldNI("foo");
set /* from org-dartlang-testcase:///patch_lib.dart */ foo(core::int #t2) → void {
this.{self2::Class::_#Class#foo#isSet} = true;
this.{self2::Class::_#Class#foo} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/instance_field_without_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/instance_field_without_initializer.dart.strong.expect
index 2a32553..7fe4159 100644
--- a/pkg/front_end/testcases/late_lowering/instance_field_without_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/instance_field_without_initializer.dart.strong.expect
@@ -18,7 +18,7 @@
: self::Class::_#Class#field = field, super core::Object::•()
;
get field() → core::int
- return let final core::int? #t1 = this.{self::Class::_#Class#field} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::Class::_#Class#field} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("field") : #t1{core::int};
set field(core::int #t2) → void
this.{self::Class::_#Class#field} = #t2;
}
diff --git a/pkg/front_end/testcases/late_lowering/instance_field_without_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/instance_field_without_initializer.dart.strong.transformed.expect
index 2a32553..7fe4159 100644
--- a/pkg/front_end/testcases/late_lowering/instance_field_without_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/instance_field_without_initializer.dart.strong.transformed.expect
@@ -18,7 +18,7 @@
: self::Class::_#Class#field = field, super core::Object::•()
;
get field() → core::int
- return let final core::int? #t1 = this.{self::Class::_#Class#field} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::Class::_#Class#field} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("field") : #t1{core::int};
set field(core::int #t2) → void
this.{self::Class::_#Class#field} = #t2;
}
diff --git a/pkg/front_end/testcases/late_lowering/instance_field_without_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/instance_field_without_initializer.dart.weak.expect
index 1fa0843..1710036 100644
--- a/pkg/front_end/testcases/late_lowering/instance_field_without_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/instance_field_without_initializer.dart.weak.expect
@@ -19,7 +19,7 @@
: self::Class::_#Class#field#isSet = true, self::Class::_#Class#field = field, super core::Object::•()
;
get field() → core::int
- return this.{self::Class::_#Class#field#isSet} ?{core::int} let final core::int? #t1 = this.{self::Class::_#Class#field} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.");
+ return this.{self::Class::_#Class#field#isSet} ?{core::int} let final core::int? #t1 = this.{self::Class::_#Class#field} in #t1{core::int} : throw new _in::LateError::fieldNI("field");
set field(core::int #t2) → void {
this.{self::Class::_#Class#field#isSet} = true;
this.{self::Class::_#Class#field} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/instance_field_without_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/instance_field_without_initializer.dart.weak.transformed.expect
index 1fa0843..1710036 100644
--- a/pkg/front_end/testcases/late_lowering/instance_field_without_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/instance_field_without_initializer.dart.weak.transformed.expect
@@ -19,7 +19,7 @@
: self::Class::_#Class#field#isSet = true, self::Class::_#Class#field = field, super core::Object::•()
;
get field() → core::int
- return this.{self::Class::_#Class#field#isSet} ?{core::int} let final core::int? #t1 = this.{self::Class::_#Class#field} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.");
+ return this.{self::Class::_#Class#field#isSet} ?{core::int} let final core::int? #t1 = this.{self::Class::_#Class#field} in #t1{core::int} : throw new _in::LateError::fieldNI("field");
set field(core::int #t2) → void {
this.{self::Class::_#Class#field#isSet} = true;
this.{self::Class::_#Class#field} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/instance_final_field_without_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/instance_final_field_without_initializer.dart.strong.expect
index cdd56ea..d212088 100644
--- a/pkg/front_end/testcases/late_lowering/instance_final_field_without_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/instance_final_field_without_initializer.dart.strong.expect
@@ -18,12 +18,12 @@
: self::Class::_#Class#field = field, super core::Object::•()
;
get field() → core::int
- return let final core::int? #t1 = this.{self::Class::_#Class#field} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::Class::_#Class#field} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("field") : #t1{core::int};
set field(core::int #t2) → void
if(this.{self::Class::_#Class#field}.==(null))
this.{self::Class::_#Class#field} = #t2;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'field' has already been initialized.");
+ throw new _in::LateError::fieldAI("field");
}
class Subclass extends self::Class {
constructor constructor1() → self::Subclass
diff --git a/pkg/front_end/testcases/late_lowering/instance_final_field_without_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/instance_final_field_without_initializer.dart.strong.transformed.expect
index cdd56ea..d212088 100644
--- a/pkg/front_end/testcases/late_lowering/instance_final_field_without_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/instance_final_field_without_initializer.dart.strong.transformed.expect
@@ -18,12 +18,12 @@
: self::Class::_#Class#field = field, super core::Object::•()
;
get field() → core::int
- return let final core::int? #t1 = this.{self::Class::_#Class#field} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::Class::_#Class#field} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("field") : #t1{core::int};
set field(core::int #t2) → void
if(this.{self::Class::_#Class#field}.==(null))
this.{self::Class::_#Class#field} = #t2;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'field' has already been initialized.");
+ throw new _in::LateError::fieldAI("field");
}
class Subclass extends self::Class {
constructor constructor1() → self::Subclass
diff --git a/pkg/front_end/testcases/late_lowering/instance_final_field_without_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/instance_final_field_without_initializer.dart.weak.expect
index 180d337..effd7a1 100644
--- a/pkg/front_end/testcases/late_lowering/instance_final_field_without_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/instance_final_field_without_initializer.dart.weak.expect
@@ -19,10 +19,10 @@
: self::Class::_#Class#field#isSet = true, self::Class::_#Class#field = field, super core::Object::•()
;
get field() → core::int
- return this.{self::Class::_#Class#field#isSet} ?{core::int} let final core::int? #t1 = this.{self::Class::_#Class#field} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.");
+ return this.{self::Class::_#Class#field#isSet} ?{core::int} let final core::int? #t1 = this.{self::Class::_#Class#field} in #t1{core::int} : throw new _in::LateError::fieldNI("field");
set field(core::int #t2) → void
if(this.{self::Class::_#Class#field#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'field' has already been initialized.");
+ throw new _in::LateError::fieldAI("field");
else {
this.{self::Class::_#Class#field#isSet} = true;
this.{self::Class::_#Class#field} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/instance_final_field_without_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/instance_final_field_without_initializer.dart.weak.transformed.expect
index 180d337..effd7a1 100644
--- a/pkg/front_end/testcases/late_lowering/instance_final_field_without_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/instance_final_field_without_initializer.dart.weak.transformed.expect
@@ -19,10 +19,10 @@
: self::Class::_#Class#field#isSet = true, self::Class::_#Class#field = field, super core::Object::•()
;
get field() → core::int
- return this.{self::Class::_#Class#field#isSet} ?{core::int} let final core::int? #t1 = this.{self::Class::_#Class#field} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.");
+ return this.{self::Class::_#Class#field#isSet} ?{core::int} let final core::int? #t1 = this.{self::Class::_#Class#field} in #t1{core::int} : throw new _in::LateError::fieldNI("field");
set field(core::int #t2) → void
if(this.{self::Class::_#Class#field#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'field' has already been initialized.");
+ throw new _in::LateError::fieldAI("field");
else {
this.{self::Class::_#Class#field#isSet} = true;
this.{self::Class::_#Class#field} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/instance_nullable_field_without_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/instance_nullable_field_without_initializer.dart.strong.expect
index 3bea7e0..76deb58 100644
--- a/pkg/front_end/testcases/late_lowering/instance_nullable_field_without_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/instance_nullable_field_without_initializer.dart.strong.expect
@@ -19,7 +19,7 @@
: self::Class::_#Class#field#isSet = true, self::Class::_#Class#field = field, super core::Object::•()
;
get field() → core::int?
- return this.{self::Class::_#Class#field#isSet} ?{core::int?} this.{self::Class::_#Class#field} : throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.");
+ return this.{self::Class::_#Class#field#isSet} ?{core::int?} this.{self::Class::_#Class#field} : throw new _in::LateError::fieldNI("field");
set field(core::int? #t1) → void {
this.{self::Class::_#Class#field#isSet} = true;
this.{self::Class::_#Class#field} = #t1;
diff --git a/pkg/front_end/testcases/late_lowering/instance_nullable_field_without_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/instance_nullable_field_without_initializer.dart.strong.transformed.expect
index 3bea7e0..76deb58 100644
--- a/pkg/front_end/testcases/late_lowering/instance_nullable_field_without_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/instance_nullable_field_without_initializer.dart.strong.transformed.expect
@@ -19,7 +19,7 @@
: self::Class::_#Class#field#isSet = true, self::Class::_#Class#field = field, super core::Object::•()
;
get field() → core::int?
- return this.{self::Class::_#Class#field#isSet} ?{core::int?} this.{self::Class::_#Class#field} : throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.");
+ return this.{self::Class::_#Class#field#isSet} ?{core::int?} this.{self::Class::_#Class#field} : throw new _in::LateError::fieldNI("field");
set field(core::int? #t1) → void {
this.{self::Class::_#Class#field#isSet} = true;
this.{self::Class::_#Class#field} = #t1;
diff --git a/pkg/front_end/testcases/late_lowering/instance_nullable_field_without_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/instance_nullable_field_without_initializer.dart.weak.expect
index 3bea7e0..76deb58 100644
--- a/pkg/front_end/testcases/late_lowering/instance_nullable_field_without_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/instance_nullable_field_without_initializer.dart.weak.expect
@@ -19,7 +19,7 @@
: self::Class::_#Class#field#isSet = true, self::Class::_#Class#field = field, super core::Object::•()
;
get field() → core::int?
- return this.{self::Class::_#Class#field#isSet} ?{core::int?} this.{self::Class::_#Class#field} : throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.");
+ return this.{self::Class::_#Class#field#isSet} ?{core::int?} this.{self::Class::_#Class#field} : throw new _in::LateError::fieldNI("field");
set field(core::int? #t1) → void {
this.{self::Class::_#Class#field#isSet} = true;
this.{self::Class::_#Class#field} = #t1;
diff --git a/pkg/front_end/testcases/late_lowering/instance_nullable_field_without_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/instance_nullable_field_without_initializer.dart.weak.transformed.expect
index 3bea7e0..76deb58 100644
--- a/pkg/front_end/testcases/late_lowering/instance_nullable_field_without_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/instance_nullable_field_without_initializer.dart.weak.transformed.expect
@@ -19,7 +19,7 @@
: self::Class::_#Class#field#isSet = true, self::Class::_#Class#field = field, super core::Object::•()
;
get field() → core::int?
- return this.{self::Class::_#Class#field#isSet} ?{core::int?} this.{self::Class::_#Class#field} : throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.");
+ return this.{self::Class::_#Class#field#isSet} ?{core::int?} this.{self::Class::_#Class#field} : throw new _in::LateError::fieldNI("field");
set field(core::int? #t1) → void {
this.{self::Class::_#Class#field#isSet} = true;
this.{self::Class::_#Class#field} = #t1;
diff --git a/pkg/front_end/testcases/late_lowering/instance_nullable_final_field_without_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/instance_nullable_final_field_without_initializer.dart.strong.expect
index 26f06e0..310cc22 100644
--- a/pkg/front_end/testcases/late_lowering/instance_nullable_final_field_without_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/instance_nullable_final_field_without_initializer.dart.strong.expect
@@ -19,10 +19,10 @@
: self::Class::_#Class#field#isSet = true, self::Class::_#Class#field = field, super core::Object::•()
;
get field() → core::int?
- return this.{self::Class::_#Class#field#isSet} ?{core::int?} this.{self::Class::_#Class#field} : throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.");
+ return this.{self::Class::_#Class#field#isSet} ?{core::int?} this.{self::Class::_#Class#field} : throw new _in::LateError::fieldNI("field");
set field(core::int? #t1) → void
if(this.{self::Class::_#Class#field#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'field' has already been initialized.");
+ throw new _in::LateError::fieldAI("field");
else {
this.{self::Class::_#Class#field#isSet} = true;
this.{self::Class::_#Class#field} = #t1;
diff --git a/pkg/front_end/testcases/late_lowering/instance_nullable_final_field_without_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/instance_nullable_final_field_without_initializer.dart.strong.transformed.expect
index 26f06e0..310cc22 100644
--- a/pkg/front_end/testcases/late_lowering/instance_nullable_final_field_without_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/instance_nullable_final_field_without_initializer.dart.strong.transformed.expect
@@ -19,10 +19,10 @@
: self::Class::_#Class#field#isSet = true, self::Class::_#Class#field = field, super core::Object::•()
;
get field() → core::int?
- return this.{self::Class::_#Class#field#isSet} ?{core::int?} this.{self::Class::_#Class#field} : throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.");
+ return this.{self::Class::_#Class#field#isSet} ?{core::int?} this.{self::Class::_#Class#field} : throw new _in::LateError::fieldNI("field");
set field(core::int? #t1) → void
if(this.{self::Class::_#Class#field#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'field' has already been initialized.");
+ throw new _in::LateError::fieldAI("field");
else {
this.{self::Class::_#Class#field#isSet} = true;
this.{self::Class::_#Class#field} = #t1;
diff --git a/pkg/front_end/testcases/late_lowering/instance_nullable_final_field_without_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/instance_nullable_final_field_without_initializer.dart.weak.expect
index 26f06e0..310cc22 100644
--- a/pkg/front_end/testcases/late_lowering/instance_nullable_final_field_without_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/instance_nullable_final_field_without_initializer.dart.weak.expect
@@ -19,10 +19,10 @@
: self::Class::_#Class#field#isSet = true, self::Class::_#Class#field = field, super core::Object::•()
;
get field() → core::int?
- return this.{self::Class::_#Class#field#isSet} ?{core::int?} this.{self::Class::_#Class#field} : throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.");
+ return this.{self::Class::_#Class#field#isSet} ?{core::int?} this.{self::Class::_#Class#field} : throw new _in::LateError::fieldNI("field");
set field(core::int? #t1) → void
if(this.{self::Class::_#Class#field#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'field' has already been initialized.");
+ throw new _in::LateError::fieldAI("field");
else {
this.{self::Class::_#Class#field#isSet} = true;
this.{self::Class::_#Class#field} = #t1;
diff --git a/pkg/front_end/testcases/late_lowering/instance_nullable_final_field_without_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/instance_nullable_final_field_without_initializer.dart.weak.transformed.expect
index 26f06e0..310cc22 100644
--- a/pkg/front_end/testcases/late_lowering/instance_nullable_final_field_without_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/instance_nullable_final_field_without_initializer.dart.weak.transformed.expect
@@ -19,10 +19,10 @@
: self::Class::_#Class#field#isSet = true, self::Class::_#Class#field = field, super core::Object::•()
;
get field() → core::int?
- return this.{self::Class::_#Class#field#isSet} ?{core::int?} this.{self::Class::_#Class#field} : throw new _in::LateInitializationErrorImpl::•("Field 'field' has not been initialized.");
+ return this.{self::Class::_#Class#field#isSet} ?{core::int?} this.{self::Class::_#Class#field} : throw new _in::LateError::fieldNI("field");
set field(core::int? #t1) → void
if(this.{self::Class::_#Class#field#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'field' has already been initialized.");
+ throw new _in::LateError::fieldAI("field");
else {
this.{self::Class::_#Class#field#isSet} = true;
this.{self::Class::_#Class#field} = #t1;
diff --git a/pkg/front_end/testcases/late_lowering/issue40373.dart.strong.expect b/pkg/front_end/testcases/late_lowering/issue40373.dart.strong.expect
index ecf82f3..b7c4bbf 100644
--- a/pkg/front_end/testcases/late_lowering/issue40373.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40373.dart.strong.expect
@@ -16,7 +16,7 @@
set p1(core::num #t2) → void
this.{self::C::_#C#p1} = #t2;
get p2() → core::num
- return let final core::num? #t3 = this.{self::C::_#C#p2} in #t3.==(null) ?{core::num} let final core::num #t4 = this.{self::C::pi} in this.{self::C::_#C#p2}.==(null) ?{core::num} this.{self::C::_#C#p2} = #t4 : throw new _in::LateInitializationErrorImpl::•("Field 'p2' has been assigned during initialization.") : #t3{core::num};
+ return let final core::num? #t3 = this.{self::C::_#C#p2} in #t3.==(null) ?{core::num} let final core::num #t4 = this.{self::C::pi} in this.{self::C::_#C#p2}.==(null) ?{core::num} this.{self::C::_#C#p2} = #t4 : throw new _in::LateError::fieldADI("p2") : #t3{core::num};
}
static method main() → dynamic {
self::expect(3.14, new self::C::•().{self::C::p1});
diff --git a/pkg/front_end/testcases/late_lowering/issue40373.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/issue40373.dart.strong.transformed.expect
index ecf82f3..b7c4bbf 100644
--- a/pkg/front_end/testcases/late_lowering/issue40373.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40373.dart.strong.transformed.expect
@@ -16,7 +16,7 @@
set p1(core::num #t2) → void
this.{self::C::_#C#p1} = #t2;
get p2() → core::num
- return let final core::num? #t3 = this.{self::C::_#C#p2} in #t3.==(null) ?{core::num} let final core::num #t4 = this.{self::C::pi} in this.{self::C::_#C#p2}.==(null) ?{core::num} this.{self::C::_#C#p2} = #t4 : throw new _in::LateInitializationErrorImpl::•("Field 'p2' has been assigned during initialization.") : #t3{core::num};
+ return let final core::num? #t3 = this.{self::C::_#C#p2} in #t3.==(null) ?{core::num} let final core::num #t4 = this.{self::C::pi} in this.{self::C::_#C#p2}.==(null) ?{core::num} this.{self::C::_#C#p2} = #t4 : throw new _in::LateError::fieldADI("p2") : #t3{core::num};
}
static method main() → dynamic {
self::expect(3.14, new self::C::•().{self::C::p1});
diff --git a/pkg/front_end/testcases/late_lowering/issue40373.dart.weak.expect b/pkg/front_end/testcases/late_lowering/issue40373.dart.weak.expect
index 3fc2e39..b9751eb 100644
--- a/pkg/front_end/testcases/late_lowering/issue40373.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40373.dart.weak.expect
@@ -27,7 +27,7 @@
if(!this.{self::C::_#C#p2#isSet}) {
final core::num #t3 = this.{self::C::pi};
if(this.{self::C::_#C#p2#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'p2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("p2");
this.{self::C::_#C#p2} = #t3;
this.{self::C::_#C#p2#isSet} = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/issue40373.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/issue40373.dart.weak.transformed.expect
index 3fc2e39..b9751eb 100644
--- a/pkg/front_end/testcases/late_lowering/issue40373.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40373.dart.weak.transformed.expect
@@ -27,7 +27,7 @@
if(!this.{self::C::_#C#p2#isSet}) {
final core::num #t3 = this.{self::C::pi};
if(this.{self::C::_#C#p2#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'p2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("p2");
this.{self::C::_#C#p2} = #t3;
this.{self::C::_#C#p2#isSet} = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/issue40373b.dart.strong.expect b/pkg/front_end/testcases/late_lowering/issue40373b.dart.strong.expect
index ba0c369..8eb1418 100644
--- a/pkg/front_end/testcases/late_lowering/issue40373b.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40373b.dart.strong.expect
@@ -12,19 +12,19 @@
: super core::Object::•()
;
static get s() → dynamic
- return self::C::_#s#isSet ?{dynamic} self::C::_#s : throw new _in::LateInitializationErrorImpl::•("Field 's' has not been initialized.");
+ return self::C::_#s#isSet ?{dynamic} self::C::_#s : throw new _in::LateError::fieldNI("s");
static set s(dynamic #t1) → void
if(self::C::_#s#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 's' has already been initialized.");
+ throw new _in::LateError::fieldAI("s");
else {
self::C::_#s#isSet = true;
self::C::_#s = #t1;
}
get v() → dynamic
- return this.{self::C::_#C#v#isSet} ?{dynamic} this.{self::C::_#C#v} : throw new _in::LateInitializationErrorImpl::•("Field 'v' has not been initialized.");
+ return this.{self::C::_#C#v#isSet} ?{dynamic} this.{self::C::_#C#v} : throw new _in::LateError::fieldNI("v");
set v(dynamic #t2) → void
if(this.{self::C::_#C#v#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'v' has already been initialized.");
+ throw new _in::LateError::fieldAI("v");
else {
this.{self::C::_#C#v#isSet} = true;
this.{self::C::_#C#v} = #t2;
@@ -33,10 +33,10 @@
static field dynamic _#g = null;
static field core::bool _#g#isSet = false;
static get g() → dynamic
- return self::_#g#isSet ?{dynamic} self::_#g : throw new _in::LateInitializationErrorImpl::•("Field 'g' has not been initialized.");
+ return self::_#g#isSet ?{dynamic} self::_#g : throw new _in::LateError::fieldNI("g");
static set g(dynamic #t3) → void
if(self::_#g#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'g' has already been initialized.");
+ throw new _in::LateError::fieldAI("g");
else {
self::_#g#isSet = true;
self::_#g = #t3;
@@ -45,10 +45,10 @@
final dynamic l;
core::bool #l#isSet = false;
function #l#get() → dynamic
- return #l#isSet ?{dynamic} l : throw new _in::LateInitializationErrorImpl::•("Local 'l' has not been initialized.");
+ return #l#isSet ?{dynamic} l : throw new _in::LateError::localNI("l");
function #l#set(dynamic #t4) → dynamic
if(#l#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'l' has already been initialized.");
+ throw new _in::LateError::localAI("l");
else {
#l#isSet = true;
return l = #t4;
diff --git a/pkg/front_end/testcases/late_lowering/issue40373b.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/issue40373b.dart.strong.transformed.expect
index ba0c369..8eb1418 100644
--- a/pkg/front_end/testcases/late_lowering/issue40373b.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40373b.dart.strong.transformed.expect
@@ -12,19 +12,19 @@
: super core::Object::•()
;
static get s() → dynamic
- return self::C::_#s#isSet ?{dynamic} self::C::_#s : throw new _in::LateInitializationErrorImpl::•("Field 's' has not been initialized.");
+ return self::C::_#s#isSet ?{dynamic} self::C::_#s : throw new _in::LateError::fieldNI("s");
static set s(dynamic #t1) → void
if(self::C::_#s#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 's' has already been initialized.");
+ throw new _in::LateError::fieldAI("s");
else {
self::C::_#s#isSet = true;
self::C::_#s = #t1;
}
get v() → dynamic
- return this.{self::C::_#C#v#isSet} ?{dynamic} this.{self::C::_#C#v} : throw new _in::LateInitializationErrorImpl::•("Field 'v' has not been initialized.");
+ return this.{self::C::_#C#v#isSet} ?{dynamic} this.{self::C::_#C#v} : throw new _in::LateError::fieldNI("v");
set v(dynamic #t2) → void
if(this.{self::C::_#C#v#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'v' has already been initialized.");
+ throw new _in::LateError::fieldAI("v");
else {
this.{self::C::_#C#v#isSet} = true;
this.{self::C::_#C#v} = #t2;
@@ -33,10 +33,10 @@
static field dynamic _#g = null;
static field core::bool _#g#isSet = false;
static get g() → dynamic
- return self::_#g#isSet ?{dynamic} self::_#g : throw new _in::LateInitializationErrorImpl::•("Field 'g' has not been initialized.");
+ return self::_#g#isSet ?{dynamic} self::_#g : throw new _in::LateError::fieldNI("g");
static set g(dynamic #t3) → void
if(self::_#g#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'g' has already been initialized.");
+ throw new _in::LateError::fieldAI("g");
else {
self::_#g#isSet = true;
self::_#g = #t3;
@@ -45,10 +45,10 @@
final dynamic l;
core::bool #l#isSet = false;
function #l#get() → dynamic
- return #l#isSet ?{dynamic} l : throw new _in::LateInitializationErrorImpl::•("Local 'l' has not been initialized.");
+ return #l#isSet ?{dynamic} l : throw new _in::LateError::localNI("l");
function #l#set(dynamic #t4) → dynamic
if(#l#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'l' has already been initialized.");
+ throw new _in::LateError::localAI("l");
else {
#l#isSet = true;
return l = #t4;
diff --git a/pkg/front_end/testcases/late_lowering/issue40373b.dart.weak.expect b/pkg/front_end/testcases/late_lowering/issue40373b.dart.weak.expect
index ba0c369..8eb1418 100644
--- a/pkg/front_end/testcases/late_lowering/issue40373b.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40373b.dart.weak.expect
@@ -12,19 +12,19 @@
: super core::Object::•()
;
static get s() → dynamic
- return self::C::_#s#isSet ?{dynamic} self::C::_#s : throw new _in::LateInitializationErrorImpl::•("Field 's' has not been initialized.");
+ return self::C::_#s#isSet ?{dynamic} self::C::_#s : throw new _in::LateError::fieldNI("s");
static set s(dynamic #t1) → void
if(self::C::_#s#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 's' has already been initialized.");
+ throw new _in::LateError::fieldAI("s");
else {
self::C::_#s#isSet = true;
self::C::_#s = #t1;
}
get v() → dynamic
- return this.{self::C::_#C#v#isSet} ?{dynamic} this.{self::C::_#C#v} : throw new _in::LateInitializationErrorImpl::•("Field 'v' has not been initialized.");
+ return this.{self::C::_#C#v#isSet} ?{dynamic} this.{self::C::_#C#v} : throw new _in::LateError::fieldNI("v");
set v(dynamic #t2) → void
if(this.{self::C::_#C#v#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'v' has already been initialized.");
+ throw new _in::LateError::fieldAI("v");
else {
this.{self::C::_#C#v#isSet} = true;
this.{self::C::_#C#v} = #t2;
@@ -33,10 +33,10 @@
static field dynamic _#g = null;
static field core::bool _#g#isSet = false;
static get g() → dynamic
- return self::_#g#isSet ?{dynamic} self::_#g : throw new _in::LateInitializationErrorImpl::•("Field 'g' has not been initialized.");
+ return self::_#g#isSet ?{dynamic} self::_#g : throw new _in::LateError::fieldNI("g");
static set g(dynamic #t3) → void
if(self::_#g#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'g' has already been initialized.");
+ throw new _in::LateError::fieldAI("g");
else {
self::_#g#isSet = true;
self::_#g = #t3;
@@ -45,10 +45,10 @@
final dynamic l;
core::bool #l#isSet = false;
function #l#get() → dynamic
- return #l#isSet ?{dynamic} l : throw new _in::LateInitializationErrorImpl::•("Local 'l' has not been initialized.");
+ return #l#isSet ?{dynamic} l : throw new _in::LateError::localNI("l");
function #l#set(dynamic #t4) → dynamic
if(#l#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'l' has already been initialized.");
+ throw new _in::LateError::localAI("l");
else {
#l#isSet = true;
return l = #t4;
diff --git a/pkg/front_end/testcases/late_lowering/issue40373b.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/issue40373b.dart.weak.transformed.expect
index ba0c369..8eb1418 100644
--- a/pkg/front_end/testcases/late_lowering/issue40373b.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40373b.dart.weak.transformed.expect
@@ -12,19 +12,19 @@
: super core::Object::•()
;
static get s() → dynamic
- return self::C::_#s#isSet ?{dynamic} self::C::_#s : throw new _in::LateInitializationErrorImpl::•("Field 's' has not been initialized.");
+ return self::C::_#s#isSet ?{dynamic} self::C::_#s : throw new _in::LateError::fieldNI("s");
static set s(dynamic #t1) → void
if(self::C::_#s#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 's' has already been initialized.");
+ throw new _in::LateError::fieldAI("s");
else {
self::C::_#s#isSet = true;
self::C::_#s = #t1;
}
get v() → dynamic
- return this.{self::C::_#C#v#isSet} ?{dynamic} this.{self::C::_#C#v} : throw new _in::LateInitializationErrorImpl::•("Field 'v' has not been initialized.");
+ return this.{self::C::_#C#v#isSet} ?{dynamic} this.{self::C::_#C#v} : throw new _in::LateError::fieldNI("v");
set v(dynamic #t2) → void
if(this.{self::C::_#C#v#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'v' has already been initialized.");
+ throw new _in::LateError::fieldAI("v");
else {
this.{self::C::_#C#v#isSet} = true;
this.{self::C::_#C#v} = #t2;
@@ -33,10 +33,10 @@
static field dynamic _#g = null;
static field core::bool _#g#isSet = false;
static get g() → dynamic
- return self::_#g#isSet ?{dynamic} self::_#g : throw new _in::LateInitializationErrorImpl::•("Field 'g' has not been initialized.");
+ return self::_#g#isSet ?{dynamic} self::_#g : throw new _in::LateError::fieldNI("g");
static set g(dynamic #t3) → void
if(self::_#g#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'g' has already been initialized.");
+ throw new _in::LateError::fieldAI("g");
else {
self::_#g#isSet = true;
self::_#g = #t3;
@@ -45,10 +45,10 @@
final dynamic l;
core::bool #l#isSet = false;
function #l#get() → dynamic
- return #l#isSet ?{dynamic} l : throw new _in::LateInitializationErrorImpl::•("Local 'l' has not been initialized.");
+ return #l#isSet ?{dynamic} l : throw new _in::LateError::localNI("l");
function #l#set(dynamic #t4) → dynamic
if(#l#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'l' has already been initialized.");
+ throw new _in::LateError::localAI("l");
else {
#l#isSet = true;
return l = #t4;
diff --git a/pkg/front_end/testcases/late_lowering/issue40601.dart.strong.expect b/pkg/front_end/testcases/late_lowering/issue40601.dart.strong.expect
index b339c0e..34dd272 100644
--- a/pkg/front_end/testcases/late_lowering/issue40601.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40601.dart.strong.expect
@@ -13,7 +13,7 @@
self::A::T? value;
core::bool #value#isSet = false;
function #value#get() → self::A::T%
- return #value#isSet ?{self::A::T%} value{self::A::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'value' has not been initialized.");
+ return #value#isSet ?{self::A::T%} value{self::A::T%} : throw new _in::LateError::localNI("value");
function #value#set(self::A::T% #t1) → dynamic {
#value#isSet = true;
return value = #t1;
diff --git a/pkg/front_end/testcases/late_lowering/issue40601.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/issue40601.dart.strong.transformed.expect
index b339c0e..34dd272 100644
--- a/pkg/front_end/testcases/late_lowering/issue40601.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40601.dart.strong.transformed.expect
@@ -13,7 +13,7 @@
self::A::T? value;
core::bool #value#isSet = false;
function #value#get() → self::A::T%
- return #value#isSet ?{self::A::T%} value{self::A::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'value' has not been initialized.");
+ return #value#isSet ?{self::A::T%} value{self::A::T%} : throw new _in::LateError::localNI("value");
function #value#set(self::A::T% #t1) → dynamic {
#value#isSet = true;
return value = #t1;
diff --git a/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.expect b/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.expect
index b339c0e..34dd272 100644
--- a/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.expect
@@ -13,7 +13,7 @@
self::A::T? value;
core::bool #value#isSet = false;
function #value#get() → self::A::T%
- return #value#isSet ?{self::A::T%} value{self::A::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'value' has not been initialized.");
+ return #value#isSet ?{self::A::T%} value{self::A::T%} : throw new _in::LateError::localNI("value");
function #value#set(self::A::T% #t1) → dynamic {
#value#isSet = true;
return value = #t1;
diff --git a/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.transformed.expect
index b339c0e..34dd272 100644
--- a/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.transformed.expect
@@ -13,7 +13,7 @@
self::A::T? value;
core::bool #value#isSet = false;
function #value#get() → self::A::T%
- return #value#isSet ?{self::A::T%} value{self::A::T%} : throw new _in::LateInitializationErrorImpl::•("Local 'value' has not been initialized.");
+ return #value#isSet ?{self::A::T%} value{self::A::T%} : throw new _in::LateError::localNI("value");
function #value#set(self::A::T% #t1) → dynamic {
#value#isSet = true;
return value = #t1;
diff --git a/pkg/front_end/testcases/late_lowering/issue40805.dart.strong.expect b/pkg/front_end/testcases/late_lowering/issue40805.dart.strong.expect
index 2f75d09..7df4dbc 100644
--- a/pkg/front_end/testcases/late_lowering/issue40805.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40805.dart.strong.expect
@@ -9,12 +9,12 @@
: super core::Object::•()
;
get x() → core::int
- return let final core::int? #t1 = this.{self::C::_#C#x} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::C::_#C#x} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("x") : #t1{core::int};
set x(covariant core::int #t2) → void
if(this.{self::C::_#C#x}.==(null))
this.{self::C::_#C#x} = #t2;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'x' has already been initialized.");
+ throw new _in::LateError::fieldAI("x");
}
class D extends self::C {
synthetic constructor •() → self::D
diff --git a/pkg/front_end/testcases/late_lowering/issue40805.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/issue40805.dart.strong.transformed.expect
index 2f75d09..7df4dbc 100644
--- a/pkg/front_end/testcases/late_lowering/issue40805.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40805.dart.strong.transformed.expect
@@ -9,12 +9,12 @@
: super core::Object::•()
;
get x() → core::int
- return let final core::int? #t1 = this.{self::C::_#C#x} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::C::_#C#x} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("x") : #t1{core::int};
set x(covariant core::int #t2) → void
if(this.{self::C::_#C#x}.==(null))
this.{self::C::_#C#x} = #t2;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'x' has already been initialized.");
+ throw new _in::LateError::fieldAI("x");
}
class D extends self::C {
synthetic constructor •() → self::D
diff --git a/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.expect b/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.expect
index aead618..d0b344e 100644
--- a/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.expect
@@ -10,10 +10,10 @@
: super core::Object::•()
;
get x() → core::int
- return this.{self::C::_#C#x#isSet} ?{core::int} let final core::int? #t1 = this.{self::C::_#C#x} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.");
+ return this.{self::C::_#C#x#isSet} ?{core::int} let final core::int? #t1 = this.{self::C::_#C#x} in #t1{core::int} : throw new _in::LateError::fieldNI("x");
set x(covariant core::int #t2) → void
if(this.{self::C::_#C#x#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'x' has already been initialized.");
+ throw new _in::LateError::fieldAI("x");
else {
this.{self::C::_#C#x#isSet} = true;
this.{self::C::_#C#x} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.transformed.expect
index aead618..d0b344e 100644
--- a/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.transformed.expect
@@ -10,10 +10,10 @@
: super core::Object::•()
;
get x() → core::int
- return this.{self::C::_#C#x#isSet} ?{core::int} let final core::int? #t1 = this.{self::C::_#C#x} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.");
+ return this.{self::C::_#C#x#isSet} ?{core::int} let final core::int? #t1 = this.{self::C::_#C#x} in #t1{core::int} : throw new _in::LateError::fieldNI("x");
set x(covariant core::int #t2) → void
if(this.{self::C::_#C#x#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'x' has already been initialized.");
+ throw new _in::LateError::fieldAI("x");
else {
this.{self::C::_#C#x#isSet} = true;
this.{self::C::_#C#x} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/issue41436/issue41436.dart.strong.expect b/pkg/front_end/testcases/late_lowering/issue41436/issue41436.dart.strong.expect
index 139a488..3c27241 100644
--- a/pkg/front_end/testcases/late_lowering/issue41436/issue41436.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/issue41436/issue41436.dart.strong.expect
@@ -19,7 +19,7 @@
: super core::Object::•()
;
get x() → core::int
- return let final core::int? #t1 = this.{test::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{test::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("x") : #t1{core::int};
set x(core::int #t2) → void
this.{test::A::_#A#x} = #t2;
}
diff --git a/pkg/front_end/testcases/late_lowering/issue41436/issue41436.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/issue41436/issue41436.dart.strong.transformed.expect
index 139a488..3c27241 100644
--- a/pkg/front_end/testcases/late_lowering/issue41436/issue41436.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue41436/issue41436.dart.strong.transformed.expect
@@ -19,7 +19,7 @@
: super core::Object::•()
;
get x() → core::int
- return let final core::int? #t1 = this.{test::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{test::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("x") : #t1{core::int};
set x(core::int #t2) → void
this.{test::A::_#A#x} = #t2;
}
diff --git a/pkg/front_end/testcases/late_lowering/issue41436/issue41436.dart.weak.expect b/pkg/front_end/testcases/late_lowering/issue41436/issue41436.dart.weak.expect
index 3872041..132542f 100644
--- a/pkg/front_end/testcases/late_lowering/issue41436/issue41436.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/issue41436/issue41436.dart.weak.expect
@@ -20,7 +20,7 @@
: super core::Object::•()
;
get x() → core::int
- return this.{test::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{test::A::_#A#x} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.");
+ return this.{test::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{test::A::_#A#x} in #t1{core::int} : throw new _in::LateError::fieldNI("x");
set x(core::int #t2) → void {
this.{test::A::_#A#x#isSet} = true;
this.{test::A::_#A#x} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/issue41436/issue41436.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/issue41436/issue41436.dart.weak.transformed.expect
index 3872041..132542f 100644
--- a/pkg/front_end/testcases/late_lowering/issue41436/issue41436.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue41436/issue41436.dart.weak.transformed.expect
@@ -20,7 +20,7 @@
: super core::Object::•()
;
get x() → core::int
- return this.{test::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{test::A::_#A#x} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.");
+ return this.{test::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{test::A::_#A#x} in #t1{core::int} : throw new _in::LateError::fieldNI("x");
set x(core::int #t2) → void {
this.{test::A::_#A#x#isSet} = true;
this.{test::A::_#A#x} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/issue41436b.dart.strong.expect b/pkg/front_end/testcases/late_lowering/issue41436b.dart.strong.expect
index 61c5d86..61f91a8 100644
--- a/pkg/front_end/testcases/late_lowering/issue41436b.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/issue41436b.dart.strong.expect
@@ -9,7 +9,7 @@
: super core::Object::•()
;
get x() → core::int
- return let final core::int? #t1 = this.{self::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("x") : #t1{core::int};
set x(core::int #t2) → void
this.{self::A::_#A#x} = #t2;
}
diff --git a/pkg/front_end/testcases/late_lowering/issue41436b.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/issue41436b.dart.strong.transformed.expect
index 61c5d86..61f91a8 100644
--- a/pkg/front_end/testcases/late_lowering/issue41436b.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue41436b.dart.strong.transformed.expect
@@ -9,7 +9,7 @@
: super core::Object::•()
;
get x() → core::int
- return let final core::int? #t1 = this.{self::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("x") : #t1{core::int};
set x(core::int #t2) → void
this.{self::A::_#A#x} = #t2;
}
diff --git a/pkg/front_end/testcases/late_lowering/issue41436b.dart.weak.expect b/pkg/front_end/testcases/late_lowering/issue41436b.dart.weak.expect
index 34bca462..33ef62f 100644
--- a/pkg/front_end/testcases/late_lowering/issue41436b.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/issue41436b.dart.weak.expect
@@ -10,7 +10,7 @@
: super core::Object::•()
;
get x() → core::int
- return this.{self::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#x} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.");
+ return this.{self::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#x} in #t1{core::int} : throw new _in::LateError::fieldNI("x");
set x(core::int #t2) → void {
this.{self::A::_#A#x#isSet} = true;
this.{self::A::_#A#x} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/issue41436b.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/issue41436b.dart.weak.transformed.expect
index 34bca462..33ef62f 100644
--- a/pkg/front_end/testcases/late_lowering/issue41436b.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue41436b.dart.weak.transformed.expect
@@ -10,7 +10,7 @@
: super core::Object::•()
;
get x() → core::int
- return this.{self::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#x} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.");
+ return this.{self::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#x} in #t1{core::int} : throw new _in::LateError::fieldNI("x");
set x(core::int #t2) → void {
this.{self::A::_#A#x#isSet} = true;
this.{self::A::_#A#x} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.expect b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.expect
index 05bf5e3..6e6d809 100644
--- a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.expect
@@ -29,7 +29,7 @@
: super core::Object::•()
;
get x() → core::int
- return let final core::int? #t1 = this.{iss::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{iss::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("x") : #t1{core::int};
set x(core::int #t2) → void
this.{iss::A::_#A#x} = #t2;
}
diff --git a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.transformed.expect
index 05bf5e3..6e6d809 100644
--- a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.transformed.expect
@@ -29,7 +29,7 @@
: super core::Object::•()
;
get x() → core::int
- return let final core::int? #t1 = this.{iss::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{iss::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("x") : #t1{core::int};
set x(core::int #t2) → void
this.{iss::A::_#A#x} = #t2;
}
diff --git a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.expect b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.expect
index 432f8c1..bf446b5 100644
--- a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.expect
@@ -34,7 +34,7 @@
: super core::Object::•()
;
get x() → core::int
- return this.{iss::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{iss::A::_#A#x} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.");
+ return this.{iss::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{iss::A::_#A#x} in #t1{core::int} : throw new _in::LateError::fieldNI("x");
set x(core::int #t2) → void {
this.{iss::A::_#A#x#isSet} = true;
this.{iss::A::_#A#x} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.transformed.expect
index 432f8c1..bf446b5 100644
--- a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.transformed.expect
@@ -34,7 +34,7 @@
: super core::Object::•()
;
get x() → core::int
- return this.{iss::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{iss::A::_#A#x} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.");
+ return this.{iss::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{iss::A::_#A#x} in #t1{core::int} : throw new _in::LateError::fieldNI("x");
set x(core::int #t2) → void {
this.{iss::A::_#A#x#isSet} = true;
this.{iss::A::_#A#x} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/issue42407.dart.strong.expect b/pkg/front_end/testcases/late_lowering/issue42407.dart.strong.expect
index e158898..e2cc0e7 100644
--- a/pkg/front_end/testcases/late_lowering/issue42407.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/issue42407.dart.strong.expect
@@ -10,7 +10,7 @@
: super core::Object::•()
;
get x() → self::A::T%
- return this.{self::A::_#A#x#isSet} ?{self::A::T%} let final self::A::T? #t1 = this.{self::A::_#A#x} in #t1{self::A::T%} : throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.");
+ return this.{self::A::_#A#x#isSet} ?{self::A::T%} let final self::A::T? #t1 = this.{self::A::_#A#x} in #t1{self::A::T%} : throw new _in::LateError::fieldNI("x");
set x(generic-covariant-impl self::A::T% #t2) → void {
this.{self::A::_#A#x#isSet} = true;
this.{self::A::_#A#x} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/issue42407.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/issue42407.dart.strong.transformed.expect
index e158898..e2cc0e7 100644
--- a/pkg/front_end/testcases/late_lowering/issue42407.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue42407.dart.strong.transformed.expect
@@ -10,7 +10,7 @@
: super core::Object::•()
;
get x() → self::A::T%
- return this.{self::A::_#A#x#isSet} ?{self::A::T%} let final self::A::T? #t1 = this.{self::A::_#A#x} in #t1{self::A::T%} : throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.");
+ return this.{self::A::_#A#x#isSet} ?{self::A::T%} let final self::A::T? #t1 = this.{self::A::_#A#x} in #t1{self::A::T%} : throw new _in::LateError::fieldNI("x");
set x(generic-covariant-impl self::A::T% #t2) → void {
this.{self::A::_#A#x#isSet} = true;
this.{self::A::_#A#x} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.expect b/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.expect
index e158898..e2cc0e7 100644
--- a/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.expect
@@ -10,7 +10,7 @@
: super core::Object::•()
;
get x() → self::A::T%
- return this.{self::A::_#A#x#isSet} ?{self::A::T%} let final self::A::T? #t1 = this.{self::A::_#A#x} in #t1{self::A::T%} : throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.");
+ return this.{self::A::_#A#x#isSet} ?{self::A::T%} let final self::A::T? #t1 = this.{self::A::_#A#x} in #t1{self::A::T%} : throw new _in::LateError::fieldNI("x");
set x(generic-covariant-impl self::A::T% #t2) → void {
this.{self::A::_#A#x#isSet} = true;
this.{self::A::_#A#x} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.transformed.expect
index e158898..e2cc0e7 100644
--- a/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.transformed.expect
@@ -10,7 +10,7 @@
: super core::Object::•()
;
get x() → self::A::T%
- return this.{self::A::_#A#x#isSet} ?{self::A::T%} let final self::A::T? #t1 = this.{self::A::_#A#x} in #t1{self::A::T%} : throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.");
+ return this.{self::A::_#A#x#isSet} ?{self::A::T%} let final self::A::T? #t1 = this.{self::A::_#A#x} in #t1{self::A::T%} : throw new _in::LateError::fieldNI("x");
set x(generic-covariant-impl self::A::T% #t2) → void {
this.{self::A::_#A#x#isSet} = true;
this.{self::A::_#A#x} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/late_annotations.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_annotations.dart.strong.expect
index 44d325d..3adbaa8 100644
--- a/pkg/front_end/testcases/late_lowering/late_annotations.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_annotations.dart.strong.expect
@@ -21,46 +21,46 @@
;
@#C1
get instanceField() → core::int
- return let final core::int? #t1 = this.{self::A::_#A#instanceField} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'instanceField' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::A::_#A#instanceField} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("instanceField") : #t1{core::int};
@#C1
set instanceField(core::int #t2) → void
this.{self::A::_#A#instanceField} = #t2;
@#C1
get finalInstanceField() → core::int
- return let final core::int? #t3 = this.{self::A::_#A#finalInstanceField} in #t3.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has not been initialized.") : #t3{core::int};
+ return let final core::int? #t3 = this.{self::A::_#A#finalInstanceField} in #t3.==(null) ?{core::int} throw new _in::LateError::fieldNI("finalInstanceField") : #t3{core::int};
@#C1
set finalInstanceField(core::int #t4) → void
if(this.{self::A::_#A#finalInstanceField}.==(null))
this.{self::A::_#A#finalInstanceField} = #t4;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalInstanceField");
@#C1
get finalInstanceFieldWithInitializer() → core::int
- return let final core::int? #t5 = this.{self::A::_#A#finalInstanceFieldWithInitializer} in #t5.==(null) ?{core::int} let final core::int #t6 = 0 in this.{self::A::_#A#finalInstanceFieldWithInitializer}.==(null) ?{core::int} this.{self::A::_#A#finalInstanceFieldWithInitializer} = #t6 : throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceFieldWithInitializer' has been assigned during initialization.") : #t5{core::int};
+ return let final core::int? #t5 = this.{self::A::_#A#finalInstanceFieldWithInitializer} in #t5.==(null) ?{core::int} let final core::int #t6 = 0 in this.{self::A::_#A#finalInstanceFieldWithInitializer}.==(null) ?{core::int} this.{self::A::_#A#finalInstanceFieldWithInitializer} = #t6 : throw new _in::LateError::fieldADI("finalInstanceFieldWithInitializer") : #t5{core::int};
@#C1
get covariantInstanceField() → core::num
- return let final core::num? #t7 = this.{self::A::_#A#covariantInstanceField} in #t7.==(null) ?{core::num} throw new _in::LateInitializationErrorImpl::•("Field 'covariantInstanceField' has not been initialized.") : #t7{core::num};
+ return let final core::num? #t7 = this.{self::A::_#A#covariantInstanceField} in #t7.==(null) ?{core::num} throw new _in::LateError::fieldNI("covariantInstanceField") : #t7{core::num};
@#C1
set covariantInstanceField(covariant core::num #t8) → void
this.{self::A::_#A#covariantInstanceField} = #t8;
@#C1
static get staticField() → core::int
- return let final core::int? #t9 = self::A::_#staticField in #t9.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'staticField' has not been initialized.") : #t9{core::int};
+ return let final core::int? #t9 = self::A::_#staticField in #t9.==(null) ?{core::int} throw new _in::LateError::fieldNI("staticField") : #t9{core::int};
@#C1
static set staticField(core::int #t10) → void
self::A::_#staticField = #t10;
@#C1
static get finalStaticField() → core::int
- return let final core::int? #t11 = self::A::_#finalStaticField in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticField' has not been initialized.") : #t11{core::int};
+ return let final core::int? #t11 = self::A::_#finalStaticField in #t11.==(null) ?{core::int} throw new _in::LateError::fieldNI("finalStaticField") : #t11{core::int};
@#C1
static set finalStaticField(core::int #t12) → void
if(self::A::_#finalStaticField.==(null))
self::A::_#finalStaticField = #t12;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalStaticField");
@#C1
static get finalStaticFieldWithInitializer() → core::int
- return let final core::int? #t13 = self::A::_#finalStaticFieldWithInitializer in #t13.==(null) ?{core::int} let final core::int #t14 = 0 in self::A::_#finalStaticFieldWithInitializer.==(null) ?{core::int} self::A::_#finalStaticFieldWithInitializer = #t14 : throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticFieldWithInitializer' has been assigned during initialization.") : #t13{core::int};
+ return let final core::int? #t13 = self::A::_#finalStaticFieldWithInitializer in #t13.==(null) ?{core::int} let final core::int #t14 = 0 in self::A::_#finalStaticFieldWithInitializer.==(null) ?{core::int} self::A::_#finalStaticFieldWithInitializer = #t14 : throw new _in::LateError::fieldADI("finalStaticFieldWithInitializer") : #t13{core::int};
}
abstract class B extends core::Object /*isMixinDeclaration*/ {
field core::int? _#B#instanceField = null;
@@ -72,46 +72,46 @@
static field core::int? _#finalStaticFieldWithInitializer = null;
@#C1
get instanceField() → core::int
- return let final core::int? #t15 = this.{self::B::_#B#instanceField} in #t15.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'instanceField' has not been initialized.") : #t15{core::int};
+ return let final core::int? #t15 = this.{self::B::_#B#instanceField} in #t15.==(null) ?{core::int} throw new _in::LateError::fieldNI("instanceField") : #t15{core::int};
@#C1
set instanceField(core::int #t16) → void
this.{self::B::_#B#instanceField} = #t16;
@#C1
get finalInstanceField() → core::int
- return let final core::int? #t17 = this.{self::B::_#B#finalInstanceField} in #t17.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has not been initialized.") : #t17{core::int};
+ return let final core::int? #t17 = this.{self::B::_#B#finalInstanceField} in #t17.==(null) ?{core::int} throw new _in::LateError::fieldNI("finalInstanceField") : #t17{core::int};
@#C1
set finalInstanceField(core::int #t18) → void
if(this.{self::B::_#B#finalInstanceField}.==(null))
this.{self::B::_#B#finalInstanceField} = #t18;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalInstanceField");
@#C1
get finalInstanceFieldWithInitializer() → core::int
- return let final core::int? #t19 = this.{self::B::_#B#finalInstanceFieldWithInitializer} in #t19.==(null) ?{core::int} let final core::int #t20 = 0 in this.{self::B::_#B#finalInstanceFieldWithInitializer}.==(null) ?{core::int} this.{self::B::_#B#finalInstanceFieldWithInitializer} = #t20 : throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceFieldWithInitializer' has been assigned during initialization.") : #t19{core::int};
+ return let final core::int? #t19 = this.{self::B::_#B#finalInstanceFieldWithInitializer} in #t19.==(null) ?{core::int} let final core::int #t20 = 0 in this.{self::B::_#B#finalInstanceFieldWithInitializer}.==(null) ?{core::int} this.{self::B::_#B#finalInstanceFieldWithInitializer} = #t20 : throw new _in::LateError::fieldADI("finalInstanceFieldWithInitializer") : #t19{core::int};
@#C1
get covariantInstanceField() → core::num
- return let final core::num? #t21 = this.{self::B::_#B#covariantInstanceField} in #t21.==(null) ?{core::num} throw new _in::LateInitializationErrorImpl::•("Field 'covariantInstanceField' has not been initialized.") : #t21{core::num};
+ return let final core::num? #t21 = this.{self::B::_#B#covariantInstanceField} in #t21.==(null) ?{core::num} throw new _in::LateError::fieldNI("covariantInstanceField") : #t21{core::num};
@#C1
set covariantInstanceField(covariant core::num #t22) → void
this.{self::B::_#B#covariantInstanceField} = #t22;
@#C1
static get staticField() → core::int
- return let final core::int? #t23 = self::B::_#staticField in #t23.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'staticField' has not been initialized.") : #t23{core::int};
+ return let final core::int? #t23 = self::B::_#staticField in #t23.==(null) ?{core::int} throw new _in::LateError::fieldNI("staticField") : #t23{core::int};
@#C1
static set staticField(core::int #t24) → void
self::B::_#staticField = #t24;
@#C1
static get finalStaticField() → core::int
- return let final core::int? #t25 = self::B::_#finalStaticField in #t25.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticField' has not been initialized.") : #t25{core::int};
+ return let final core::int? #t25 = self::B::_#finalStaticField in #t25.==(null) ?{core::int} throw new _in::LateError::fieldNI("finalStaticField") : #t25{core::int};
@#C1
static set finalStaticField(core::int #t26) → void
if(self::B::_#finalStaticField.==(null))
self::B::_#finalStaticField = #t26;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalStaticField");
@#C1
static get finalStaticFieldWithInitializer() → core::int
- return let final core::int? #t27 = self::B::_#finalStaticFieldWithInitializer in #t27.==(null) ?{core::int} let final core::int #t28 = 0 in self::B::_#finalStaticFieldWithInitializer.==(null) ?{core::int} self::B::_#finalStaticFieldWithInitializer = #t28 : throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticFieldWithInitializer' has been assigned during initialization.") : #t27{core::int};
+ return let final core::int? #t27 = self::B::_#finalStaticFieldWithInitializer in #t27.==(null) ?{core::int} let final core::int #t28 = 0 in self::B::_#finalStaticFieldWithInitializer.==(null) ?{core::int} self::B::_#finalStaticFieldWithInitializer = #t28 : throw new _in::LateError::fieldADI("finalStaticFieldWithInitializer") : #t27{core::int};
}
extension Extension on self::A {
static field extensionStaticField = self::_#Extension|extensionStaticField;
@@ -131,40 +131,40 @@
static field core::int? _#Extension|finalExtensionStaticFieldWithInitializer = null;
@#C1
static get topLevelField() → core::int
- return let final core::int? #t29 = self::_#topLevelField in #t29.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'topLevelField' has not been initialized.") : #t29{core::int};
+ return let final core::int? #t29 = self::_#topLevelField in #t29.==(null) ?{core::int} throw new _in::LateError::fieldNI("topLevelField") : #t29{core::int};
@#C1
static set topLevelField(core::int #t30) → void
self::_#topLevelField = #t30;
@#C1
static get finalTopLevelField() → core::int
- return let final core::int? #t31 = self::_#finalTopLevelField in #t31.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has not been initialized.") : #t31{core::int};
+ return let final core::int? #t31 = self::_#finalTopLevelField in #t31.==(null) ?{core::int} throw new _in::LateError::fieldNI("finalTopLevelField") : #t31{core::int};
@#C1
static set finalTopLevelField(core::int #t32) → void
if(self::_#finalTopLevelField.==(null))
self::_#finalTopLevelField = #t32;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalTopLevelField");
@#C1
static get finalTopLevelFieldWithInitializer() → core::int
- return let final core::int? #t33 = self::_#finalTopLevelFieldWithInitializer in #t33.==(null) ?{core::int} let final core::int #t34 = 0 in self::_#finalTopLevelFieldWithInitializer.==(null) ?{core::int} self::_#finalTopLevelFieldWithInitializer = #t34 : throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelFieldWithInitializer' has been assigned during initialization.") : #t33{core::int};
+ return let final core::int? #t33 = self::_#finalTopLevelFieldWithInitializer in #t33.==(null) ?{core::int} let final core::int #t34 = 0 in self::_#finalTopLevelFieldWithInitializer.==(null) ?{core::int} self::_#finalTopLevelFieldWithInitializer = #t34 : throw new _in::LateError::fieldADI("finalTopLevelFieldWithInitializer") : #t33{core::int};
@#C1
static get Extension|extensionStaticField() → core::int
- return let final core::int? #t35 = self::_#Extension|extensionStaticField in #t35.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'extensionStaticField' has not been initialized.") : #t35{core::int};
+ return let final core::int? #t35 = self::_#Extension|extensionStaticField in #t35.==(null) ?{core::int} throw new _in::LateError::fieldNI("extensionStaticField") : #t35{core::int};
@#C1
static set Extension|extensionStaticField(core::int #t36) → void
self::_#Extension|extensionStaticField = #t36;
@#C1
static get Extension|finalExtensionStaticField() → core::int
- return let final core::int? #t37 = self::_#Extension|finalExtensionStaticField in #t37.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'finalExtensionStaticField' has not been initialized.") : #t37{core::int};
+ return let final core::int? #t37 = self::_#Extension|finalExtensionStaticField in #t37.==(null) ?{core::int} throw new _in::LateError::fieldNI("finalExtensionStaticField") : #t37{core::int};
@#C1
static set Extension|finalExtensionStaticField(core::int #t38) → void
if(self::_#Extension|finalExtensionStaticField.==(null))
self::_#Extension|finalExtensionStaticField = #t38;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'finalExtensionStaticField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalExtensionStaticField");
@#C1
static get Extension|finalExtensionStaticFieldWithInitializer() → core::int
- return let final core::int? #t39 = self::_#Extension|finalExtensionStaticFieldWithInitializer in #t39.==(null) ?{core::int} let final core::int #t40 = 0 in self::_#Extension|finalExtensionStaticFieldWithInitializer.==(null) ?{core::int} self::_#Extension|finalExtensionStaticFieldWithInitializer = #t40 : throw new _in::LateInitializationErrorImpl::•("Field 'finalExtensionStaticFieldWithInitializer' has been assigned during initialization.") : #t39{core::int};
+ return let final core::int? #t39 = self::_#Extension|finalExtensionStaticFieldWithInitializer in #t39.==(null) ?{core::int} let final core::int #t40 = 0 in self::_#Extension|finalExtensionStaticFieldWithInitializer.==(null) ?{core::int} self::_#Extension|finalExtensionStaticFieldWithInitializer = #t40 : throw new _in::LateError::fieldADI("finalExtensionStaticFieldWithInitializer") : #t39{core::int};
static method main() → dynamic {}
constants {
diff --git a/pkg/front_end/testcases/late_lowering/late_annotations.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_annotations.dart.strong.transformed.expect
index 4555905..f9033f9 100644
--- a/pkg/front_end/testcases/late_lowering/late_annotations.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_annotations.dart.strong.transformed.expect
@@ -21,46 +21,46 @@
;
@#C1
get instanceField() → core::int
- return let final core::int? #t1 = this.{self::A::_#A#instanceField} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'instanceField' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::A::_#A#instanceField} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("instanceField") : #t1{core::int};
@#C1
set instanceField(core::int #t2) → void
this.{self::A::_#A#instanceField} = #t2;
@#C1
get finalInstanceField() → core::int
- return let final core::int? #t3 = this.{self::A::_#A#finalInstanceField} in #t3.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has not been initialized.") : #t3{core::int};
+ return let final core::int? #t3 = this.{self::A::_#A#finalInstanceField} in #t3.==(null) ?{core::int} throw new _in::LateError::fieldNI("finalInstanceField") : #t3{core::int};
@#C1
set finalInstanceField(core::int #t4) → void
if(this.{self::A::_#A#finalInstanceField}.==(null))
this.{self::A::_#A#finalInstanceField} = #t4;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalInstanceField");
@#C1
get finalInstanceFieldWithInitializer() → core::int
- return let final core::int? #t5 = this.{self::A::_#A#finalInstanceFieldWithInitializer} in #t5.==(null) ?{core::int} let final core::int #t6 = 0 in this.{self::A::_#A#finalInstanceFieldWithInitializer}.==(null) ?{core::int} this.{self::A::_#A#finalInstanceFieldWithInitializer} = #t6 : throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceFieldWithInitializer' has been assigned during initialization.") : #t5{core::int};
+ return let final core::int? #t5 = this.{self::A::_#A#finalInstanceFieldWithInitializer} in #t5.==(null) ?{core::int} let final core::int #t6 = 0 in this.{self::A::_#A#finalInstanceFieldWithInitializer}.==(null) ?{core::int} this.{self::A::_#A#finalInstanceFieldWithInitializer} = #t6 : throw new _in::LateError::fieldADI("finalInstanceFieldWithInitializer") : #t5{core::int};
@#C1
get covariantInstanceField() → core::num
- return let final core::num? #t7 = this.{self::A::_#A#covariantInstanceField} in #t7.==(null) ?{core::num} throw new _in::LateInitializationErrorImpl::•("Field 'covariantInstanceField' has not been initialized.") : #t7{core::num};
+ return let final core::num? #t7 = this.{self::A::_#A#covariantInstanceField} in #t7.==(null) ?{core::num} throw new _in::LateError::fieldNI("covariantInstanceField") : #t7{core::num};
@#C1
set covariantInstanceField(covariant core::num #t8) → void
this.{self::A::_#A#covariantInstanceField} = #t8;
@#C1
static get staticField() → core::int
- return let final core::int? #t9 = self::A::_#staticField in #t9.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'staticField' has not been initialized.") : #t9{core::int};
+ return let final core::int? #t9 = self::A::_#staticField in #t9.==(null) ?{core::int} throw new _in::LateError::fieldNI("staticField") : #t9{core::int};
@#C1
static set staticField(core::int #t10) → void
self::A::_#staticField = #t10;
@#C1
static get finalStaticField() → core::int
- return let final core::int? #t11 = self::A::_#finalStaticField in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticField' has not been initialized.") : #t11{core::int};
+ return let final core::int? #t11 = self::A::_#finalStaticField in #t11.==(null) ?{core::int} throw new _in::LateError::fieldNI("finalStaticField") : #t11{core::int};
@#C1
static set finalStaticField(core::int #t12) → void
if(self::A::_#finalStaticField.==(null))
self::A::_#finalStaticField = #t12;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalStaticField");
@#C1
static get finalStaticFieldWithInitializer() → core::int
- return let final core::int? #t13 = self::A::_#finalStaticFieldWithInitializer in #t13.==(null) ?{core::int} let final core::int #t14 = 0 in self::A::_#finalStaticFieldWithInitializer.==(null) ?{core::int} self::A::_#finalStaticFieldWithInitializer = #t14 : throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticFieldWithInitializer' has been assigned during initialization.") : #t13{core::int};
+ return let final core::int? #t13 = self::A::_#finalStaticFieldWithInitializer in #t13.==(null) ?{core::int} let final core::int #t14 = 0 in self::A::_#finalStaticFieldWithInitializer.==(null) ?{core::int} self::A::_#finalStaticFieldWithInitializer = #t14 : throw new _in::LateError::fieldADI("finalStaticFieldWithInitializer") : #t13{core::int};
}
abstract class B extends core::Object /*isMixinDeclaration*/ {
field core::int? _#B#instanceField = null;
@@ -72,46 +72,46 @@
static field core::int? _#finalStaticFieldWithInitializer = null;
@#C1
get instanceField() → core::int
- return let final core::int? #t15 = this.{self::B::_#B#instanceField} in #t15.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'instanceField' has not been initialized.") : #t15{core::int};
+ return let final core::int? #t15 = this.{self::B::_#B#instanceField} in #t15.==(null) ?{core::int} throw new _in::LateError::fieldNI("instanceField") : #t15{core::int};
@#C1
set instanceField(core::int #t16) → void
this.{self::B::_#B#instanceField} = #t16;
@#C1
get finalInstanceField() → core::int
- return let final core::int? #t17 = this.{self::B::_#B#finalInstanceField} in #t17.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has not been initialized.") : #t17{core::int};
+ return let final core::int? #t17 = this.{self::B::_#B#finalInstanceField} in #t17.==(null) ?{core::int} throw new _in::LateError::fieldNI("finalInstanceField") : #t17{core::int};
@#C1
set finalInstanceField(core::int #t18) → void
if(this.{self::B::_#B#finalInstanceField}.==(null))
this.{self::B::_#B#finalInstanceField} = #t18;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalInstanceField");
@#C1
get finalInstanceFieldWithInitializer() → core::int
- return let final core::int? #t19 = this.{self::B::_#B#finalInstanceFieldWithInitializer} in #t19.==(null) ?{core::int} let final core::int #t20 = 0 in this.{self::B::_#B#finalInstanceFieldWithInitializer}.==(null) ?{core::int} this.{self::B::_#B#finalInstanceFieldWithInitializer} = #t20 : throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceFieldWithInitializer' has been assigned during initialization.") : #t19{core::int};
+ return let final core::int? #t19 = this.{self::B::_#B#finalInstanceFieldWithInitializer} in #t19.==(null) ?{core::int} let final core::int #t20 = 0 in this.{self::B::_#B#finalInstanceFieldWithInitializer}.==(null) ?{core::int} this.{self::B::_#B#finalInstanceFieldWithInitializer} = #t20 : throw new _in::LateError::fieldADI("finalInstanceFieldWithInitializer") : #t19{core::int};
@#C1
get covariantInstanceField() → core::num
- return let final core::num? #t21 = this.{self::B::_#B#covariantInstanceField} in #t21.==(null) ?{core::num} throw new _in::LateInitializationErrorImpl::•("Field 'covariantInstanceField' has not been initialized.") : #t21{core::num};
+ return let final core::num? #t21 = this.{self::B::_#B#covariantInstanceField} in #t21.==(null) ?{core::num} throw new _in::LateError::fieldNI("covariantInstanceField") : #t21{core::num};
@#C1
set covariantInstanceField(covariant core::num #t22) → void
this.{self::B::_#B#covariantInstanceField} = #t22;
@#C1
static get staticField() → core::int
- return let final core::int? #t23 = self::B::_#staticField in #t23.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'staticField' has not been initialized.") : #t23{core::int};
+ return let final core::int? #t23 = self::B::_#staticField in #t23.==(null) ?{core::int} throw new _in::LateError::fieldNI("staticField") : #t23{core::int};
@#C1
static set staticField(core::int #t24) → void
self::B::_#staticField = #t24;
@#C1
static get finalStaticField() → core::int
- return let final core::int? #t25 = self::B::_#finalStaticField in #t25.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticField' has not been initialized.") : #t25{core::int};
+ return let final core::int? #t25 = self::B::_#finalStaticField in #t25.==(null) ?{core::int} throw new _in::LateError::fieldNI("finalStaticField") : #t25{core::int};
@#C1
static set finalStaticField(core::int #t26) → void
if(self::B::_#finalStaticField.==(null))
self::B::_#finalStaticField = #t26;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalStaticField");
@#C1
static get finalStaticFieldWithInitializer() → core::int
- return let final core::int? #t27 = self::B::_#finalStaticFieldWithInitializer in #t27.==(null) ?{core::int} let final core::int #t28 = 0 in self::B::_#finalStaticFieldWithInitializer.==(null) ?{core::int} self::B::_#finalStaticFieldWithInitializer = #t28 : throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticFieldWithInitializer' has been assigned during initialization.") : #t27{core::int};
+ return let final core::int? #t27 = self::B::_#finalStaticFieldWithInitializer in #t27.==(null) ?{core::int} let final core::int #t28 = 0 in self::B::_#finalStaticFieldWithInitializer.==(null) ?{core::int} self::B::_#finalStaticFieldWithInitializer = #t28 : throw new _in::LateError::fieldADI("finalStaticFieldWithInitializer") : #t27{core::int};
}
extension Extension on self::A {
static field extensionStaticField = self::_#Extension|extensionStaticField;
@@ -131,40 +131,40 @@
static field core::int? _#Extension|finalExtensionStaticFieldWithInitializer = null;
@#C1
static get topLevelField() → core::int
- return let final core::int? #t29 = self::_#topLevelField in #t29.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'topLevelField' has not been initialized.") : #t29{core::int};
+ return let final core::int? #t29 = self::_#topLevelField in #t29.==(null) ?{core::int} throw new _in::LateError::fieldNI("topLevelField") : #t29{core::int};
@#C1
static set topLevelField(core::int #t30) → void
self::_#topLevelField = #t30;
@#C1
static get finalTopLevelField() → core::int
- return let final core::int? #t31 = self::_#finalTopLevelField in #t31.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has not been initialized.") : #t31{core::int};
+ return let final core::int? #t31 = self::_#finalTopLevelField in #t31.==(null) ?{core::int} throw new _in::LateError::fieldNI("finalTopLevelField") : #t31{core::int};
@#C1
static set finalTopLevelField(core::int #t32) → void
if(self::_#finalTopLevelField.==(null))
self::_#finalTopLevelField = #t32;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalTopLevelField");
@#C1
static get finalTopLevelFieldWithInitializer() → core::int
- return let final core::int? #t33 = self::_#finalTopLevelFieldWithInitializer in #t33.==(null) ?{core::int} let final core::int #t34 = 0 in self::_#finalTopLevelFieldWithInitializer.==(null) ?{core::int} self::_#finalTopLevelFieldWithInitializer = #t34 : throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelFieldWithInitializer' has been assigned during initialization.") : #t33{core::int};
+ return let final core::int? #t33 = self::_#finalTopLevelFieldWithInitializer in #t33.==(null) ?{core::int} let final core::int #t34 = 0 in self::_#finalTopLevelFieldWithInitializer.==(null) ?{core::int} self::_#finalTopLevelFieldWithInitializer = #t34 : throw new _in::LateError::fieldADI("finalTopLevelFieldWithInitializer") : #t33{core::int};
@#C1
static get Extension|extensionStaticField() → core::int
- return let final core::int? #t35 = self::_#Extension|extensionStaticField in #t35.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'extensionStaticField' has not been initialized.") : #t35{core::int};
+ return let final core::int? #t35 = self::_#Extension|extensionStaticField in #t35.==(null) ?{core::int} throw new _in::LateError::fieldNI("extensionStaticField") : #t35{core::int};
@#C1
static set Extension|extensionStaticField(core::int #t36) → void
self::_#Extension|extensionStaticField = #t36;
@#C1
static get Extension|finalExtensionStaticField() → core::int
- return let final core::int? #t37 = self::_#Extension|finalExtensionStaticField in #t37.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'finalExtensionStaticField' has not been initialized.") : #t37{core::int};
+ return let final core::int? #t37 = self::_#Extension|finalExtensionStaticField in #t37.==(null) ?{core::int} throw new _in::LateError::fieldNI("finalExtensionStaticField") : #t37{core::int};
@#C1
static set Extension|finalExtensionStaticField(core::int #t38) → void
if(self::_#Extension|finalExtensionStaticField.==(null))
self::_#Extension|finalExtensionStaticField = #t38;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'finalExtensionStaticField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalExtensionStaticField");
@#C1
static get Extension|finalExtensionStaticFieldWithInitializer() → core::int
- return let final core::int? #t39 = self::_#Extension|finalExtensionStaticFieldWithInitializer in #t39.==(null) ?{core::int} let final core::int #t40 = 0 in self::_#Extension|finalExtensionStaticFieldWithInitializer.==(null) ?{core::int} self::_#Extension|finalExtensionStaticFieldWithInitializer = #t40 : throw new _in::LateInitializationErrorImpl::•("Field 'finalExtensionStaticFieldWithInitializer' has been assigned during initialization.") : #t39{core::int};
+ return let final core::int? #t39 = self::_#Extension|finalExtensionStaticFieldWithInitializer in #t39.==(null) ?{core::int} let final core::int #t40 = 0 in self::_#Extension|finalExtensionStaticFieldWithInitializer.==(null) ?{core::int} self::_#Extension|finalExtensionStaticFieldWithInitializer = #t40 : throw new _in::LateError::fieldADI("finalExtensionStaticFieldWithInitializer") : #t39{core::int};
static method main() → dynamic {}
constants {
diff --git a/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.expect
index 89e5a3a..ad7345c 100644
--- a/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.expect
@@ -28,7 +28,7 @@
;
@#C1
get instanceField() → core::int
- return this.{self::A::_#A#instanceField#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#instanceField} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'instanceField' has not been initialized.");
+ return this.{self::A::_#A#instanceField#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#instanceField} in #t1{core::int} : throw new _in::LateError::fieldNI("instanceField");
@#C1
set instanceField(core::int #t2) → void {
this.{self::A::_#A#instanceField#isSet} = true;
@@ -36,11 +36,11 @@
}
@#C1
get finalInstanceField() → core::int
- return this.{self::A::_#A#finalInstanceField#isSet} ?{core::int} let final core::int? #t3 = this.{self::A::_#A#finalInstanceField} in #t3{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has not been initialized.");
+ return this.{self::A::_#A#finalInstanceField#isSet} ?{core::int} let final core::int? #t3 = this.{self::A::_#A#finalInstanceField} in #t3{core::int} : throw new _in::LateError::fieldNI("finalInstanceField");
@#C1
set finalInstanceField(core::int #t4) → void
if(this.{self::A::_#A#finalInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalInstanceField");
else {
this.{self::A::_#A#finalInstanceField#isSet} = true;
this.{self::A::_#A#finalInstanceField} = #t4;
@@ -50,7 +50,7 @@
if(!this.{self::A::_#A#finalInstanceFieldWithInitializer#isSet}) {
final core::int #t5 = 0;
if(this.{self::A::_#A#finalInstanceFieldWithInitializer#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceFieldWithInitializer' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("finalInstanceFieldWithInitializer");
this.{self::A::_#A#finalInstanceFieldWithInitializer} = #t5;
this.{self::A::_#A#finalInstanceFieldWithInitializer#isSet} = true;
}
@@ -58,7 +58,7 @@
}
@#C1
get covariantInstanceField() → core::num
- return this.{self::A::_#A#covariantInstanceField#isSet} ?{core::num} let final core::num? #t7 = this.{self::A::_#A#covariantInstanceField} in #t7{core::num} : throw new _in::LateInitializationErrorImpl::•("Field 'covariantInstanceField' has not been initialized.");
+ return this.{self::A::_#A#covariantInstanceField#isSet} ?{core::num} let final core::num? #t7 = this.{self::A::_#A#covariantInstanceField} in #t7{core::num} : throw new _in::LateError::fieldNI("covariantInstanceField");
@#C1
set covariantInstanceField(covariant core::num #t8) → void {
this.{self::A::_#A#covariantInstanceField#isSet} = true;
@@ -66,7 +66,7 @@
}
@#C1
static get staticField() → core::int
- return self::A::_#staticField#isSet ?{core::int} let final core::int? #t9 = self::A::_#staticField in #t9{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'staticField' has not been initialized.");
+ return self::A::_#staticField#isSet ?{core::int} let final core::int? #t9 = self::A::_#staticField in #t9{core::int} : throw new _in::LateError::fieldNI("staticField");
@#C1
static set staticField(core::int #t10) → void {
self::A::_#staticField#isSet = true;
@@ -74,11 +74,11 @@
}
@#C1
static get finalStaticField() → core::int
- return self::A::_#finalStaticField#isSet ?{core::int} let final core::int? #t11 = self::A::_#finalStaticField in #t11{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticField' has not been initialized.");
+ return self::A::_#finalStaticField#isSet ?{core::int} let final core::int? #t11 = self::A::_#finalStaticField in #t11{core::int} : throw new _in::LateError::fieldNI("finalStaticField");
@#C1
static set finalStaticField(core::int #t12) → void
if(self::A::_#finalStaticField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalStaticField");
else {
self::A::_#finalStaticField#isSet = true;
self::A::_#finalStaticField = #t12;
@@ -88,7 +88,7 @@
if(!self::A::_#finalStaticFieldWithInitializer#isSet) {
final core::int #t13 = 0;
if(self::A::_#finalStaticFieldWithInitializer#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticFieldWithInitializer' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("finalStaticFieldWithInitializer");
self::A::_#finalStaticFieldWithInitializer = #t13;
self::A::_#finalStaticFieldWithInitializer#isSet = true;
}
@@ -112,7 +112,7 @@
static field core::bool _#finalStaticFieldWithInitializer#isSet = false;
@#C1
get instanceField() → core::int
- return this.{self::B::_#B#instanceField#isSet} ?{core::int} let final core::int? #t15 = this.{self::B::_#B#instanceField} in #t15{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'instanceField' has not been initialized.");
+ return this.{self::B::_#B#instanceField#isSet} ?{core::int} let final core::int? #t15 = this.{self::B::_#B#instanceField} in #t15{core::int} : throw new _in::LateError::fieldNI("instanceField");
@#C1
set instanceField(core::int #t16) → void {
this.{self::B::_#B#instanceField#isSet} = true;
@@ -120,11 +120,11 @@
}
@#C1
get finalInstanceField() → core::int
- return this.{self::B::_#B#finalInstanceField#isSet} ?{core::int} let final core::int? #t17 = this.{self::B::_#B#finalInstanceField} in #t17{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has not been initialized.");
+ return this.{self::B::_#B#finalInstanceField#isSet} ?{core::int} let final core::int? #t17 = this.{self::B::_#B#finalInstanceField} in #t17{core::int} : throw new _in::LateError::fieldNI("finalInstanceField");
@#C1
set finalInstanceField(core::int #t18) → void
if(this.{self::B::_#B#finalInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalInstanceField");
else {
this.{self::B::_#B#finalInstanceField#isSet} = true;
this.{self::B::_#B#finalInstanceField} = #t18;
@@ -134,7 +134,7 @@
if(!this.{self::B::_#B#finalInstanceFieldWithInitializer#isSet}) {
final core::int #t19 = 0;
if(this.{self::B::_#B#finalInstanceFieldWithInitializer#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceFieldWithInitializer' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("finalInstanceFieldWithInitializer");
this.{self::B::_#B#finalInstanceFieldWithInitializer} = #t19;
this.{self::B::_#B#finalInstanceFieldWithInitializer#isSet} = true;
}
@@ -142,7 +142,7 @@
}
@#C1
get covariantInstanceField() → core::num
- return this.{self::B::_#B#covariantInstanceField#isSet} ?{core::num} let final core::num? #t21 = this.{self::B::_#B#covariantInstanceField} in #t21{core::num} : throw new _in::LateInitializationErrorImpl::•("Field 'covariantInstanceField' has not been initialized.");
+ return this.{self::B::_#B#covariantInstanceField#isSet} ?{core::num} let final core::num? #t21 = this.{self::B::_#B#covariantInstanceField} in #t21{core::num} : throw new _in::LateError::fieldNI("covariantInstanceField");
@#C1
set covariantInstanceField(covariant core::num #t22) → void {
this.{self::B::_#B#covariantInstanceField#isSet} = true;
@@ -150,7 +150,7 @@
}
@#C1
static get staticField() → core::int
- return self::B::_#staticField#isSet ?{core::int} let final core::int? #t23 = self::B::_#staticField in #t23{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'staticField' has not been initialized.");
+ return self::B::_#staticField#isSet ?{core::int} let final core::int? #t23 = self::B::_#staticField in #t23{core::int} : throw new _in::LateError::fieldNI("staticField");
@#C1
static set staticField(core::int #t24) → void {
self::B::_#staticField#isSet = true;
@@ -158,11 +158,11 @@
}
@#C1
static get finalStaticField() → core::int
- return self::B::_#finalStaticField#isSet ?{core::int} let final core::int? #t25 = self::B::_#finalStaticField in #t25{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticField' has not been initialized.");
+ return self::B::_#finalStaticField#isSet ?{core::int} let final core::int? #t25 = self::B::_#finalStaticField in #t25{core::int} : throw new _in::LateError::fieldNI("finalStaticField");
@#C1
static set finalStaticField(core::int #t26) → void
if(self::B::_#finalStaticField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalStaticField");
else {
self::B::_#finalStaticField#isSet = true;
self::B::_#finalStaticField = #t26;
@@ -172,7 +172,7 @@
if(!self::B::_#finalStaticFieldWithInitializer#isSet) {
final core::int #t27 = 0;
if(self::B::_#finalStaticFieldWithInitializer#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticFieldWithInitializer' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("finalStaticFieldWithInitializer");
self::B::_#finalStaticFieldWithInitializer = #t27;
self::B::_#finalStaticFieldWithInitializer#isSet = true;
}
@@ -206,7 +206,7 @@
static field core::bool _#Extension|finalExtensionStaticFieldWithInitializer#isSet = false;
@#C1
static get topLevelField() → core::int
- return self::_#topLevelField#isSet ?{core::int} let final core::int? #t29 = self::_#topLevelField in #t29{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'topLevelField' has not been initialized.");
+ return self::_#topLevelField#isSet ?{core::int} let final core::int? #t29 = self::_#topLevelField in #t29{core::int} : throw new _in::LateError::fieldNI("topLevelField");
@#C1
static set topLevelField(core::int #t30) → void {
self::_#topLevelField#isSet = true;
@@ -214,11 +214,11 @@
}
@#C1
static get finalTopLevelField() → core::int
- return self::_#finalTopLevelField#isSet ?{core::int} let final core::int? #t31 = self::_#finalTopLevelField in #t31{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has not been initialized.");
+ return self::_#finalTopLevelField#isSet ?{core::int} let final core::int? #t31 = self::_#finalTopLevelField in #t31{core::int} : throw new _in::LateError::fieldNI("finalTopLevelField");
@#C1
static set finalTopLevelField(core::int #t32) → void
if(self::_#finalTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalTopLevelField");
else {
self::_#finalTopLevelField#isSet = true;
self::_#finalTopLevelField = #t32;
@@ -228,7 +228,7 @@
if(!self::_#finalTopLevelFieldWithInitializer#isSet) {
final core::int #t33 = 0;
if(self::_#finalTopLevelFieldWithInitializer#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelFieldWithInitializer' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("finalTopLevelFieldWithInitializer");
self::_#finalTopLevelFieldWithInitializer = #t33;
self::_#finalTopLevelFieldWithInitializer#isSet = true;
}
@@ -236,7 +236,7 @@
}
@#C1
static get Extension|extensionStaticField() → core::int
- return self::_#Extension|extensionStaticField#isSet ?{core::int} let final core::int? #t35 = self::_#Extension|extensionStaticField in #t35{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'extensionStaticField' has not been initialized.");
+ return self::_#Extension|extensionStaticField#isSet ?{core::int} let final core::int? #t35 = self::_#Extension|extensionStaticField in #t35{core::int} : throw new _in::LateError::fieldNI("extensionStaticField");
@#C1
static set Extension|extensionStaticField(core::int #t36) → void {
self::_#Extension|extensionStaticField#isSet = true;
@@ -244,11 +244,11 @@
}
@#C1
static get Extension|finalExtensionStaticField() → core::int
- return self::_#Extension|finalExtensionStaticField#isSet ?{core::int} let final core::int? #t37 = self::_#Extension|finalExtensionStaticField in #t37{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'finalExtensionStaticField' has not been initialized.");
+ return self::_#Extension|finalExtensionStaticField#isSet ?{core::int} let final core::int? #t37 = self::_#Extension|finalExtensionStaticField in #t37{core::int} : throw new _in::LateError::fieldNI("finalExtensionStaticField");
@#C1
static set Extension|finalExtensionStaticField(core::int #t38) → void
if(self::_#Extension|finalExtensionStaticField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalExtensionStaticField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalExtensionStaticField");
else {
self::_#Extension|finalExtensionStaticField#isSet = true;
self::_#Extension|finalExtensionStaticField = #t38;
@@ -258,7 +258,7 @@
if(!self::_#Extension|finalExtensionStaticFieldWithInitializer#isSet) {
final core::int #t39 = 0;
if(self::_#Extension|finalExtensionStaticFieldWithInitializer#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalExtensionStaticFieldWithInitializer' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("finalExtensionStaticFieldWithInitializer");
self::_#Extension|finalExtensionStaticFieldWithInitializer = #t39;
self::_#Extension|finalExtensionStaticFieldWithInitializer#isSet = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.transformed.expect
index 89e5a3a..ad7345c 100644
--- a/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.transformed.expect
@@ -28,7 +28,7 @@
;
@#C1
get instanceField() → core::int
- return this.{self::A::_#A#instanceField#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#instanceField} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'instanceField' has not been initialized.");
+ return this.{self::A::_#A#instanceField#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#instanceField} in #t1{core::int} : throw new _in::LateError::fieldNI("instanceField");
@#C1
set instanceField(core::int #t2) → void {
this.{self::A::_#A#instanceField#isSet} = true;
@@ -36,11 +36,11 @@
}
@#C1
get finalInstanceField() → core::int
- return this.{self::A::_#A#finalInstanceField#isSet} ?{core::int} let final core::int? #t3 = this.{self::A::_#A#finalInstanceField} in #t3{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has not been initialized.");
+ return this.{self::A::_#A#finalInstanceField#isSet} ?{core::int} let final core::int? #t3 = this.{self::A::_#A#finalInstanceField} in #t3{core::int} : throw new _in::LateError::fieldNI("finalInstanceField");
@#C1
set finalInstanceField(core::int #t4) → void
if(this.{self::A::_#A#finalInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalInstanceField");
else {
this.{self::A::_#A#finalInstanceField#isSet} = true;
this.{self::A::_#A#finalInstanceField} = #t4;
@@ -50,7 +50,7 @@
if(!this.{self::A::_#A#finalInstanceFieldWithInitializer#isSet}) {
final core::int #t5 = 0;
if(this.{self::A::_#A#finalInstanceFieldWithInitializer#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceFieldWithInitializer' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("finalInstanceFieldWithInitializer");
this.{self::A::_#A#finalInstanceFieldWithInitializer} = #t5;
this.{self::A::_#A#finalInstanceFieldWithInitializer#isSet} = true;
}
@@ -58,7 +58,7 @@
}
@#C1
get covariantInstanceField() → core::num
- return this.{self::A::_#A#covariantInstanceField#isSet} ?{core::num} let final core::num? #t7 = this.{self::A::_#A#covariantInstanceField} in #t7{core::num} : throw new _in::LateInitializationErrorImpl::•("Field 'covariantInstanceField' has not been initialized.");
+ return this.{self::A::_#A#covariantInstanceField#isSet} ?{core::num} let final core::num? #t7 = this.{self::A::_#A#covariantInstanceField} in #t7{core::num} : throw new _in::LateError::fieldNI("covariantInstanceField");
@#C1
set covariantInstanceField(covariant core::num #t8) → void {
this.{self::A::_#A#covariantInstanceField#isSet} = true;
@@ -66,7 +66,7 @@
}
@#C1
static get staticField() → core::int
- return self::A::_#staticField#isSet ?{core::int} let final core::int? #t9 = self::A::_#staticField in #t9{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'staticField' has not been initialized.");
+ return self::A::_#staticField#isSet ?{core::int} let final core::int? #t9 = self::A::_#staticField in #t9{core::int} : throw new _in::LateError::fieldNI("staticField");
@#C1
static set staticField(core::int #t10) → void {
self::A::_#staticField#isSet = true;
@@ -74,11 +74,11 @@
}
@#C1
static get finalStaticField() → core::int
- return self::A::_#finalStaticField#isSet ?{core::int} let final core::int? #t11 = self::A::_#finalStaticField in #t11{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticField' has not been initialized.");
+ return self::A::_#finalStaticField#isSet ?{core::int} let final core::int? #t11 = self::A::_#finalStaticField in #t11{core::int} : throw new _in::LateError::fieldNI("finalStaticField");
@#C1
static set finalStaticField(core::int #t12) → void
if(self::A::_#finalStaticField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalStaticField");
else {
self::A::_#finalStaticField#isSet = true;
self::A::_#finalStaticField = #t12;
@@ -88,7 +88,7 @@
if(!self::A::_#finalStaticFieldWithInitializer#isSet) {
final core::int #t13 = 0;
if(self::A::_#finalStaticFieldWithInitializer#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticFieldWithInitializer' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("finalStaticFieldWithInitializer");
self::A::_#finalStaticFieldWithInitializer = #t13;
self::A::_#finalStaticFieldWithInitializer#isSet = true;
}
@@ -112,7 +112,7 @@
static field core::bool _#finalStaticFieldWithInitializer#isSet = false;
@#C1
get instanceField() → core::int
- return this.{self::B::_#B#instanceField#isSet} ?{core::int} let final core::int? #t15 = this.{self::B::_#B#instanceField} in #t15{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'instanceField' has not been initialized.");
+ return this.{self::B::_#B#instanceField#isSet} ?{core::int} let final core::int? #t15 = this.{self::B::_#B#instanceField} in #t15{core::int} : throw new _in::LateError::fieldNI("instanceField");
@#C1
set instanceField(core::int #t16) → void {
this.{self::B::_#B#instanceField#isSet} = true;
@@ -120,11 +120,11 @@
}
@#C1
get finalInstanceField() → core::int
- return this.{self::B::_#B#finalInstanceField#isSet} ?{core::int} let final core::int? #t17 = this.{self::B::_#B#finalInstanceField} in #t17{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has not been initialized.");
+ return this.{self::B::_#B#finalInstanceField#isSet} ?{core::int} let final core::int? #t17 = this.{self::B::_#B#finalInstanceField} in #t17{core::int} : throw new _in::LateError::fieldNI("finalInstanceField");
@#C1
set finalInstanceField(core::int #t18) → void
if(this.{self::B::_#B#finalInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalInstanceField");
else {
this.{self::B::_#B#finalInstanceField#isSet} = true;
this.{self::B::_#B#finalInstanceField} = #t18;
@@ -134,7 +134,7 @@
if(!this.{self::B::_#B#finalInstanceFieldWithInitializer#isSet}) {
final core::int #t19 = 0;
if(this.{self::B::_#B#finalInstanceFieldWithInitializer#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceFieldWithInitializer' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("finalInstanceFieldWithInitializer");
this.{self::B::_#B#finalInstanceFieldWithInitializer} = #t19;
this.{self::B::_#B#finalInstanceFieldWithInitializer#isSet} = true;
}
@@ -142,7 +142,7 @@
}
@#C1
get covariantInstanceField() → core::num
- return this.{self::B::_#B#covariantInstanceField#isSet} ?{core::num} let final core::num? #t21 = this.{self::B::_#B#covariantInstanceField} in #t21{core::num} : throw new _in::LateInitializationErrorImpl::•("Field 'covariantInstanceField' has not been initialized.");
+ return this.{self::B::_#B#covariantInstanceField#isSet} ?{core::num} let final core::num? #t21 = this.{self::B::_#B#covariantInstanceField} in #t21{core::num} : throw new _in::LateError::fieldNI("covariantInstanceField");
@#C1
set covariantInstanceField(covariant core::num #t22) → void {
this.{self::B::_#B#covariantInstanceField#isSet} = true;
@@ -150,7 +150,7 @@
}
@#C1
static get staticField() → core::int
- return self::B::_#staticField#isSet ?{core::int} let final core::int? #t23 = self::B::_#staticField in #t23{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'staticField' has not been initialized.");
+ return self::B::_#staticField#isSet ?{core::int} let final core::int? #t23 = self::B::_#staticField in #t23{core::int} : throw new _in::LateError::fieldNI("staticField");
@#C1
static set staticField(core::int #t24) → void {
self::B::_#staticField#isSet = true;
@@ -158,11 +158,11 @@
}
@#C1
static get finalStaticField() → core::int
- return self::B::_#finalStaticField#isSet ?{core::int} let final core::int? #t25 = self::B::_#finalStaticField in #t25{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticField' has not been initialized.");
+ return self::B::_#finalStaticField#isSet ?{core::int} let final core::int? #t25 = self::B::_#finalStaticField in #t25{core::int} : throw new _in::LateError::fieldNI("finalStaticField");
@#C1
static set finalStaticField(core::int #t26) → void
if(self::B::_#finalStaticField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalStaticField");
else {
self::B::_#finalStaticField#isSet = true;
self::B::_#finalStaticField = #t26;
@@ -172,7 +172,7 @@
if(!self::B::_#finalStaticFieldWithInitializer#isSet) {
final core::int #t27 = 0;
if(self::B::_#finalStaticFieldWithInitializer#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalStaticFieldWithInitializer' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("finalStaticFieldWithInitializer");
self::B::_#finalStaticFieldWithInitializer = #t27;
self::B::_#finalStaticFieldWithInitializer#isSet = true;
}
@@ -206,7 +206,7 @@
static field core::bool _#Extension|finalExtensionStaticFieldWithInitializer#isSet = false;
@#C1
static get topLevelField() → core::int
- return self::_#topLevelField#isSet ?{core::int} let final core::int? #t29 = self::_#topLevelField in #t29{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'topLevelField' has not been initialized.");
+ return self::_#topLevelField#isSet ?{core::int} let final core::int? #t29 = self::_#topLevelField in #t29{core::int} : throw new _in::LateError::fieldNI("topLevelField");
@#C1
static set topLevelField(core::int #t30) → void {
self::_#topLevelField#isSet = true;
@@ -214,11 +214,11 @@
}
@#C1
static get finalTopLevelField() → core::int
- return self::_#finalTopLevelField#isSet ?{core::int} let final core::int? #t31 = self::_#finalTopLevelField in #t31{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has not been initialized.");
+ return self::_#finalTopLevelField#isSet ?{core::int} let final core::int? #t31 = self::_#finalTopLevelField in #t31{core::int} : throw new _in::LateError::fieldNI("finalTopLevelField");
@#C1
static set finalTopLevelField(core::int #t32) → void
if(self::_#finalTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalTopLevelField");
else {
self::_#finalTopLevelField#isSet = true;
self::_#finalTopLevelField = #t32;
@@ -228,7 +228,7 @@
if(!self::_#finalTopLevelFieldWithInitializer#isSet) {
final core::int #t33 = 0;
if(self::_#finalTopLevelFieldWithInitializer#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelFieldWithInitializer' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("finalTopLevelFieldWithInitializer");
self::_#finalTopLevelFieldWithInitializer = #t33;
self::_#finalTopLevelFieldWithInitializer#isSet = true;
}
@@ -236,7 +236,7 @@
}
@#C1
static get Extension|extensionStaticField() → core::int
- return self::_#Extension|extensionStaticField#isSet ?{core::int} let final core::int? #t35 = self::_#Extension|extensionStaticField in #t35{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'extensionStaticField' has not been initialized.");
+ return self::_#Extension|extensionStaticField#isSet ?{core::int} let final core::int? #t35 = self::_#Extension|extensionStaticField in #t35{core::int} : throw new _in::LateError::fieldNI("extensionStaticField");
@#C1
static set Extension|extensionStaticField(core::int #t36) → void {
self::_#Extension|extensionStaticField#isSet = true;
@@ -244,11 +244,11 @@
}
@#C1
static get Extension|finalExtensionStaticField() → core::int
- return self::_#Extension|finalExtensionStaticField#isSet ?{core::int} let final core::int? #t37 = self::_#Extension|finalExtensionStaticField in #t37{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'finalExtensionStaticField' has not been initialized.");
+ return self::_#Extension|finalExtensionStaticField#isSet ?{core::int} let final core::int? #t37 = self::_#Extension|finalExtensionStaticField in #t37{core::int} : throw new _in::LateError::fieldNI("finalExtensionStaticField");
@#C1
static set Extension|finalExtensionStaticField(core::int #t38) → void
if(self::_#Extension|finalExtensionStaticField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalExtensionStaticField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalExtensionStaticField");
else {
self::_#Extension|finalExtensionStaticField#isSet = true;
self::_#Extension|finalExtensionStaticField = #t38;
@@ -258,7 +258,7 @@
if(!self::_#Extension|finalExtensionStaticFieldWithInitializer#isSet) {
final core::int #t39 = 0;
if(self::_#Extension|finalExtensionStaticFieldWithInitializer#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalExtensionStaticFieldWithInitializer' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("finalExtensionStaticFieldWithInitializer");
self::_#Extension|finalExtensionStaticFieldWithInitializer = #t39;
self::_#Extension|finalExtensionStaticFieldWithInitializer#isSet = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.strong.expect
index 28513d18..e6c2ae9 100644
--- a/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.strong.expect
@@ -13,11 +13,11 @@
: super core::Object::•()
;
static get lateStaticField1() → core::int
- return let final core::int? #t1 = self::Class::_#lateStaticField1 in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = self::Class::_#lateStaticField1 in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateStaticField1") : #t1{core::int};
static set lateStaticField1(core::int #t2) → void
self::Class::_#lateStaticField1 = #t2;
static get lateStaticField2() → core::int
- return let final core::int? #t3 = self::Class::_#lateStaticField2 in #t3.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has not been initialized.") : #t3{core::int};
+ return let final core::int? #t3 = self::Class::_#lateStaticField2 in #t3.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateStaticField2") : #t3{core::int};
static set lateStaticField2(core::int #t4) → void
self::Class::_#lateStaticField2 = #t4;
static method staticMethod() → dynamic {
@@ -26,11 +26,11 @@
self::expect(42, self::Class::lateStaticField2);
}
get lateInstanceField() → core::int
- return let final core::int? #t5 = this.{self::Class::_#Class#lateInstanceField} in #t5.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has not been initialized.") : #t5{core::int};
+ return let final core::int? #t5 = this.{self::Class::_#Class#lateInstanceField} in #t5.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateInstanceField") : #t5{core::int};
set lateInstanceField(core::int #t6) → void
this.{self::Class::_#Class#lateInstanceField} = #t6;
get lateGenericInstanceField() → self::Class::T%
- return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T%} let final self::Class::T? #t7 = this.{self::Class::_#Class#lateGenericInstanceField} in #t7{self::Class::T%} : throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T%} let final self::Class::T? #t7 = this.{self::Class::_#Class#lateGenericInstanceField} in #t7{self::Class::T%} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
set lateGenericInstanceField(generic-covariant-impl self::Class::T% #t8) → void {
this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
this.{self::Class::_#Class#lateGenericInstanceField} = #t8;
@@ -57,15 +57,15 @@
static field core::int? _#Extension|lateExtensionField1 = null;
static field core::int? _#Extension|lateExtensionField2 = null;
static get lateTopLevelField() → core::int
- return let final core::int? #t9 = self::_#lateTopLevelField in #t9.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has not been initialized.") : #t9{core::int};
+ return let final core::int? #t9 = self::_#lateTopLevelField in #t9.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateTopLevelField") : #t9{core::int};
static set lateTopLevelField(core::int #t10) → void
self::_#lateTopLevelField = #t10;
static get Extension|lateExtensionField1() → core::int
- return let final core::int? #t11 = self::_#Extension|lateExtensionField1 in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has not been initialized.") : #t11{core::int};
+ return let final core::int? #t11 = self::_#Extension|lateExtensionField1 in #t11.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateExtensionField1") : #t11{core::int};
static set Extension|lateExtensionField1(core::int #t12) → void
self::_#Extension|lateExtensionField1 = #t12;
static get Extension|lateExtensionField2() → core::int
- return let final core::int? #t13 = self::_#Extension|lateExtensionField2 in #t13.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has not been initialized.") : #t13{core::int};
+ return let final core::int? #t13 = self::_#Extension|lateExtensionField2 in #t13.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateExtensionField2") : #t13{core::int};
static set Extension|lateExtensionField2(core::int #t14) → void
self::_#Extension|lateExtensionField2 = #t14;
static method Extension|staticMethod() → dynamic {
diff --git a/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.strong.transformed.expect
index 28513d18..e6c2ae9 100644
--- a/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.strong.transformed.expect
@@ -13,11 +13,11 @@
: super core::Object::•()
;
static get lateStaticField1() → core::int
- return let final core::int? #t1 = self::Class::_#lateStaticField1 in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = self::Class::_#lateStaticField1 in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateStaticField1") : #t1{core::int};
static set lateStaticField1(core::int #t2) → void
self::Class::_#lateStaticField1 = #t2;
static get lateStaticField2() → core::int
- return let final core::int? #t3 = self::Class::_#lateStaticField2 in #t3.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has not been initialized.") : #t3{core::int};
+ return let final core::int? #t3 = self::Class::_#lateStaticField2 in #t3.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateStaticField2") : #t3{core::int};
static set lateStaticField2(core::int #t4) → void
self::Class::_#lateStaticField2 = #t4;
static method staticMethod() → dynamic {
@@ -26,11 +26,11 @@
self::expect(42, self::Class::lateStaticField2);
}
get lateInstanceField() → core::int
- return let final core::int? #t5 = this.{self::Class::_#Class#lateInstanceField} in #t5.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has not been initialized.") : #t5{core::int};
+ return let final core::int? #t5 = this.{self::Class::_#Class#lateInstanceField} in #t5.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateInstanceField") : #t5{core::int};
set lateInstanceField(core::int #t6) → void
this.{self::Class::_#Class#lateInstanceField} = #t6;
get lateGenericInstanceField() → self::Class::T%
- return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T%} let final self::Class::T? #t7 = this.{self::Class::_#Class#lateGenericInstanceField} in #t7{self::Class::T%} : throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T%} let final self::Class::T? #t7 = this.{self::Class::_#Class#lateGenericInstanceField} in #t7{self::Class::T%} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
set lateGenericInstanceField(generic-covariant-impl self::Class::T% #t8) → void {
this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
this.{self::Class::_#Class#lateGenericInstanceField} = #t8;
@@ -57,15 +57,15 @@
static field core::int? _#Extension|lateExtensionField1 = null;
static field core::int? _#Extension|lateExtensionField2 = null;
static get lateTopLevelField() → core::int
- return let final core::int? #t9 = self::_#lateTopLevelField in #t9.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has not been initialized.") : #t9{core::int};
+ return let final core::int? #t9 = self::_#lateTopLevelField in #t9.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateTopLevelField") : #t9{core::int};
static set lateTopLevelField(core::int #t10) → void
self::_#lateTopLevelField = #t10;
static get Extension|lateExtensionField1() → core::int
- return let final core::int? #t11 = self::_#Extension|lateExtensionField1 in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has not been initialized.") : #t11{core::int};
+ return let final core::int? #t11 = self::_#Extension|lateExtensionField1 in #t11.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateExtensionField1") : #t11{core::int};
static set Extension|lateExtensionField1(core::int #t12) → void
self::_#Extension|lateExtensionField1 = #t12;
static get Extension|lateExtensionField2() → core::int
- return let final core::int? #t13 = self::_#Extension|lateExtensionField2 in #t13.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has not been initialized.") : #t13{core::int};
+ return let final core::int? #t13 = self::_#Extension|lateExtensionField2 in #t13.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateExtensionField2") : #t13{core::int};
static set Extension|lateExtensionField2(core::int #t14) → void
self::_#Extension|lateExtensionField2 = #t14;
static method Extension|staticMethod() → dynamic {
diff --git a/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.expect
index 4d4ab11..d782319 100644
--- a/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.expect
@@ -16,13 +16,13 @@
: super core::Object::•()
;
static get lateStaticField1() → core::int
- return self::Class::_#lateStaticField1#isSet ?{core::int} let final core::int? #t1 = self::Class::_#lateStaticField1 in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has not been initialized.");
+ return self::Class::_#lateStaticField1#isSet ?{core::int} let final core::int? #t1 = self::Class::_#lateStaticField1 in #t1{core::int} : throw new _in::LateError::fieldNI("lateStaticField1");
static set lateStaticField1(core::int #t2) → void {
self::Class::_#lateStaticField1#isSet = true;
self::Class::_#lateStaticField1 = #t2;
}
static get lateStaticField2() → core::int
- return self::Class::_#lateStaticField2#isSet ?{core::int} let final core::int? #t3 = self::Class::_#lateStaticField2 in #t3{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has not been initialized.");
+ return self::Class::_#lateStaticField2#isSet ?{core::int} let final core::int? #t3 = self::Class::_#lateStaticField2 in #t3{core::int} : throw new _in::LateError::fieldNI("lateStaticField2");
static set lateStaticField2(core::int #t4) → void {
self::Class::_#lateStaticField2#isSet = true;
self::Class::_#lateStaticField2 = #t4;
@@ -33,13 +33,13 @@
self::expect(42, self::Class::lateStaticField2);
}
get lateInstanceField() → core::int
- return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int} let final core::int? #t5 = this.{self::Class::_#Class#lateInstanceField} in #t5{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int} let final core::int? #t5 = this.{self::Class::_#Class#lateInstanceField} in #t5{core::int} : throw new _in::LateError::fieldNI("lateInstanceField");
set lateInstanceField(core::int #t6) → void {
this.{self::Class::_#Class#lateInstanceField#isSet} = true;
this.{self::Class::_#Class#lateInstanceField} = #t6;
}
get lateGenericInstanceField() → self::Class::T%
- return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T%} let final self::Class::T? #t7 = this.{self::Class::_#Class#lateGenericInstanceField} in #t7{self::Class::T%} : throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T%} let final self::Class::T? #t7 = this.{self::Class::_#Class#lateGenericInstanceField} in #t7{self::Class::T%} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
set lateGenericInstanceField(generic-covariant-impl self::Class::T% #t8) → void {
this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
this.{self::Class::_#Class#lateGenericInstanceField} = #t8;
@@ -71,19 +71,19 @@
static field core::int? _#Extension|lateExtensionField2 = null;
static field core::bool _#Extension|lateExtensionField2#isSet = false;
static get lateTopLevelField() → core::int
- return self::_#lateTopLevelField#isSet ?{core::int} let final core::int? #t9 = self::_#lateTopLevelField in #t9{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has not been initialized.");
+ return self::_#lateTopLevelField#isSet ?{core::int} let final core::int? #t9 = self::_#lateTopLevelField in #t9{core::int} : throw new _in::LateError::fieldNI("lateTopLevelField");
static set lateTopLevelField(core::int #t10) → void {
self::_#lateTopLevelField#isSet = true;
self::_#lateTopLevelField = #t10;
}
static get Extension|lateExtensionField1() → core::int
- return self::_#Extension|lateExtensionField1#isSet ?{core::int} let final core::int? #t11 = self::_#Extension|lateExtensionField1 in #t11{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has not been initialized.");
+ return self::_#Extension|lateExtensionField1#isSet ?{core::int} let final core::int? #t11 = self::_#Extension|lateExtensionField1 in #t11{core::int} : throw new _in::LateError::fieldNI("lateExtensionField1");
static set Extension|lateExtensionField1(core::int #t12) → void {
self::_#Extension|lateExtensionField1#isSet = true;
self::_#Extension|lateExtensionField1 = #t12;
}
static get Extension|lateExtensionField2() → core::int
- return self::_#Extension|lateExtensionField2#isSet ?{core::int} let final core::int? #t13 = self::_#Extension|lateExtensionField2 in #t13{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has not been initialized.");
+ return self::_#Extension|lateExtensionField2#isSet ?{core::int} let final core::int? #t13 = self::_#Extension|lateExtensionField2 in #t13{core::int} : throw new _in::LateError::fieldNI("lateExtensionField2");
static set Extension|lateExtensionField2(core::int #t14) → void {
self::_#Extension|lateExtensionField2#isSet = true;
self::_#Extension|lateExtensionField2 = #t14;
diff --git a/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.transformed.expect
index 4d4ab11..d782319 100644
--- a/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.transformed.expect
@@ -16,13 +16,13 @@
: super core::Object::•()
;
static get lateStaticField1() → core::int
- return self::Class::_#lateStaticField1#isSet ?{core::int} let final core::int? #t1 = self::Class::_#lateStaticField1 in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has not been initialized.");
+ return self::Class::_#lateStaticField1#isSet ?{core::int} let final core::int? #t1 = self::Class::_#lateStaticField1 in #t1{core::int} : throw new _in::LateError::fieldNI("lateStaticField1");
static set lateStaticField1(core::int #t2) → void {
self::Class::_#lateStaticField1#isSet = true;
self::Class::_#lateStaticField1 = #t2;
}
static get lateStaticField2() → core::int
- return self::Class::_#lateStaticField2#isSet ?{core::int} let final core::int? #t3 = self::Class::_#lateStaticField2 in #t3{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has not been initialized.");
+ return self::Class::_#lateStaticField2#isSet ?{core::int} let final core::int? #t3 = self::Class::_#lateStaticField2 in #t3{core::int} : throw new _in::LateError::fieldNI("lateStaticField2");
static set lateStaticField2(core::int #t4) → void {
self::Class::_#lateStaticField2#isSet = true;
self::Class::_#lateStaticField2 = #t4;
@@ -33,13 +33,13 @@
self::expect(42, self::Class::lateStaticField2);
}
get lateInstanceField() → core::int
- return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int} let final core::int? #t5 = this.{self::Class::_#Class#lateInstanceField} in #t5{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int} let final core::int? #t5 = this.{self::Class::_#Class#lateInstanceField} in #t5{core::int} : throw new _in::LateError::fieldNI("lateInstanceField");
set lateInstanceField(core::int #t6) → void {
this.{self::Class::_#Class#lateInstanceField#isSet} = true;
this.{self::Class::_#Class#lateInstanceField} = #t6;
}
get lateGenericInstanceField() → self::Class::T%
- return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T%} let final self::Class::T? #t7 = this.{self::Class::_#Class#lateGenericInstanceField} in #t7{self::Class::T%} : throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T%} let final self::Class::T? #t7 = this.{self::Class::_#Class#lateGenericInstanceField} in #t7{self::Class::T%} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
set lateGenericInstanceField(generic-covariant-impl self::Class::T% #t8) → void {
this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
this.{self::Class::_#Class#lateGenericInstanceField} = #t8;
@@ -71,19 +71,19 @@
static field core::int? _#Extension|lateExtensionField2 = null;
static field core::bool _#Extension|lateExtensionField2#isSet = false;
static get lateTopLevelField() → core::int
- return self::_#lateTopLevelField#isSet ?{core::int} let final core::int? #t9 = self::_#lateTopLevelField in #t9{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has not been initialized.");
+ return self::_#lateTopLevelField#isSet ?{core::int} let final core::int? #t9 = self::_#lateTopLevelField in #t9{core::int} : throw new _in::LateError::fieldNI("lateTopLevelField");
static set lateTopLevelField(core::int #t10) → void {
self::_#lateTopLevelField#isSet = true;
self::_#lateTopLevelField = #t10;
}
static get Extension|lateExtensionField1() → core::int
- return self::_#Extension|lateExtensionField1#isSet ?{core::int} let final core::int? #t11 = self::_#Extension|lateExtensionField1 in #t11{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has not been initialized.");
+ return self::_#Extension|lateExtensionField1#isSet ?{core::int} let final core::int? #t11 = self::_#Extension|lateExtensionField1 in #t11{core::int} : throw new _in::LateError::fieldNI("lateExtensionField1");
static set Extension|lateExtensionField1(core::int #t12) → void {
self::_#Extension|lateExtensionField1#isSet = true;
self::_#Extension|lateExtensionField1 = #t12;
}
static get Extension|lateExtensionField2() → core::int
- return self::_#Extension|lateExtensionField2#isSet ?{core::int} let final core::int? #t13 = self::_#Extension|lateExtensionField2 in #t13{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has not been initialized.");
+ return self::_#Extension|lateExtensionField2#isSet ?{core::int} let final core::int? #t13 = self::_#Extension|lateExtensionField2 in #t13{core::int} : throw new _in::LateError::fieldNI("lateExtensionField2");
static set Extension|lateExtensionField2(core::int #t14) → void {
self::_#Extension|lateExtensionField2#isSet = true;
self::_#Extension|lateExtensionField2 = #t14;
diff --git a/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.strong.expect
index e1e5f51..dc87dd2 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.strong.expect
@@ -16,7 +16,7 @@
: super self::B::•(x)
;
get y() → core::int
- return let final core::int? #t1 = this.{self::C::_#C#y} in #t1.==(null) ?{core::int} let final core::int #t2 = this.{self::B::x}.{core::num::+}(1) in this.{self::C::_#C#y}.==(null) ?{core::int} this.{self::C::_#C#y} = #t2 : throw new _in::LateInitializationErrorImpl::•("Field 'y' has been assigned during initialization.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::C::_#C#y} in #t1.==(null) ?{core::int} let final core::int #t2 = this.{self::B::x}.{core::num::+}(1) in this.{self::C::_#C#y}.==(null) ?{core::int} this.{self::C::_#C#y} = #t2 : throw new _in::LateError::fieldADI("y") : #t1{core::int};
method method() → dynamic
return this.{self::B::x};
}
@@ -38,12 +38,12 @@
return self::Class::lateStaticField1Init = value;
}
static get lateStaticField1() → core::int
- return let final core::int? #t3 = self::Class::_#lateStaticField1 in #t3.==(null) ?{core::int} let final core::int #t4 = self::Class::initLateStaticField1(87) in self::Class::_#lateStaticField1.==(null) ?{core::int} self::Class::_#lateStaticField1 = #t4 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has been assigned during initialization.") : #t3{core::int};
+ return let final core::int? #t3 = self::Class::_#lateStaticField1 in #t3.==(null) ?{core::int} let final core::int #t4 = self::Class::initLateStaticField1(87) in self::Class::_#lateStaticField1.==(null) ?{core::int} self::Class::_#lateStaticField1 = #t4 : throw new _in::LateError::fieldADI("lateStaticField1") : #t3{core::int};
static method initLateStaticField2(core::int value) → core::int {
return self::Class::lateStaticField2Init = value;
}
static get lateStaticField2() → core::int
- return let final core::int? #t5 = self::Class::_#lateStaticField2 in #t5.==(null) ?{core::int} let final core::int #t6 = self::Class::initLateStaticField2(42) in self::Class::_#lateStaticField2.==(null) ?{core::int} self::Class::_#lateStaticField2 = #t6 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has been assigned during initialization.") : #t5{core::int};
+ return let final core::int? #t5 = self::Class::_#lateStaticField2 in #t5.==(null) ?{core::int} let final core::int #t6 = self::Class::initLateStaticField2(42) in self::Class::_#lateStaticField2.==(null) ?{core::int} self::Class::_#lateStaticField2 = #t6 : throw new _in::LateError::fieldADI("lateStaticField2") : #t5{core::int};
static method staticMethod() → dynamic {
self::expect(null, self::Class::lateStaticField2Init);
self::expect(42, self::Class::lateStaticField2);
@@ -53,7 +53,7 @@
return this.{self::Class::lateInstanceFieldInit} = value;
}
get lateInstanceField() → core::int
- return let final core::int? #t7 = this.{self::Class::_#Class#lateInstanceField} in #t7.==(null) ?{core::int} let final core::int #t8 = this.{self::Class::initLateInstanceField}(16) in this.{self::Class::_#Class#lateInstanceField}.==(null) ?{core::int} this.{self::Class::_#Class#lateInstanceField} = #t8 : throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has been assigned during initialization.") : #t7{core::int};
+ return let final core::int? #t7 = this.{self::Class::_#Class#lateInstanceField} in #t7.==(null) ?{core::int} let final core::int #t8 = this.{self::Class::initLateInstanceField}(16) in this.{self::Class::_#Class#lateInstanceField}.==(null) ?{core::int} this.{self::Class::_#Class#lateInstanceField} = #t8 : throw new _in::LateError::fieldADI("lateInstanceField") : #t7{core::int};
method initLateGenericField(generic-covariant-impl self::Class::T% value) → self::Class::T% {
return this.{self::Class::lateGenericFieldInit} = value;
}
@@ -61,7 +61,7 @@
if(!this.{self::Class::_#Class#lateGenericField#isSet}) {
final self::Class::T% #t9 = this.{self::Class::initLateGenericField}(this.{self::Class::field});
if(this.{self::Class::_#Class#lateGenericField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateGenericField");
this.{self::Class::_#Class#lateGenericField} = #t9;
this.{self::Class::_#Class#lateGenericField#isSet} = true;
}
@@ -97,17 +97,17 @@
return self::lateTopLevelField1Init = value;
}
static get lateTopLevelField1() → core::int
- return let final core::int? #t11 = self::_#lateTopLevelField1 in #t11.==(null) ?{core::int} let final core::int #t12 = self::initLateTopLevelField1(123) in self::_#lateTopLevelField1.==(null) ?{core::int} self::_#lateTopLevelField1 = #t12 : throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField1' has been assigned during initialization.") : #t11{core::int};
+ return let final core::int? #t11 = self::_#lateTopLevelField1 in #t11.==(null) ?{core::int} let final core::int #t12 = self::initLateTopLevelField1(123) in self::_#lateTopLevelField1.==(null) ?{core::int} self::_#lateTopLevelField1 = #t12 : throw new _in::LateError::fieldADI("lateTopLevelField1") : #t11{core::int};
static method Extension|initLateExtensionField1(core::int value) → core::int {
return self::Extension|lateExtensionField1Init = value;
}
static get Extension|lateExtensionField1() → core::int
- return let final core::int? #t13 = self::_#Extension|lateExtensionField1 in #t13.==(null) ?{core::int} let final core::int #t14 = self::Extension|initLateExtensionField1(87) in self::_#Extension|lateExtensionField1.==(null) ?{core::int} self::_#Extension|lateExtensionField1 = #t14 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has been assigned during initialization.") : #t13{core::int};
+ return let final core::int? #t13 = self::_#Extension|lateExtensionField1 in #t13.==(null) ?{core::int} let final core::int #t14 = self::Extension|initLateExtensionField1(87) in self::_#Extension|lateExtensionField1.==(null) ?{core::int} self::_#Extension|lateExtensionField1 = #t14 : throw new _in::LateError::fieldADI("lateExtensionField1") : #t13{core::int};
static method Extension|initLateExtensionField2(core::int value) → core::int {
return self::Extension|lateExtensionField2Init = value;
}
static get Extension|lateExtensionField2() → core::int
- return let final core::int? #t15 = self::_#Extension|lateExtensionField2 in #t15.==(null) ?{core::int} let final core::int #t16 = self::Extension|initLateExtensionField2(42) in self::_#Extension|lateExtensionField2.==(null) ?{core::int} self::_#Extension|lateExtensionField2 = #t16 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has been assigned during initialization.") : #t15{core::int};
+ return let final core::int? #t15 = self::_#Extension|lateExtensionField2 in #t15.==(null) ?{core::int} let final core::int #t16 = self::Extension|initLateExtensionField2(42) in self::_#Extension|lateExtensionField2.==(null) ?{core::int} self::_#Extension|lateExtensionField2 = #t16 : throw new _in::LateError::fieldADI("lateExtensionField2") : #t15{core::int};
static method Extension|staticMethod() → dynamic {
self::expect(null, self::Extension|lateExtensionField2Init);
self::expect(42, self::Extension|lateExtensionField2);
diff --git a/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.strong.transformed.expect
index e1e5f51..dc87dd2 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.strong.transformed.expect
@@ -16,7 +16,7 @@
: super self::B::•(x)
;
get y() → core::int
- return let final core::int? #t1 = this.{self::C::_#C#y} in #t1.==(null) ?{core::int} let final core::int #t2 = this.{self::B::x}.{core::num::+}(1) in this.{self::C::_#C#y}.==(null) ?{core::int} this.{self::C::_#C#y} = #t2 : throw new _in::LateInitializationErrorImpl::•("Field 'y' has been assigned during initialization.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::C::_#C#y} in #t1.==(null) ?{core::int} let final core::int #t2 = this.{self::B::x}.{core::num::+}(1) in this.{self::C::_#C#y}.==(null) ?{core::int} this.{self::C::_#C#y} = #t2 : throw new _in::LateError::fieldADI("y") : #t1{core::int};
method method() → dynamic
return this.{self::B::x};
}
@@ -38,12 +38,12 @@
return self::Class::lateStaticField1Init = value;
}
static get lateStaticField1() → core::int
- return let final core::int? #t3 = self::Class::_#lateStaticField1 in #t3.==(null) ?{core::int} let final core::int #t4 = self::Class::initLateStaticField1(87) in self::Class::_#lateStaticField1.==(null) ?{core::int} self::Class::_#lateStaticField1 = #t4 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has been assigned during initialization.") : #t3{core::int};
+ return let final core::int? #t3 = self::Class::_#lateStaticField1 in #t3.==(null) ?{core::int} let final core::int #t4 = self::Class::initLateStaticField1(87) in self::Class::_#lateStaticField1.==(null) ?{core::int} self::Class::_#lateStaticField1 = #t4 : throw new _in::LateError::fieldADI("lateStaticField1") : #t3{core::int};
static method initLateStaticField2(core::int value) → core::int {
return self::Class::lateStaticField2Init = value;
}
static get lateStaticField2() → core::int
- return let final core::int? #t5 = self::Class::_#lateStaticField2 in #t5.==(null) ?{core::int} let final core::int #t6 = self::Class::initLateStaticField2(42) in self::Class::_#lateStaticField2.==(null) ?{core::int} self::Class::_#lateStaticField2 = #t6 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has been assigned during initialization.") : #t5{core::int};
+ return let final core::int? #t5 = self::Class::_#lateStaticField2 in #t5.==(null) ?{core::int} let final core::int #t6 = self::Class::initLateStaticField2(42) in self::Class::_#lateStaticField2.==(null) ?{core::int} self::Class::_#lateStaticField2 = #t6 : throw new _in::LateError::fieldADI("lateStaticField2") : #t5{core::int};
static method staticMethod() → dynamic {
self::expect(null, self::Class::lateStaticField2Init);
self::expect(42, self::Class::lateStaticField2);
@@ -53,7 +53,7 @@
return this.{self::Class::lateInstanceFieldInit} = value;
}
get lateInstanceField() → core::int
- return let final core::int? #t7 = this.{self::Class::_#Class#lateInstanceField} in #t7.==(null) ?{core::int} let final core::int #t8 = this.{self::Class::initLateInstanceField}(16) in this.{self::Class::_#Class#lateInstanceField}.==(null) ?{core::int} this.{self::Class::_#Class#lateInstanceField} = #t8 : throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has been assigned during initialization.") : #t7{core::int};
+ return let final core::int? #t7 = this.{self::Class::_#Class#lateInstanceField} in #t7.==(null) ?{core::int} let final core::int #t8 = this.{self::Class::initLateInstanceField}(16) in this.{self::Class::_#Class#lateInstanceField}.==(null) ?{core::int} this.{self::Class::_#Class#lateInstanceField} = #t8 : throw new _in::LateError::fieldADI("lateInstanceField") : #t7{core::int};
method initLateGenericField(generic-covariant-impl self::Class::T% value) → self::Class::T% {
return this.{self::Class::lateGenericFieldInit} = value;
}
@@ -61,7 +61,7 @@
if(!this.{self::Class::_#Class#lateGenericField#isSet}) {
final self::Class::T% #t9 = this.{self::Class::initLateGenericField}(this.{self::Class::field});
if(this.{self::Class::_#Class#lateGenericField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateGenericField");
this.{self::Class::_#Class#lateGenericField} = #t9;
this.{self::Class::_#Class#lateGenericField#isSet} = true;
}
@@ -97,17 +97,17 @@
return self::lateTopLevelField1Init = value;
}
static get lateTopLevelField1() → core::int
- return let final core::int? #t11 = self::_#lateTopLevelField1 in #t11.==(null) ?{core::int} let final core::int #t12 = self::initLateTopLevelField1(123) in self::_#lateTopLevelField1.==(null) ?{core::int} self::_#lateTopLevelField1 = #t12 : throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField1' has been assigned during initialization.") : #t11{core::int};
+ return let final core::int? #t11 = self::_#lateTopLevelField1 in #t11.==(null) ?{core::int} let final core::int #t12 = self::initLateTopLevelField1(123) in self::_#lateTopLevelField1.==(null) ?{core::int} self::_#lateTopLevelField1 = #t12 : throw new _in::LateError::fieldADI("lateTopLevelField1") : #t11{core::int};
static method Extension|initLateExtensionField1(core::int value) → core::int {
return self::Extension|lateExtensionField1Init = value;
}
static get Extension|lateExtensionField1() → core::int
- return let final core::int? #t13 = self::_#Extension|lateExtensionField1 in #t13.==(null) ?{core::int} let final core::int #t14 = self::Extension|initLateExtensionField1(87) in self::_#Extension|lateExtensionField1.==(null) ?{core::int} self::_#Extension|lateExtensionField1 = #t14 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has been assigned during initialization.") : #t13{core::int};
+ return let final core::int? #t13 = self::_#Extension|lateExtensionField1 in #t13.==(null) ?{core::int} let final core::int #t14 = self::Extension|initLateExtensionField1(87) in self::_#Extension|lateExtensionField1.==(null) ?{core::int} self::_#Extension|lateExtensionField1 = #t14 : throw new _in::LateError::fieldADI("lateExtensionField1") : #t13{core::int};
static method Extension|initLateExtensionField2(core::int value) → core::int {
return self::Extension|lateExtensionField2Init = value;
}
static get Extension|lateExtensionField2() → core::int
- return let final core::int? #t15 = self::_#Extension|lateExtensionField2 in #t15.==(null) ?{core::int} let final core::int #t16 = self::Extension|initLateExtensionField2(42) in self::_#Extension|lateExtensionField2.==(null) ?{core::int} self::_#Extension|lateExtensionField2 = #t16 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has been assigned during initialization.") : #t15{core::int};
+ return let final core::int? #t15 = self::_#Extension|lateExtensionField2 in #t15.==(null) ?{core::int} let final core::int #t16 = self::Extension|initLateExtensionField2(42) in self::_#Extension|lateExtensionField2.==(null) ?{core::int} self::_#Extension|lateExtensionField2 = #t16 : throw new _in::LateError::fieldADI("lateExtensionField2") : #t15{core::int};
static method Extension|staticMethod() → dynamic {
self::expect(null, self::Extension|lateExtensionField2Init);
self::expect(42, self::Extension|lateExtensionField2);
diff --git a/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.expect
index af7e11a..5d1075d 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.expect
@@ -19,7 +19,7 @@
if(!this.{self::C::_#C#y#isSet}) {
final core::int #t1 = this.{self::B::x}.{core::num::+}(1);
if(this.{self::C::_#C#y#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'y' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("y");
this.{self::C::_#C#y} = #t1;
this.{self::C::_#C#y#isSet} = true;
}
@@ -52,7 +52,7 @@
if(!self::Class::_#lateStaticField1#isSet) {
final core::int #t3 = self::Class::initLateStaticField1(87);
if(self::Class::_#lateStaticField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateStaticField1");
self::Class::_#lateStaticField1 = #t3;
self::Class::_#lateStaticField1#isSet = true;
}
@@ -65,7 +65,7 @@
if(!self::Class::_#lateStaticField2#isSet) {
final core::int #t5 = self::Class::initLateStaticField2(42);
if(self::Class::_#lateStaticField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateStaticField2");
self::Class::_#lateStaticField2 = #t5;
self::Class::_#lateStaticField2#isSet = true;
}
@@ -83,7 +83,7 @@
if(!this.{self::Class::_#Class#lateInstanceField#isSet}) {
final core::int #t7 = this.{self::Class::initLateInstanceField}(16);
if(this.{self::Class::_#Class#lateInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateInstanceField");
this.{self::Class::_#Class#lateInstanceField} = #t7;
this.{self::Class::_#Class#lateInstanceField#isSet} = true;
}
@@ -96,7 +96,7 @@
if(!this.{self::Class::_#Class#lateGenericField#isSet}) {
final self::Class::T% #t9 = this.{self::Class::initLateGenericField}(this.{self::Class::field});
if(this.{self::Class::_#Class#lateGenericField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateGenericField");
this.{self::Class::_#Class#lateGenericField} = #t9;
this.{self::Class::_#Class#lateGenericField#isSet} = true;
}
@@ -140,7 +140,7 @@
if(!self::_#lateTopLevelField1#isSet) {
final core::int #t11 = self::initLateTopLevelField1(123);
if(self::_#lateTopLevelField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateTopLevelField1");
self::_#lateTopLevelField1 = #t11;
self::_#lateTopLevelField1#isSet = true;
}
@@ -153,7 +153,7 @@
if(!self::_#Extension|lateExtensionField1#isSet) {
final core::int #t13 = self::Extension|initLateExtensionField1(87);
if(self::_#Extension|lateExtensionField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateExtensionField1");
self::_#Extension|lateExtensionField1 = #t13;
self::_#Extension|lateExtensionField1#isSet = true;
}
@@ -166,7 +166,7 @@
if(!self::_#Extension|lateExtensionField2#isSet) {
final core::int #t15 = self::Extension|initLateExtensionField2(42);
if(self::_#Extension|lateExtensionField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateExtensionField2");
self::_#Extension|lateExtensionField2 = #t15;
self::_#Extension|lateExtensionField2#isSet = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.transformed.expect
index af7e11a..5d1075d 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.transformed.expect
@@ -19,7 +19,7 @@
if(!this.{self::C::_#C#y#isSet}) {
final core::int #t1 = this.{self::B::x}.{core::num::+}(1);
if(this.{self::C::_#C#y#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'y' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("y");
this.{self::C::_#C#y} = #t1;
this.{self::C::_#C#y#isSet} = true;
}
@@ -52,7 +52,7 @@
if(!self::Class::_#lateStaticField1#isSet) {
final core::int #t3 = self::Class::initLateStaticField1(87);
if(self::Class::_#lateStaticField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateStaticField1");
self::Class::_#lateStaticField1 = #t3;
self::Class::_#lateStaticField1#isSet = true;
}
@@ -65,7 +65,7 @@
if(!self::Class::_#lateStaticField2#isSet) {
final core::int #t5 = self::Class::initLateStaticField2(42);
if(self::Class::_#lateStaticField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateStaticField2");
self::Class::_#lateStaticField2 = #t5;
self::Class::_#lateStaticField2#isSet = true;
}
@@ -83,7 +83,7 @@
if(!this.{self::Class::_#Class#lateInstanceField#isSet}) {
final core::int #t7 = this.{self::Class::initLateInstanceField}(16);
if(this.{self::Class::_#Class#lateInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateInstanceField");
this.{self::Class::_#Class#lateInstanceField} = #t7;
this.{self::Class::_#Class#lateInstanceField#isSet} = true;
}
@@ -96,7 +96,7 @@
if(!this.{self::Class::_#Class#lateGenericField#isSet}) {
final self::Class::T% #t9 = this.{self::Class::initLateGenericField}(this.{self::Class::field});
if(this.{self::Class::_#Class#lateGenericField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateGenericField");
this.{self::Class::_#Class#lateGenericField} = #t9;
this.{self::Class::_#Class#lateGenericField#isSet} = true;
}
@@ -140,7 +140,7 @@
if(!self::_#lateTopLevelField1#isSet) {
final core::int #t11 = self::initLateTopLevelField1(123);
if(self::_#lateTopLevelField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateTopLevelField1");
self::_#lateTopLevelField1 = #t11;
self::_#lateTopLevelField1#isSet = true;
}
@@ -153,7 +153,7 @@
if(!self::_#Extension|lateExtensionField1#isSet) {
final core::int #t13 = self::Extension|initLateExtensionField1(87);
if(self::_#Extension|lateExtensionField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateExtensionField1");
self::_#Extension|lateExtensionField1 = #t13;
self::_#Extension|lateExtensionField1#isSet = true;
}
@@ -166,7 +166,7 @@
if(!self::_#Extension|lateExtensionField2#isSet) {
final core::int #t15 = self::Extension|initLateExtensionField2(42);
if(self::_#Extension|lateExtensionField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateExtensionField2");
self::_#Extension|lateExtensionField2 = #t15;
self::_#Extension|lateExtensionField2#isSet = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/late_final_field_without_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_final_field_without_initializer.dart.strong.expect
index 6c0bb20..13abe89 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_field_without_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_field_without_initializer.dart.strong.expect
@@ -11,19 +11,19 @@
: super core::Object::•()
;
static get lateStaticField1() → core::int
- return let final core::int? #t1 = self::Class::_#lateStaticField1 in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = self::Class::_#lateStaticField1 in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateStaticField1") : #t1{core::int};
static set lateStaticField1(core::int #t2) → void
if(self::Class::_#lateStaticField1.==(null))
self::Class::_#lateStaticField1 = #t2;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateStaticField1");
static get lateStaticField2() → core::int
- return let final core::int? #t3 = self::Class::_#lateStaticField2 in #t3.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has not been initialized.") : #t3{core::int};
+ return let final core::int? #t3 = self::Class::_#lateStaticField2 in #t3.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateStaticField2") : #t3{core::int};
static set lateStaticField2(core::int #t4) → void
if(self::Class::_#lateStaticField2.==(null))
self::Class::_#lateStaticField2 = #t4;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateStaticField2");
static method staticMethod() → dynamic {
self::throws(() → core::int => self::Class::lateStaticField2, "Read value from uninitialized Class.lateStaticField2");
self::Class::lateStaticField2 = 42;
@@ -31,12 +31,12 @@
self::throws(() → core::int => self::Class::lateStaticField2 = 43, "Write value to initialized Class.lateStaticField2");
}
get lateInstanceField() → core::int
- return let final core::int? #t5 = this.{self::Class::_#Class#lateInstanceField} in #t5.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has not been initialized.") : #t5{core::int};
+ return let final core::int? #t5 = this.{self::Class::_#Class#lateInstanceField} in #t5.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateInstanceField") : #t5{core::int};
set lateInstanceField(core::int #t6) → void
if(this.{self::Class::_#Class#lateInstanceField}.==(null))
this.{self::Class::_#Class#lateInstanceField} = #t6;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateInstanceField");
method instanceMethod() → dynamic {
self::throws(() → core::int => this.{self::Class::lateInstanceField}, "Read value from uninitialized Class.lateInstanceField");
this.{self::Class::lateInstanceField} = 16;
@@ -57,26 +57,26 @@
static field core::int? _#Extension|lateExtensionField1 = null;
static field core::int? _#Extension|lateExtensionField2 = null;
static get lateTopLevelField() → core::int
- return let final core::int? #t7 = self::_#lateTopLevelField in #t7.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has not been initialized.") : #t7{core::int};
+ return let final core::int? #t7 = self::_#lateTopLevelField in #t7.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateTopLevelField") : #t7{core::int};
static set lateTopLevelField(core::int #t8) → void
if(self::_#lateTopLevelField.==(null))
self::_#lateTopLevelField = #t8;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateTopLevelField");
static get Extension|lateExtensionField1() → core::int
- return let final core::int? #t9 = self::_#Extension|lateExtensionField1 in #t9.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has not been initialized.") : #t9{core::int};
+ return let final core::int? #t9 = self::_#Extension|lateExtensionField1 in #t9.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateExtensionField1") : #t9{core::int};
static set Extension|lateExtensionField1(core::int #t10) → void
if(self::_#Extension|lateExtensionField1.==(null))
self::_#Extension|lateExtensionField1 = #t10;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateExtensionField1");
static get Extension|lateExtensionField2() → core::int
- return let final core::int? #t11 = self::_#Extension|lateExtensionField2 in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has not been initialized.") : #t11{core::int};
+ return let final core::int? #t11 = self::_#Extension|lateExtensionField2 in #t11.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateExtensionField2") : #t11{core::int};
static set Extension|lateExtensionField2(core::int #t12) → void
if(self::_#Extension|lateExtensionField2.==(null))
self::_#Extension|lateExtensionField2 = #t12;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateExtensionField2");
static method Extension|staticMethod() → dynamic {
self::throws(() → core::int => self::Extension|lateExtensionField2, "Read value from uninitialized Class.lateExtensionField2");
self::Extension|lateExtensionField2 = 42;
diff --git a/pkg/front_end/testcases/late_lowering/late_final_field_without_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_final_field_without_initializer.dart.strong.transformed.expect
index 6c0bb20..13abe89 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_field_without_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_field_without_initializer.dart.strong.transformed.expect
@@ -11,19 +11,19 @@
: super core::Object::•()
;
static get lateStaticField1() → core::int
- return let final core::int? #t1 = self::Class::_#lateStaticField1 in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = self::Class::_#lateStaticField1 in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateStaticField1") : #t1{core::int};
static set lateStaticField1(core::int #t2) → void
if(self::Class::_#lateStaticField1.==(null))
self::Class::_#lateStaticField1 = #t2;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateStaticField1");
static get lateStaticField2() → core::int
- return let final core::int? #t3 = self::Class::_#lateStaticField2 in #t3.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has not been initialized.") : #t3{core::int};
+ return let final core::int? #t3 = self::Class::_#lateStaticField2 in #t3.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateStaticField2") : #t3{core::int};
static set lateStaticField2(core::int #t4) → void
if(self::Class::_#lateStaticField2.==(null))
self::Class::_#lateStaticField2 = #t4;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateStaticField2");
static method staticMethod() → dynamic {
self::throws(() → core::int => self::Class::lateStaticField2, "Read value from uninitialized Class.lateStaticField2");
self::Class::lateStaticField2 = 42;
@@ -31,12 +31,12 @@
self::throws(() → core::int => self::Class::lateStaticField2 = 43, "Write value to initialized Class.lateStaticField2");
}
get lateInstanceField() → core::int
- return let final core::int? #t5 = this.{self::Class::_#Class#lateInstanceField} in #t5.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has not been initialized.") : #t5{core::int};
+ return let final core::int? #t5 = this.{self::Class::_#Class#lateInstanceField} in #t5.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateInstanceField") : #t5{core::int};
set lateInstanceField(core::int #t6) → void
if(this.{self::Class::_#Class#lateInstanceField}.==(null))
this.{self::Class::_#Class#lateInstanceField} = #t6;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateInstanceField");
method instanceMethod() → dynamic {
self::throws(() → core::int => this.{self::Class::lateInstanceField}, "Read value from uninitialized Class.lateInstanceField");
this.{self::Class::lateInstanceField} = 16;
@@ -57,26 +57,26 @@
static field core::int? _#Extension|lateExtensionField1 = null;
static field core::int? _#Extension|lateExtensionField2 = null;
static get lateTopLevelField() → core::int
- return let final core::int? #t7 = self::_#lateTopLevelField in #t7.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has not been initialized.") : #t7{core::int};
+ return let final core::int? #t7 = self::_#lateTopLevelField in #t7.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateTopLevelField") : #t7{core::int};
static set lateTopLevelField(core::int #t8) → void
if(self::_#lateTopLevelField.==(null))
self::_#lateTopLevelField = #t8;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateTopLevelField");
static get Extension|lateExtensionField1() → core::int
- return let final core::int? #t9 = self::_#Extension|lateExtensionField1 in #t9.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has not been initialized.") : #t9{core::int};
+ return let final core::int? #t9 = self::_#Extension|lateExtensionField1 in #t9.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateExtensionField1") : #t9{core::int};
static set Extension|lateExtensionField1(core::int #t10) → void
if(self::_#Extension|lateExtensionField1.==(null))
self::_#Extension|lateExtensionField1 = #t10;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateExtensionField1");
static get Extension|lateExtensionField2() → core::int
- return let final core::int? #t11 = self::_#Extension|lateExtensionField2 in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has not been initialized.") : #t11{core::int};
+ return let final core::int? #t11 = self::_#Extension|lateExtensionField2 in #t11.==(null) ?{core::int} throw new _in::LateError::fieldNI("lateExtensionField2") : #t11{core::int};
static set Extension|lateExtensionField2(core::int #t12) → void
if(self::_#Extension|lateExtensionField2.==(null))
self::_#Extension|lateExtensionField2 = #t12;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateExtensionField2");
static method Extension|staticMethod() → dynamic {
self::throws(() → core::int => self::Extension|lateExtensionField2, "Read value from uninitialized Class.lateExtensionField2");
self::Extension|lateExtensionField2 = 42;
diff --git a/pkg/front_end/testcases/late_lowering/late_final_field_without_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_final_field_without_initializer.dart.weak.expect
index 381a0ba..63c7b11 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_field_without_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_field_without_initializer.dart.weak.expect
@@ -14,19 +14,19 @@
: super core::Object::•()
;
static get lateStaticField1() → core::int
- return self::Class::_#lateStaticField1#isSet ?{core::int} let final core::int? #t1 = self::Class::_#lateStaticField1 in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has not been initialized.");
+ return self::Class::_#lateStaticField1#isSet ?{core::int} let final core::int? #t1 = self::Class::_#lateStaticField1 in #t1{core::int} : throw new _in::LateError::fieldNI("lateStaticField1");
static set lateStaticField1(core::int #t2) → void
if(self::Class::_#lateStaticField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateStaticField1");
else {
self::Class::_#lateStaticField1#isSet = true;
self::Class::_#lateStaticField1 = #t2;
}
static get lateStaticField2() → core::int
- return self::Class::_#lateStaticField2#isSet ?{core::int} let final core::int? #t3 = self::Class::_#lateStaticField2 in #t3{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has not been initialized.");
+ return self::Class::_#lateStaticField2#isSet ?{core::int} let final core::int? #t3 = self::Class::_#lateStaticField2 in #t3{core::int} : throw new _in::LateError::fieldNI("lateStaticField2");
static set lateStaticField2(core::int #t4) → void
if(self::Class::_#lateStaticField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateStaticField2");
else {
self::Class::_#lateStaticField2#isSet = true;
self::Class::_#lateStaticField2 = #t4;
@@ -38,10 +38,10 @@
self::throws(() → core::int => self::Class::lateStaticField2 = 43, "Write value to initialized Class.lateStaticField2");
}
get lateInstanceField() → core::int
- return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int} let final core::int? #t5 = this.{self::Class::_#Class#lateInstanceField} in #t5{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int} let final core::int? #t5 = this.{self::Class::_#Class#lateInstanceField} in #t5{core::int} : throw new _in::LateError::fieldNI("lateInstanceField");
set lateInstanceField(core::int #t6) → void
if(this.{self::Class::_#Class#lateInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateInstanceField");
else {
this.{self::Class::_#Class#lateInstanceField#isSet} = true;
this.{self::Class::_#Class#lateInstanceField} = #t6;
@@ -71,28 +71,28 @@
static field core::int? _#Extension|lateExtensionField2 = null;
static field core::bool _#Extension|lateExtensionField2#isSet = false;
static get lateTopLevelField() → core::int
- return self::_#lateTopLevelField#isSet ?{core::int} let final core::int? #t7 = self::_#lateTopLevelField in #t7{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has not been initialized.");
+ return self::_#lateTopLevelField#isSet ?{core::int} let final core::int? #t7 = self::_#lateTopLevelField in #t7{core::int} : throw new _in::LateError::fieldNI("lateTopLevelField");
static set lateTopLevelField(core::int #t8) → void
if(self::_#lateTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateTopLevelField");
else {
self::_#lateTopLevelField#isSet = true;
self::_#lateTopLevelField = #t8;
}
static get Extension|lateExtensionField1() → core::int
- return self::_#Extension|lateExtensionField1#isSet ?{core::int} let final core::int? #t9 = self::_#Extension|lateExtensionField1 in #t9{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has not been initialized.");
+ return self::_#Extension|lateExtensionField1#isSet ?{core::int} let final core::int? #t9 = self::_#Extension|lateExtensionField1 in #t9{core::int} : throw new _in::LateError::fieldNI("lateExtensionField1");
static set Extension|lateExtensionField1(core::int #t10) → void
if(self::_#Extension|lateExtensionField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateExtensionField1");
else {
self::_#Extension|lateExtensionField1#isSet = true;
self::_#Extension|lateExtensionField1 = #t10;
}
static get Extension|lateExtensionField2() → core::int
- return self::_#Extension|lateExtensionField2#isSet ?{core::int} let final core::int? #t11 = self::_#Extension|lateExtensionField2 in #t11{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has not been initialized.");
+ return self::_#Extension|lateExtensionField2#isSet ?{core::int} let final core::int? #t11 = self::_#Extension|lateExtensionField2 in #t11{core::int} : throw new _in::LateError::fieldNI("lateExtensionField2");
static set Extension|lateExtensionField2(core::int #t12) → void
if(self::_#Extension|lateExtensionField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateExtensionField2");
else {
self::_#Extension|lateExtensionField2#isSet = true;
self::_#Extension|lateExtensionField2 = #t12;
diff --git a/pkg/front_end/testcases/late_lowering/late_final_field_without_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_final_field_without_initializer.dart.weak.transformed.expect
index 381a0ba..63c7b11 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_field_without_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_field_without_initializer.dart.weak.transformed.expect
@@ -14,19 +14,19 @@
: super core::Object::•()
;
static get lateStaticField1() → core::int
- return self::Class::_#lateStaticField1#isSet ?{core::int} let final core::int? #t1 = self::Class::_#lateStaticField1 in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has not been initialized.");
+ return self::Class::_#lateStaticField1#isSet ?{core::int} let final core::int? #t1 = self::Class::_#lateStaticField1 in #t1{core::int} : throw new _in::LateError::fieldNI("lateStaticField1");
static set lateStaticField1(core::int #t2) → void
if(self::Class::_#lateStaticField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateStaticField1");
else {
self::Class::_#lateStaticField1#isSet = true;
self::Class::_#lateStaticField1 = #t2;
}
static get lateStaticField2() → core::int
- return self::Class::_#lateStaticField2#isSet ?{core::int} let final core::int? #t3 = self::Class::_#lateStaticField2 in #t3{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has not been initialized.");
+ return self::Class::_#lateStaticField2#isSet ?{core::int} let final core::int? #t3 = self::Class::_#lateStaticField2 in #t3{core::int} : throw new _in::LateError::fieldNI("lateStaticField2");
static set lateStaticField2(core::int #t4) → void
if(self::Class::_#lateStaticField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateStaticField2");
else {
self::Class::_#lateStaticField2#isSet = true;
self::Class::_#lateStaticField2 = #t4;
@@ -38,10 +38,10 @@
self::throws(() → core::int => self::Class::lateStaticField2 = 43, "Write value to initialized Class.lateStaticField2");
}
get lateInstanceField() → core::int
- return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int} let final core::int? #t5 = this.{self::Class::_#Class#lateInstanceField} in #t5{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int} let final core::int? #t5 = this.{self::Class::_#Class#lateInstanceField} in #t5{core::int} : throw new _in::LateError::fieldNI("lateInstanceField");
set lateInstanceField(core::int #t6) → void
if(this.{self::Class::_#Class#lateInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateInstanceField");
else {
this.{self::Class::_#Class#lateInstanceField#isSet} = true;
this.{self::Class::_#Class#lateInstanceField} = #t6;
@@ -71,28 +71,28 @@
static field core::int? _#Extension|lateExtensionField2 = null;
static field core::bool _#Extension|lateExtensionField2#isSet = false;
static get lateTopLevelField() → core::int
- return self::_#lateTopLevelField#isSet ?{core::int} let final core::int? #t7 = self::_#lateTopLevelField in #t7{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has not been initialized.");
+ return self::_#lateTopLevelField#isSet ?{core::int} let final core::int? #t7 = self::_#lateTopLevelField in #t7{core::int} : throw new _in::LateError::fieldNI("lateTopLevelField");
static set lateTopLevelField(core::int #t8) → void
if(self::_#lateTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateTopLevelField");
else {
self::_#lateTopLevelField#isSet = true;
self::_#lateTopLevelField = #t8;
}
static get Extension|lateExtensionField1() → core::int
- return self::_#Extension|lateExtensionField1#isSet ?{core::int} let final core::int? #t9 = self::_#Extension|lateExtensionField1 in #t9{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has not been initialized.");
+ return self::_#Extension|lateExtensionField1#isSet ?{core::int} let final core::int? #t9 = self::_#Extension|lateExtensionField1 in #t9{core::int} : throw new _in::LateError::fieldNI("lateExtensionField1");
static set Extension|lateExtensionField1(core::int #t10) → void
if(self::_#Extension|lateExtensionField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateExtensionField1");
else {
self::_#Extension|lateExtensionField1#isSet = true;
self::_#Extension|lateExtensionField1 = #t10;
}
static get Extension|lateExtensionField2() → core::int
- return self::_#Extension|lateExtensionField2#isSet ?{core::int} let final core::int? #t11 = self::_#Extension|lateExtensionField2 in #t11{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has not been initialized.");
+ return self::_#Extension|lateExtensionField2#isSet ?{core::int} let final core::int? #t11 = self::_#Extension|lateExtensionField2 in #t11{core::int} : throw new _in::LateError::fieldNI("lateExtensionField2");
static set Extension|lateExtensionField2(core::int #t12) → void
if(self::_#Extension|lateExtensionField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateExtensionField2");
else {
self::_#Extension|lateExtensionField2#isSet = true;
self::_#Extension|lateExtensionField2 = #t12;
diff --git a/pkg/front_end/testcases/late_lowering/late_final_local_without_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_final_local_without_initializer.dart.strong.expect
index 3476c20..f10adef 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_local_without_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_local_without_initializer.dart.strong.expect
@@ -7,12 +7,12 @@
core::bool b = false;
final core::int? lateLocal;
function #lateLocal#get() → core::int
- return let final core::int? #t1 = lateLocal in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = lateLocal in #t1.==(null) ?{core::int} throw new _in::LateError::localNI("lateLocal") : #t1{core::int};
function #lateLocal#set(core::int #t2) → dynamic
if(lateLocal.==(null))
return lateLocal = #t2;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has already been initialized.");
+ throw new _in::LateError::localAI("lateLocal");
if(b) {
#lateLocal#set.call(123);
}
@@ -26,10 +26,10 @@
final T? lateGenericLocal;
core::bool #lateGenericLocal#isSet = false;
function #lateGenericLocal#get() → T%
- return #lateGenericLocal#isSet ?{T%} lateGenericLocal{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has not been initialized.");
+ return #lateGenericLocal#isSet ?{T%} lateGenericLocal{T%} : throw new _in::LateError::localNI("lateGenericLocal");
function #lateGenericLocal#set(T% #t3) → dynamic
if(#lateGenericLocal#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has already been initialized.");
+ throw new _in::LateError::localAI("lateGenericLocal");
else {
#lateGenericLocal#isSet = true;
return lateGenericLocal = #t3;
diff --git a/pkg/front_end/testcases/late_lowering/late_final_local_without_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_final_local_without_initializer.dart.strong.transformed.expect
index 3476c20..f10adef 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_local_without_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_local_without_initializer.dart.strong.transformed.expect
@@ -7,12 +7,12 @@
core::bool b = false;
final core::int? lateLocal;
function #lateLocal#get() → core::int
- return let final core::int? #t1 = lateLocal in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = lateLocal in #t1.==(null) ?{core::int} throw new _in::LateError::localNI("lateLocal") : #t1{core::int};
function #lateLocal#set(core::int #t2) → dynamic
if(lateLocal.==(null))
return lateLocal = #t2;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has already been initialized.");
+ throw new _in::LateError::localAI("lateLocal");
if(b) {
#lateLocal#set.call(123);
}
@@ -26,10 +26,10 @@
final T? lateGenericLocal;
core::bool #lateGenericLocal#isSet = false;
function #lateGenericLocal#get() → T%
- return #lateGenericLocal#isSet ?{T%} lateGenericLocal{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has not been initialized.");
+ return #lateGenericLocal#isSet ?{T%} lateGenericLocal{T%} : throw new _in::LateError::localNI("lateGenericLocal");
function #lateGenericLocal#set(T% #t3) → dynamic
if(#lateGenericLocal#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has already been initialized.");
+ throw new _in::LateError::localAI("lateGenericLocal");
else {
#lateGenericLocal#isSet = true;
return lateGenericLocal = #t3;
diff --git a/pkg/front_end/testcases/late_lowering/late_final_local_without_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_final_local_without_initializer.dart.weak.expect
index 7a343a9..069d6bd 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_local_without_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_local_without_initializer.dart.weak.expect
@@ -8,10 +8,10 @@
final core::int? lateLocal;
core::bool #lateLocal#isSet = false;
function #lateLocal#get() → core::int
- return #lateLocal#isSet ?{core::int} lateLocal{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has not been initialized.");
+ return #lateLocal#isSet ?{core::int} lateLocal{core::int} : throw new _in::LateError::localNI("lateLocal");
function #lateLocal#set(core::int #t1) → dynamic
if(#lateLocal#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has already been initialized.");
+ throw new _in::LateError::localAI("lateLocal");
else {
#lateLocal#isSet = true;
return lateLocal = #t1;
@@ -29,10 +29,10 @@
final T? lateGenericLocal;
core::bool #lateGenericLocal#isSet = false;
function #lateGenericLocal#get() → T%
- return #lateGenericLocal#isSet ?{T%} lateGenericLocal{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has not been initialized.");
+ return #lateGenericLocal#isSet ?{T%} lateGenericLocal{T%} : throw new _in::LateError::localNI("lateGenericLocal");
function #lateGenericLocal#set(T% #t2) → dynamic
if(#lateGenericLocal#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has already been initialized.");
+ throw new _in::LateError::localAI("lateGenericLocal");
else {
#lateGenericLocal#isSet = true;
return lateGenericLocal = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/late_final_local_without_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_final_local_without_initializer.dart.weak.transformed.expect
index 7a343a9..069d6bd 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_local_without_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_local_without_initializer.dart.weak.transformed.expect
@@ -8,10 +8,10 @@
final core::int? lateLocal;
core::bool #lateLocal#isSet = false;
function #lateLocal#get() → core::int
- return #lateLocal#isSet ?{core::int} lateLocal{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has not been initialized.");
+ return #lateLocal#isSet ?{core::int} lateLocal{core::int} : throw new _in::LateError::localNI("lateLocal");
function #lateLocal#set(core::int #t1) → dynamic
if(#lateLocal#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has already been initialized.");
+ throw new _in::LateError::localAI("lateLocal");
else {
#lateLocal#isSet = true;
return lateLocal = #t1;
@@ -29,10 +29,10 @@
final T? lateGenericLocal;
core::bool #lateGenericLocal#isSet = false;
function #lateGenericLocal#get() → T%
- return #lateGenericLocal#isSet ?{T%} lateGenericLocal{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has not been initialized.");
+ return #lateGenericLocal#isSet ?{T%} lateGenericLocal{T%} : throw new _in::LateError::localNI("lateGenericLocal");
function #lateGenericLocal#set(T% #t2) → dynamic
if(#lateGenericLocal#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has already been initialized.");
+ throw new _in::LateError::localAI("lateGenericLocal");
else {
#lateGenericLocal#isSet = true;
return lateGenericLocal = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.strong.expect
index 52eadc4..705fc46 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.strong.expect
@@ -27,7 +27,7 @@
if(!self::Class::_#lateStaticField1#isSet) {
final core::int? #t1 = self::Class::initLateStaticField1(87);
if(self::Class::_#lateStaticField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateStaticField1");
self::Class::_#lateStaticField1 = #t1;
self::Class::_#lateStaticField1#isSet = true;
}
@@ -40,7 +40,7 @@
if(!self::Class::_#lateStaticField2#isSet) {
final core::int? #t2 = self::Class::initLateStaticField2(42);
if(self::Class::_#lateStaticField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateStaticField2");
self::Class::_#lateStaticField2 = #t2;
self::Class::_#lateStaticField2#isSet = true;
}
@@ -58,7 +58,7 @@
if(!this.{self::Class::_#Class#lateInstanceField#isSet}) {
final core::int? #t3 = this.{self::Class::initLateInstanceField}(16);
if(this.{self::Class::_#Class#lateInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateInstanceField");
this.{self::Class::_#Class#lateInstanceField} = #t3;
this.{self::Class::_#Class#lateInstanceField#isSet} = true;
}
@@ -71,7 +71,7 @@
if(!this.{self::Class::_#Class#lateGenericInstanceField#isSet}) {
final self::Class::T? #t4 = this.{self::Class::initLateGenericInstanceField}(this.{self::Class::field});
if(this.{self::Class::_#Class#lateGenericInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateGenericInstanceField");
this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
}
@@ -115,7 +115,7 @@
if(!self::_#lateTopLevelField1#isSet) {
final core::int? #t5 = self::initLateTopLevelField1(123);
if(self::_#lateTopLevelField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateTopLevelField1");
self::_#lateTopLevelField1 = #t5;
self::_#lateTopLevelField1#isSet = true;
}
@@ -128,7 +128,7 @@
if(!self::_#Extension|lateExtensionField1#isSet) {
final core::int? #t6 = self::Extension|initLateExtensionField1(87);
if(self::_#Extension|lateExtensionField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateExtensionField1");
self::_#Extension|lateExtensionField1 = #t6;
self::_#Extension|lateExtensionField1#isSet = true;
}
@@ -141,7 +141,7 @@
if(!self::_#Extension|lateExtensionField2#isSet) {
final core::int? #t7 = self::Extension|initLateExtensionField2(42);
if(self::_#Extension|lateExtensionField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateExtensionField2");
self::_#Extension|lateExtensionField2 = #t7;
self::_#Extension|lateExtensionField2#isSet = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.strong.transformed.expect
index 52eadc4..705fc46 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.strong.transformed.expect
@@ -27,7 +27,7 @@
if(!self::Class::_#lateStaticField1#isSet) {
final core::int? #t1 = self::Class::initLateStaticField1(87);
if(self::Class::_#lateStaticField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateStaticField1");
self::Class::_#lateStaticField1 = #t1;
self::Class::_#lateStaticField1#isSet = true;
}
@@ -40,7 +40,7 @@
if(!self::Class::_#lateStaticField2#isSet) {
final core::int? #t2 = self::Class::initLateStaticField2(42);
if(self::Class::_#lateStaticField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateStaticField2");
self::Class::_#lateStaticField2 = #t2;
self::Class::_#lateStaticField2#isSet = true;
}
@@ -58,7 +58,7 @@
if(!this.{self::Class::_#Class#lateInstanceField#isSet}) {
final core::int? #t3 = this.{self::Class::initLateInstanceField}(16);
if(this.{self::Class::_#Class#lateInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateInstanceField");
this.{self::Class::_#Class#lateInstanceField} = #t3;
this.{self::Class::_#Class#lateInstanceField#isSet} = true;
}
@@ -71,7 +71,7 @@
if(!this.{self::Class::_#Class#lateGenericInstanceField#isSet}) {
final self::Class::T? #t4 = this.{self::Class::initLateGenericInstanceField}(this.{self::Class::field});
if(this.{self::Class::_#Class#lateGenericInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateGenericInstanceField");
this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
}
@@ -115,7 +115,7 @@
if(!self::_#lateTopLevelField1#isSet) {
final core::int? #t5 = self::initLateTopLevelField1(123);
if(self::_#lateTopLevelField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateTopLevelField1");
self::_#lateTopLevelField1 = #t5;
self::_#lateTopLevelField1#isSet = true;
}
@@ -128,7 +128,7 @@
if(!self::_#Extension|lateExtensionField1#isSet) {
final core::int? #t6 = self::Extension|initLateExtensionField1(87);
if(self::_#Extension|lateExtensionField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateExtensionField1");
self::_#Extension|lateExtensionField1 = #t6;
self::_#Extension|lateExtensionField1#isSet = true;
}
@@ -141,7 +141,7 @@
if(!self::_#Extension|lateExtensionField2#isSet) {
final core::int? #t7 = self::Extension|initLateExtensionField2(42);
if(self::_#Extension|lateExtensionField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateExtensionField2");
self::_#Extension|lateExtensionField2 = #t7;
self::_#Extension|lateExtensionField2#isSet = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.expect
index 52eadc4..705fc46 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.expect
@@ -27,7 +27,7 @@
if(!self::Class::_#lateStaticField1#isSet) {
final core::int? #t1 = self::Class::initLateStaticField1(87);
if(self::Class::_#lateStaticField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateStaticField1");
self::Class::_#lateStaticField1 = #t1;
self::Class::_#lateStaticField1#isSet = true;
}
@@ -40,7 +40,7 @@
if(!self::Class::_#lateStaticField2#isSet) {
final core::int? #t2 = self::Class::initLateStaticField2(42);
if(self::Class::_#lateStaticField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateStaticField2");
self::Class::_#lateStaticField2 = #t2;
self::Class::_#lateStaticField2#isSet = true;
}
@@ -58,7 +58,7 @@
if(!this.{self::Class::_#Class#lateInstanceField#isSet}) {
final core::int? #t3 = this.{self::Class::initLateInstanceField}(16);
if(this.{self::Class::_#Class#lateInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateInstanceField");
this.{self::Class::_#Class#lateInstanceField} = #t3;
this.{self::Class::_#Class#lateInstanceField#isSet} = true;
}
@@ -71,7 +71,7 @@
if(!this.{self::Class::_#Class#lateGenericInstanceField#isSet}) {
final self::Class::T? #t4 = this.{self::Class::initLateGenericInstanceField}(this.{self::Class::field});
if(this.{self::Class::_#Class#lateGenericInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateGenericInstanceField");
this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
}
@@ -115,7 +115,7 @@
if(!self::_#lateTopLevelField1#isSet) {
final core::int? #t5 = self::initLateTopLevelField1(123);
if(self::_#lateTopLevelField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateTopLevelField1");
self::_#lateTopLevelField1 = #t5;
self::_#lateTopLevelField1#isSet = true;
}
@@ -128,7 +128,7 @@
if(!self::_#Extension|lateExtensionField1#isSet) {
final core::int? #t6 = self::Extension|initLateExtensionField1(87);
if(self::_#Extension|lateExtensionField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateExtensionField1");
self::_#Extension|lateExtensionField1 = #t6;
self::_#Extension|lateExtensionField1#isSet = true;
}
@@ -141,7 +141,7 @@
if(!self::_#Extension|lateExtensionField2#isSet) {
final core::int? #t7 = self::Extension|initLateExtensionField2(42);
if(self::_#Extension|lateExtensionField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateExtensionField2");
self::_#Extension|lateExtensionField2 = #t7;
self::_#Extension|lateExtensionField2#isSet = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.transformed.expect
index 52eadc4..705fc46 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.transformed.expect
@@ -27,7 +27,7 @@
if(!self::Class::_#lateStaticField1#isSet) {
final core::int? #t1 = self::Class::initLateStaticField1(87);
if(self::Class::_#lateStaticField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateStaticField1");
self::Class::_#lateStaticField1 = #t1;
self::Class::_#lateStaticField1#isSet = true;
}
@@ -40,7 +40,7 @@
if(!self::Class::_#lateStaticField2#isSet) {
final core::int? #t2 = self::Class::initLateStaticField2(42);
if(self::Class::_#lateStaticField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateStaticField2");
self::Class::_#lateStaticField2 = #t2;
self::Class::_#lateStaticField2#isSet = true;
}
@@ -58,7 +58,7 @@
if(!this.{self::Class::_#Class#lateInstanceField#isSet}) {
final core::int? #t3 = this.{self::Class::initLateInstanceField}(16);
if(this.{self::Class::_#Class#lateInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateInstanceField");
this.{self::Class::_#Class#lateInstanceField} = #t3;
this.{self::Class::_#Class#lateInstanceField#isSet} = true;
}
@@ -71,7 +71,7 @@
if(!this.{self::Class::_#Class#lateGenericInstanceField#isSet}) {
final self::Class::T? #t4 = this.{self::Class::initLateGenericInstanceField}(this.{self::Class::field});
if(this.{self::Class::_#Class#lateGenericInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateGenericInstanceField");
this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
}
@@ -115,7 +115,7 @@
if(!self::_#lateTopLevelField1#isSet) {
final core::int? #t5 = self::initLateTopLevelField1(123);
if(self::_#lateTopLevelField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateTopLevelField1");
self::_#lateTopLevelField1 = #t5;
self::_#lateTopLevelField1#isSet = true;
}
@@ -128,7 +128,7 @@
if(!self::_#Extension|lateExtensionField1#isSet) {
final core::int? #t6 = self::Extension|initLateExtensionField1(87);
if(self::_#Extension|lateExtensionField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateExtensionField1");
self::_#Extension|lateExtensionField1 = #t6;
self::_#Extension|lateExtensionField1#isSet = true;
}
@@ -141,7 +141,7 @@
if(!self::_#Extension|lateExtensionField2#isSet) {
final core::int? #t7 = self::Extension|initLateExtensionField2(42);
if(self::_#Extension|lateExtensionField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("lateExtensionField2");
self::_#Extension|lateExtensionField2 = #t7;
self::_#Extension|lateExtensionField2#isSet = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.strong.expect
index 59a762a..d2f5afa 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.strong.expect
@@ -16,19 +16,19 @@
: super core::Object::•()
;
static get lateStaticField1() → core::int?
- return self::Class::_#lateStaticField1#isSet ?{core::int?} self::Class::_#lateStaticField1 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has not been initialized.");
+ return self::Class::_#lateStaticField1#isSet ?{core::int?} self::Class::_#lateStaticField1 : throw new _in::LateError::fieldNI("lateStaticField1");
static set lateStaticField1(core::int? #t1) → void
if(self::Class::_#lateStaticField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateStaticField1");
else {
self::Class::_#lateStaticField1#isSet = true;
self::Class::_#lateStaticField1 = #t1;
}
static get lateStaticField2() → core::int?
- return self::Class::_#lateStaticField2#isSet ?{core::int?} self::Class::_#lateStaticField2 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has not been initialized.");
+ return self::Class::_#lateStaticField2#isSet ?{core::int?} self::Class::_#lateStaticField2 : throw new _in::LateError::fieldNI("lateStaticField2");
static set lateStaticField2(core::int? #t2) → void
if(self::Class::_#lateStaticField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateStaticField2");
else {
self::Class::_#lateStaticField2#isSet = true;
self::Class::_#lateStaticField2 = #t2;
@@ -40,19 +40,19 @@
self::throws(() → core::int => self::Class::lateStaticField2 = 43, "Write value to initialized Class.lateStaticField2");
}
get lateInstanceField() → core::int?
- return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int?} this.{self::Class::_#Class#lateInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int?} this.{self::Class::_#Class#lateInstanceField} : throw new _in::LateError::fieldNI("lateInstanceField");
set lateInstanceField(core::int? #t3) → void
if(this.{self::Class::_#Class#lateInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateInstanceField");
else {
this.{self::Class::_#Class#lateInstanceField#isSet} = true;
this.{self::Class::_#Class#lateInstanceField} = #t3;
}
get lateGenericInstanceField() → self::Class::T?
- return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
set lateGenericInstanceField(self::Class::T? #t4) → void
if(this.{self::Class::_#Class#lateGenericInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateGenericInstanceField");
else {
this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
@@ -86,28 +86,28 @@
static field core::int? _#Extension|lateExtensionField2 = null;
static field core::bool _#Extension|lateExtensionField2#isSet = false;
static get lateTopLevelField() → core::int?
- return self::_#lateTopLevelField#isSet ?{core::int?} self::_#lateTopLevelField : throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has not been initialized.");
+ return self::_#lateTopLevelField#isSet ?{core::int?} self::_#lateTopLevelField : throw new _in::LateError::fieldNI("lateTopLevelField");
static set lateTopLevelField(core::int? #t5) → void
if(self::_#lateTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateTopLevelField");
else {
self::_#lateTopLevelField#isSet = true;
self::_#lateTopLevelField = #t5;
}
static get Extension|lateExtensionField1() → core::int?
- return self::_#Extension|lateExtensionField1#isSet ?{core::int?} self::_#Extension|lateExtensionField1 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has not been initialized.");
+ return self::_#Extension|lateExtensionField1#isSet ?{core::int?} self::_#Extension|lateExtensionField1 : throw new _in::LateError::fieldNI("lateExtensionField1");
static set Extension|lateExtensionField1(core::int? #t6) → void
if(self::_#Extension|lateExtensionField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateExtensionField1");
else {
self::_#Extension|lateExtensionField1#isSet = true;
self::_#Extension|lateExtensionField1 = #t6;
}
static get Extension|lateExtensionField2() → core::int?
- return self::_#Extension|lateExtensionField2#isSet ?{core::int?} self::_#Extension|lateExtensionField2 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has not been initialized.");
+ return self::_#Extension|lateExtensionField2#isSet ?{core::int?} self::_#Extension|lateExtensionField2 : throw new _in::LateError::fieldNI("lateExtensionField2");
static set Extension|lateExtensionField2(core::int? #t7) → void
if(self::_#Extension|lateExtensionField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateExtensionField2");
else {
self::_#Extension|lateExtensionField2#isSet = true;
self::_#Extension|lateExtensionField2 = #t7;
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.strong.transformed.expect
index 59a762a..d2f5afa 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.strong.transformed.expect
@@ -16,19 +16,19 @@
: super core::Object::•()
;
static get lateStaticField1() → core::int?
- return self::Class::_#lateStaticField1#isSet ?{core::int?} self::Class::_#lateStaticField1 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has not been initialized.");
+ return self::Class::_#lateStaticField1#isSet ?{core::int?} self::Class::_#lateStaticField1 : throw new _in::LateError::fieldNI("lateStaticField1");
static set lateStaticField1(core::int? #t1) → void
if(self::Class::_#lateStaticField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateStaticField1");
else {
self::Class::_#lateStaticField1#isSet = true;
self::Class::_#lateStaticField1 = #t1;
}
static get lateStaticField2() → core::int?
- return self::Class::_#lateStaticField2#isSet ?{core::int?} self::Class::_#lateStaticField2 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has not been initialized.");
+ return self::Class::_#lateStaticField2#isSet ?{core::int?} self::Class::_#lateStaticField2 : throw new _in::LateError::fieldNI("lateStaticField2");
static set lateStaticField2(core::int? #t2) → void
if(self::Class::_#lateStaticField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateStaticField2");
else {
self::Class::_#lateStaticField2#isSet = true;
self::Class::_#lateStaticField2 = #t2;
@@ -40,19 +40,19 @@
self::throws(() → core::int => self::Class::lateStaticField2 = 43, "Write value to initialized Class.lateStaticField2");
}
get lateInstanceField() → core::int?
- return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int?} this.{self::Class::_#Class#lateInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int?} this.{self::Class::_#Class#lateInstanceField} : throw new _in::LateError::fieldNI("lateInstanceField");
set lateInstanceField(core::int? #t3) → void
if(this.{self::Class::_#Class#lateInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateInstanceField");
else {
this.{self::Class::_#Class#lateInstanceField#isSet} = true;
this.{self::Class::_#Class#lateInstanceField} = #t3;
}
get lateGenericInstanceField() → self::Class::T?
- return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
set lateGenericInstanceField(self::Class::T? #t4) → void
if(this.{self::Class::_#Class#lateGenericInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateGenericInstanceField");
else {
this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
@@ -86,28 +86,28 @@
static field core::int? _#Extension|lateExtensionField2 = null;
static field core::bool _#Extension|lateExtensionField2#isSet = false;
static get lateTopLevelField() → core::int?
- return self::_#lateTopLevelField#isSet ?{core::int?} self::_#lateTopLevelField : throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has not been initialized.");
+ return self::_#lateTopLevelField#isSet ?{core::int?} self::_#lateTopLevelField : throw new _in::LateError::fieldNI("lateTopLevelField");
static set lateTopLevelField(core::int? #t5) → void
if(self::_#lateTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateTopLevelField");
else {
self::_#lateTopLevelField#isSet = true;
self::_#lateTopLevelField = #t5;
}
static get Extension|lateExtensionField1() → core::int?
- return self::_#Extension|lateExtensionField1#isSet ?{core::int?} self::_#Extension|lateExtensionField1 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has not been initialized.");
+ return self::_#Extension|lateExtensionField1#isSet ?{core::int?} self::_#Extension|lateExtensionField1 : throw new _in::LateError::fieldNI("lateExtensionField1");
static set Extension|lateExtensionField1(core::int? #t6) → void
if(self::_#Extension|lateExtensionField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateExtensionField1");
else {
self::_#Extension|lateExtensionField1#isSet = true;
self::_#Extension|lateExtensionField1 = #t6;
}
static get Extension|lateExtensionField2() → core::int?
- return self::_#Extension|lateExtensionField2#isSet ?{core::int?} self::_#Extension|lateExtensionField2 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has not been initialized.");
+ return self::_#Extension|lateExtensionField2#isSet ?{core::int?} self::_#Extension|lateExtensionField2 : throw new _in::LateError::fieldNI("lateExtensionField2");
static set Extension|lateExtensionField2(core::int? #t7) → void
if(self::_#Extension|lateExtensionField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateExtensionField2");
else {
self::_#Extension|lateExtensionField2#isSet = true;
self::_#Extension|lateExtensionField2 = #t7;
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.expect
index 59a762a..d2f5afa 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.expect
@@ -16,19 +16,19 @@
: super core::Object::•()
;
static get lateStaticField1() → core::int?
- return self::Class::_#lateStaticField1#isSet ?{core::int?} self::Class::_#lateStaticField1 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has not been initialized.");
+ return self::Class::_#lateStaticField1#isSet ?{core::int?} self::Class::_#lateStaticField1 : throw new _in::LateError::fieldNI("lateStaticField1");
static set lateStaticField1(core::int? #t1) → void
if(self::Class::_#lateStaticField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateStaticField1");
else {
self::Class::_#lateStaticField1#isSet = true;
self::Class::_#lateStaticField1 = #t1;
}
static get lateStaticField2() → core::int?
- return self::Class::_#lateStaticField2#isSet ?{core::int?} self::Class::_#lateStaticField2 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has not been initialized.");
+ return self::Class::_#lateStaticField2#isSet ?{core::int?} self::Class::_#lateStaticField2 : throw new _in::LateError::fieldNI("lateStaticField2");
static set lateStaticField2(core::int? #t2) → void
if(self::Class::_#lateStaticField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateStaticField2");
else {
self::Class::_#lateStaticField2#isSet = true;
self::Class::_#lateStaticField2 = #t2;
@@ -40,19 +40,19 @@
self::throws(() → core::int => self::Class::lateStaticField2 = 43, "Write value to initialized Class.lateStaticField2");
}
get lateInstanceField() → core::int?
- return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int?} this.{self::Class::_#Class#lateInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int?} this.{self::Class::_#Class#lateInstanceField} : throw new _in::LateError::fieldNI("lateInstanceField");
set lateInstanceField(core::int? #t3) → void
if(this.{self::Class::_#Class#lateInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateInstanceField");
else {
this.{self::Class::_#Class#lateInstanceField#isSet} = true;
this.{self::Class::_#Class#lateInstanceField} = #t3;
}
get lateGenericInstanceField() → self::Class::T?
- return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
set lateGenericInstanceField(self::Class::T? #t4) → void
if(this.{self::Class::_#Class#lateGenericInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateGenericInstanceField");
else {
this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
@@ -86,28 +86,28 @@
static field core::int? _#Extension|lateExtensionField2 = null;
static field core::bool _#Extension|lateExtensionField2#isSet = false;
static get lateTopLevelField() → core::int?
- return self::_#lateTopLevelField#isSet ?{core::int?} self::_#lateTopLevelField : throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has not been initialized.");
+ return self::_#lateTopLevelField#isSet ?{core::int?} self::_#lateTopLevelField : throw new _in::LateError::fieldNI("lateTopLevelField");
static set lateTopLevelField(core::int? #t5) → void
if(self::_#lateTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateTopLevelField");
else {
self::_#lateTopLevelField#isSet = true;
self::_#lateTopLevelField = #t5;
}
static get Extension|lateExtensionField1() → core::int?
- return self::_#Extension|lateExtensionField1#isSet ?{core::int?} self::_#Extension|lateExtensionField1 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has not been initialized.");
+ return self::_#Extension|lateExtensionField1#isSet ?{core::int?} self::_#Extension|lateExtensionField1 : throw new _in::LateError::fieldNI("lateExtensionField1");
static set Extension|lateExtensionField1(core::int? #t6) → void
if(self::_#Extension|lateExtensionField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateExtensionField1");
else {
self::_#Extension|lateExtensionField1#isSet = true;
self::_#Extension|lateExtensionField1 = #t6;
}
static get Extension|lateExtensionField2() → core::int?
- return self::_#Extension|lateExtensionField2#isSet ?{core::int?} self::_#Extension|lateExtensionField2 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has not been initialized.");
+ return self::_#Extension|lateExtensionField2#isSet ?{core::int?} self::_#Extension|lateExtensionField2 : throw new _in::LateError::fieldNI("lateExtensionField2");
static set Extension|lateExtensionField2(core::int? #t7) → void
if(self::_#Extension|lateExtensionField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateExtensionField2");
else {
self::_#Extension|lateExtensionField2#isSet = true;
self::_#Extension|lateExtensionField2 = #t7;
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.transformed.expect
index 59a762a..d2f5afa 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.transformed.expect
@@ -16,19 +16,19 @@
: super core::Object::•()
;
static get lateStaticField1() → core::int?
- return self::Class::_#lateStaticField1#isSet ?{core::int?} self::Class::_#lateStaticField1 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has not been initialized.");
+ return self::Class::_#lateStaticField1#isSet ?{core::int?} self::Class::_#lateStaticField1 : throw new _in::LateError::fieldNI("lateStaticField1");
static set lateStaticField1(core::int? #t1) → void
if(self::Class::_#lateStaticField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateStaticField1");
else {
self::Class::_#lateStaticField1#isSet = true;
self::Class::_#lateStaticField1 = #t1;
}
static get lateStaticField2() → core::int?
- return self::Class::_#lateStaticField2#isSet ?{core::int?} self::Class::_#lateStaticField2 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has not been initialized.");
+ return self::Class::_#lateStaticField2#isSet ?{core::int?} self::Class::_#lateStaticField2 : throw new _in::LateError::fieldNI("lateStaticField2");
static set lateStaticField2(core::int? #t2) → void
if(self::Class::_#lateStaticField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateStaticField2");
else {
self::Class::_#lateStaticField2#isSet = true;
self::Class::_#lateStaticField2 = #t2;
@@ -40,19 +40,19 @@
self::throws(() → core::int => self::Class::lateStaticField2 = 43, "Write value to initialized Class.lateStaticField2");
}
get lateInstanceField() → core::int?
- return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int?} this.{self::Class::_#Class#lateInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int?} this.{self::Class::_#Class#lateInstanceField} : throw new _in::LateError::fieldNI("lateInstanceField");
set lateInstanceField(core::int? #t3) → void
if(this.{self::Class::_#Class#lateInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateInstanceField");
else {
this.{self::Class::_#Class#lateInstanceField#isSet} = true;
this.{self::Class::_#Class#lateInstanceField} = #t3;
}
get lateGenericInstanceField() → self::Class::T?
- return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
set lateGenericInstanceField(self::Class::T? #t4) → void
if(this.{self::Class::_#Class#lateGenericInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateGenericInstanceField");
else {
this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
@@ -86,28 +86,28 @@
static field core::int? _#Extension|lateExtensionField2 = null;
static field core::bool _#Extension|lateExtensionField2#isSet = false;
static get lateTopLevelField() → core::int?
- return self::_#lateTopLevelField#isSet ?{core::int?} self::_#lateTopLevelField : throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has not been initialized.");
+ return self::_#lateTopLevelField#isSet ?{core::int?} self::_#lateTopLevelField : throw new _in::LateError::fieldNI("lateTopLevelField");
static set lateTopLevelField(core::int? #t5) → void
if(self::_#lateTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateTopLevelField");
else {
self::_#lateTopLevelField#isSet = true;
self::_#lateTopLevelField = #t5;
}
static get Extension|lateExtensionField1() → core::int?
- return self::_#Extension|lateExtensionField1#isSet ?{core::int?} self::_#Extension|lateExtensionField1 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has not been initialized.");
+ return self::_#Extension|lateExtensionField1#isSet ?{core::int?} self::_#Extension|lateExtensionField1 : throw new _in::LateError::fieldNI("lateExtensionField1");
static set Extension|lateExtensionField1(core::int? #t6) → void
if(self::_#Extension|lateExtensionField1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateExtensionField1");
else {
self::_#Extension|lateExtensionField1#isSet = true;
self::_#Extension|lateExtensionField1 = #t6;
}
static get Extension|lateExtensionField2() → core::int?
- return self::_#Extension|lateExtensionField2#isSet ?{core::int?} self::_#Extension|lateExtensionField2 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has not been initialized.");
+ return self::_#Extension|lateExtensionField2#isSet ?{core::int?} self::_#Extension|lateExtensionField2 : throw new _in::LateError::fieldNI("lateExtensionField2");
static set Extension|lateExtensionField2(core::int? #t7) → void
if(self::_#Extension|lateExtensionField2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has already been initialized.");
+ throw new _in::LateError::fieldAI("lateExtensionField2");
else {
self::_#Extension|lateExtensionField2#isSet = true;
self::_#Extension|lateExtensionField2 = #t7;
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_local_without_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_local_without_initializer.dart.strong.expect
index b04eb47..6d26180 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_local_without_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_local_without_initializer.dart.strong.expect
@@ -7,10 +7,10 @@
final core::int? lateLocal;
core::bool #lateLocal#isSet = false;
function #lateLocal#get() → core::int?
- return #lateLocal#isSet ?{core::int?} lateLocal : throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has not been initialized.");
+ return #lateLocal#isSet ?{core::int?} lateLocal : throw new _in::LateError::localNI("lateLocal");
function #lateLocal#set(core::int? #t1) → dynamic
if(#lateLocal#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has already been initialized.");
+ throw new _in::LateError::localAI("lateLocal");
else {
#lateLocal#isSet = true;
return lateLocal = #t1;
@@ -25,10 +25,10 @@
final T? lateGenericLocal;
core::bool #lateGenericLocal#isSet = false;
function #lateGenericLocal#get() → T?
- return #lateGenericLocal#isSet ?{T?} lateGenericLocal : throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has not been initialized.");
+ return #lateGenericLocal#isSet ?{T?} lateGenericLocal : throw new _in::LateError::localNI("lateGenericLocal");
function #lateGenericLocal#set(T? #t2) → dynamic
if(#lateGenericLocal#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has already been initialized.");
+ throw new _in::LateError::localAI("lateGenericLocal");
else {
#lateGenericLocal#isSet = true;
return lateGenericLocal = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_local_without_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_local_without_initializer.dart.strong.transformed.expect
index 6fe95bd..35e6af5 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_local_without_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_local_without_initializer.dart.strong.transformed.expect
@@ -7,10 +7,10 @@
final core::int? lateLocal;
core::bool #lateLocal#isSet = false;
function #lateLocal#get() → core::int?
- return #lateLocal#isSet ?{core::int?} lateLocal : throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has not been initialized.");
+ return #lateLocal#isSet ?{core::int?} lateLocal : throw new _in::LateError::localNI("lateLocal");
function #lateLocal#set(core::int? #t1) → dynamic
if(#lateLocal#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has already been initialized.");
+ throw new _in::LateError::localAI("lateLocal");
else {
#lateLocal#isSet = true;
return lateLocal = #t1;
@@ -25,10 +25,10 @@
final T? lateGenericLocal;
core::bool #lateGenericLocal#isSet = false;
function #lateGenericLocal#get() → T?
- return #lateGenericLocal#isSet ?{T?} lateGenericLocal : throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has not been initialized.");
+ return #lateGenericLocal#isSet ?{T?} lateGenericLocal : throw new _in::LateError::localNI("lateGenericLocal");
function #lateGenericLocal#set(T? #t2) → dynamic
if(#lateGenericLocal#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has already been initialized.");
+ throw new _in::LateError::localAI("lateGenericLocal");
else {
#lateGenericLocal#isSet = true;
return lateGenericLocal = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_local_without_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_local_without_initializer.dart.weak.expect
index b04eb47..6d26180 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_local_without_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_local_without_initializer.dart.weak.expect
@@ -7,10 +7,10 @@
final core::int? lateLocal;
core::bool #lateLocal#isSet = false;
function #lateLocal#get() → core::int?
- return #lateLocal#isSet ?{core::int?} lateLocal : throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has not been initialized.");
+ return #lateLocal#isSet ?{core::int?} lateLocal : throw new _in::LateError::localNI("lateLocal");
function #lateLocal#set(core::int? #t1) → dynamic
if(#lateLocal#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has already been initialized.");
+ throw new _in::LateError::localAI("lateLocal");
else {
#lateLocal#isSet = true;
return lateLocal = #t1;
@@ -25,10 +25,10 @@
final T? lateGenericLocal;
core::bool #lateGenericLocal#isSet = false;
function #lateGenericLocal#get() → T?
- return #lateGenericLocal#isSet ?{T?} lateGenericLocal : throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has not been initialized.");
+ return #lateGenericLocal#isSet ?{T?} lateGenericLocal : throw new _in::LateError::localNI("lateGenericLocal");
function #lateGenericLocal#set(T? #t2) → dynamic
if(#lateGenericLocal#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has already been initialized.");
+ throw new _in::LateError::localAI("lateGenericLocal");
else {
#lateGenericLocal#isSet = true;
return lateGenericLocal = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_local_without_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_local_without_initializer.dart.weak.transformed.expect
index 6fe95bd..35e6af5 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_local_without_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_local_without_initializer.dart.weak.transformed.expect
@@ -7,10 +7,10 @@
final core::int? lateLocal;
core::bool #lateLocal#isSet = false;
function #lateLocal#get() → core::int?
- return #lateLocal#isSet ?{core::int?} lateLocal : throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has not been initialized.");
+ return #lateLocal#isSet ?{core::int?} lateLocal : throw new _in::LateError::localNI("lateLocal");
function #lateLocal#set(core::int? #t1) → dynamic
if(#lateLocal#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has already been initialized.");
+ throw new _in::LateError::localAI("lateLocal");
else {
#lateLocal#isSet = true;
return lateLocal = #t1;
@@ -25,10 +25,10 @@
final T? lateGenericLocal;
core::bool #lateGenericLocal#isSet = false;
function #lateGenericLocal#get() → T?
- return #lateGenericLocal#isSet ?{T?} lateGenericLocal : throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has not been initialized.");
+ return #lateGenericLocal#isSet ?{T?} lateGenericLocal : throw new _in::LateError::localNI("lateGenericLocal");
function #lateGenericLocal#set(T? #t2) → dynamic
if(#lateGenericLocal#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has already been initialized.");
+ throw new _in::LateError::localAI("lateGenericLocal");
else {
#lateGenericLocal#isSet = true;
return lateGenericLocal = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/late_future_or.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_future_or.dart.strong.expect
index 6a5587c..f28f0a7 100644
--- a/pkg/front_end/testcases/late_lowering/late_future_or.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_future_or.dart.strong.expect
@@ -20,31 +20,31 @@
: super core::Object::•()
;
get field1() → FutureOr<dynamic>
- return this.{self::C::_#C#field1#isSet} ?{FutureOr<dynamic>} this.{self::C::_#C#field1} : throw new _in::LateInitializationErrorImpl::•("Field 'field1' has not been initialized.");
+ return this.{self::C::_#C#field1#isSet} ?{FutureOr<dynamic>} this.{self::C::_#C#field1} : throw new _in::LateError::fieldNI("field1");
set field1(FutureOr<dynamic>#t1) → void {
this.{self::C::_#C#field1#isSet} = true;
this.{self::C::_#C#field1} = #t1;
}
get field2() → FutureOr<dynamic>?
- return this.{self::C::_#C#field2#isSet} ?{FutureOr<dynamic>?} this.{self::C::_#C#field2} : throw new _in::LateInitializationErrorImpl::•("Field 'field2' has not been initialized.");
+ return this.{self::C::_#C#field2#isSet} ?{FutureOr<dynamic>?} this.{self::C::_#C#field2} : throw new _in::LateError::fieldNI("field2");
set field2(FutureOr<dynamic>? #t2) → void {
this.{self::C::_#C#field2#isSet} = true;
this.{self::C::_#C#field2} = #t2;
}
get field3() → FutureOr<self::C::T%>
- return this.{self::C::_#C#field3#isSet} ?{FutureOr<self::C::T%>} let final FutureOr<self::C::T%>? #t3 = this.{self::C::_#C#field3} in #t3{FutureOr<self::C::T%>} : throw new _in::LateInitializationErrorImpl::•("Field 'field3' has not been initialized.");
+ return this.{self::C::_#C#field3#isSet} ?{FutureOr<self::C::T%>} let final FutureOr<self::C::T%>? #t3 = this.{self::C::_#C#field3} in #t3{FutureOr<self::C::T%>} : throw new _in::LateError::fieldNI("field3");
set field3(generic-covariant-impl FutureOr<self::C::T%>#t4) → void {
this.{self::C::_#C#field3#isSet} = true;
this.{self::C::_#C#field3} = #t4;
}
get field4() → FutureOr<self::C::T?>
- return this.{self::C::_#C#field4#isSet} ?{FutureOr<self::C::T?>} this.{self::C::_#C#field4} : throw new _in::LateInitializationErrorImpl::•("Field 'field4' has not been initialized.");
+ return this.{self::C::_#C#field4#isSet} ?{FutureOr<self::C::T?>} this.{self::C::_#C#field4} : throw new _in::LateError::fieldNI("field4");
set field4(generic-covariant-impl FutureOr<self::C::T?>#t5) → void {
this.{self::C::_#C#field4#isSet} = true;
this.{self::C::_#C#field4} = #t5;
}
get field5() → FutureOr<self::C::T?>?
- return this.{self::C::_#C#field5#isSet} ?{FutureOr<self::C::T?>?} this.{self::C::_#C#field5} : throw new _in::LateInitializationErrorImpl::•("Field 'field5' has not been initialized.");
+ return this.{self::C::_#C#field5#isSet} ?{FutureOr<self::C::T?>?} this.{self::C::_#C#field5} : throw new _in::LateError::fieldNI("field5");
set field5(generic-covariant-impl FutureOr<self::C::T?>? #t6) → void {
this.{self::C::_#C#field5#isSet} = true;
this.{self::C::_#C#field5} = #t6;
@@ -53,7 +53,7 @@
FutureOr<dynamic>? local1;
core::bool #local1#isSet = false;
function #local1#get() → FutureOr<dynamic>
- return #local1#isSet ?{FutureOr<dynamic>} local1 : throw new _in::LateInitializationErrorImpl::•("Local 'local1' has not been initialized.");
+ return #local1#isSet ?{FutureOr<dynamic>} local1 : throw new _in::LateError::localNI("local1");
function #local1#set(FutureOr<dynamic>#t7) → dynamic {
#local1#isSet = true;
return local1 = #t7;
@@ -61,7 +61,7 @@
FutureOr<dynamic>? local2;
core::bool #local2#isSet = false;
function #local2#get() → FutureOr<dynamic>?
- return #local2#isSet ?{FutureOr<dynamic>?} local2 : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{FutureOr<dynamic>?} local2 : throw new _in::LateError::localNI("local2");
function #local2#set(FutureOr<dynamic>? #t8) → dynamic {
#local2#isSet = true;
return local2 = #t8;
@@ -69,7 +69,7 @@
FutureOr<self::C::T%>? local3;
core::bool #local3#isSet = false;
function #local3#get() → FutureOr<self::C::T%>
- return #local3#isSet ?{FutureOr<self::C::T%>} local3{FutureOr<self::C::T%>} : throw new _in::LateInitializationErrorImpl::•("Local 'local3' has not been initialized.");
+ return #local3#isSet ?{FutureOr<self::C::T%>} local3{FutureOr<self::C::T%>} : throw new _in::LateError::localNI("local3");
function #local3#set(FutureOr<self::C::T%>#t9) → dynamic {
#local3#isSet = true;
return local3 = #t9;
@@ -77,7 +77,7 @@
FutureOr<self::C::T?>? local4;
core::bool #local4#isSet = false;
function #local4#get() → FutureOr<self::C::T?>
- return #local4#isSet ?{FutureOr<self::C::T?>} local4 : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{FutureOr<self::C::T?>} local4 : throw new _in::LateError::localNI("local4");
function #local4#set(FutureOr<self::C::T?>#t10) → dynamic {
#local4#isSet = true;
return local4 = #t10;
@@ -85,7 +85,7 @@
FutureOr<self::C::T?>? local5;
core::bool #local5#isSet = false;
function #local5#get() → FutureOr<self::C::T?>?
- return #local5#isSet ?{FutureOr<self::C::T?>?} local5 : throw new _in::LateInitializationErrorImpl::•("Local 'local5' has not been initialized.");
+ return #local5#isSet ?{FutureOr<self::C::T?>?} local5 : throw new _in::LateError::localNI("local5");
function #local5#set(FutureOr<self::C::T?>? #t11) → dynamic {
#local5#isSet = true;
return local5 = #t11;
diff --git a/pkg/front_end/testcases/late_lowering/late_future_or.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_future_or.dart.strong.transformed.expect
index 6a5587c..f28f0a7 100644
--- a/pkg/front_end/testcases/late_lowering/late_future_or.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_future_or.dart.strong.transformed.expect
@@ -20,31 +20,31 @@
: super core::Object::•()
;
get field1() → FutureOr<dynamic>
- return this.{self::C::_#C#field1#isSet} ?{FutureOr<dynamic>} this.{self::C::_#C#field1} : throw new _in::LateInitializationErrorImpl::•("Field 'field1' has not been initialized.");
+ return this.{self::C::_#C#field1#isSet} ?{FutureOr<dynamic>} this.{self::C::_#C#field1} : throw new _in::LateError::fieldNI("field1");
set field1(FutureOr<dynamic>#t1) → void {
this.{self::C::_#C#field1#isSet} = true;
this.{self::C::_#C#field1} = #t1;
}
get field2() → FutureOr<dynamic>?
- return this.{self::C::_#C#field2#isSet} ?{FutureOr<dynamic>?} this.{self::C::_#C#field2} : throw new _in::LateInitializationErrorImpl::•("Field 'field2' has not been initialized.");
+ return this.{self::C::_#C#field2#isSet} ?{FutureOr<dynamic>?} this.{self::C::_#C#field2} : throw new _in::LateError::fieldNI("field2");
set field2(FutureOr<dynamic>? #t2) → void {
this.{self::C::_#C#field2#isSet} = true;
this.{self::C::_#C#field2} = #t2;
}
get field3() → FutureOr<self::C::T%>
- return this.{self::C::_#C#field3#isSet} ?{FutureOr<self::C::T%>} let final FutureOr<self::C::T%>? #t3 = this.{self::C::_#C#field3} in #t3{FutureOr<self::C::T%>} : throw new _in::LateInitializationErrorImpl::•("Field 'field3' has not been initialized.");
+ return this.{self::C::_#C#field3#isSet} ?{FutureOr<self::C::T%>} let final FutureOr<self::C::T%>? #t3 = this.{self::C::_#C#field3} in #t3{FutureOr<self::C::T%>} : throw new _in::LateError::fieldNI("field3");
set field3(generic-covariant-impl FutureOr<self::C::T%>#t4) → void {
this.{self::C::_#C#field3#isSet} = true;
this.{self::C::_#C#field3} = #t4;
}
get field4() → FutureOr<self::C::T?>
- return this.{self::C::_#C#field4#isSet} ?{FutureOr<self::C::T?>} this.{self::C::_#C#field4} : throw new _in::LateInitializationErrorImpl::•("Field 'field4' has not been initialized.");
+ return this.{self::C::_#C#field4#isSet} ?{FutureOr<self::C::T?>} this.{self::C::_#C#field4} : throw new _in::LateError::fieldNI("field4");
set field4(generic-covariant-impl FutureOr<self::C::T?>#t5) → void {
this.{self::C::_#C#field4#isSet} = true;
this.{self::C::_#C#field4} = #t5;
}
get field5() → FutureOr<self::C::T?>?
- return this.{self::C::_#C#field5#isSet} ?{FutureOr<self::C::T?>?} this.{self::C::_#C#field5} : throw new _in::LateInitializationErrorImpl::•("Field 'field5' has not been initialized.");
+ return this.{self::C::_#C#field5#isSet} ?{FutureOr<self::C::T?>?} this.{self::C::_#C#field5} : throw new _in::LateError::fieldNI("field5");
set field5(generic-covariant-impl FutureOr<self::C::T?>? #t6) → void {
this.{self::C::_#C#field5#isSet} = true;
this.{self::C::_#C#field5} = #t6;
@@ -53,7 +53,7 @@
FutureOr<dynamic>? local1;
core::bool #local1#isSet = false;
function #local1#get() → FutureOr<dynamic>
- return #local1#isSet ?{FutureOr<dynamic>} local1 : throw new _in::LateInitializationErrorImpl::•("Local 'local1' has not been initialized.");
+ return #local1#isSet ?{FutureOr<dynamic>} local1 : throw new _in::LateError::localNI("local1");
function #local1#set(FutureOr<dynamic>#t7) → dynamic {
#local1#isSet = true;
return local1 = #t7;
@@ -61,7 +61,7 @@
FutureOr<dynamic>? local2;
core::bool #local2#isSet = false;
function #local2#get() → FutureOr<dynamic>?
- return #local2#isSet ?{FutureOr<dynamic>?} local2 : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{FutureOr<dynamic>?} local2 : throw new _in::LateError::localNI("local2");
function #local2#set(FutureOr<dynamic>? #t8) → dynamic {
#local2#isSet = true;
return local2 = #t8;
@@ -69,7 +69,7 @@
FutureOr<self::C::T%>? local3;
core::bool #local3#isSet = false;
function #local3#get() → FutureOr<self::C::T%>
- return #local3#isSet ?{FutureOr<self::C::T%>} local3{FutureOr<self::C::T%>} : throw new _in::LateInitializationErrorImpl::•("Local 'local3' has not been initialized.");
+ return #local3#isSet ?{FutureOr<self::C::T%>} local3{FutureOr<self::C::T%>} : throw new _in::LateError::localNI("local3");
function #local3#set(FutureOr<self::C::T%>#t9) → dynamic {
#local3#isSet = true;
return local3 = #t9;
@@ -77,7 +77,7 @@
FutureOr<self::C::T?>? local4;
core::bool #local4#isSet = false;
function #local4#get() → FutureOr<self::C::T?>
- return #local4#isSet ?{FutureOr<self::C::T?>} local4 : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{FutureOr<self::C::T?>} local4 : throw new _in::LateError::localNI("local4");
function #local4#set(FutureOr<self::C::T?>#t10) → dynamic {
#local4#isSet = true;
return local4 = #t10;
@@ -85,7 +85,7 @@
FutureOr<self::C::T?>? local5;
core::bool #local5#isSet = false;
function #local5#get() → FutureOr<self::C::T?>?
- return #local5#isSet ?{FutureOr<self::C::T?>?} local5 : throw new _in::LateInitializationErrorImpl::•("Local 'local5' has not been initialized.");
+ return #local5#isSet ?{FutureOr<self::C::T?>?} local5 : throw new _in::LateError::localNI("local5");
function #local5#set(FutureOr<self::C::T?>? #t11) → dynamic {
#local5#isSet = true;
return local5 = #t11;
diff --git a/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.expect
index ad35343..78cd9c9 100644
--- a/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.expect
@@ -20,31 +20,31 @@
: super core::Object::•()
;
get field1() → FutureOr<dynamic>
- return this.{self::C::_#C#field1#isSet} ?{FutureOr<dynamic>} this.{self::C::_#C#field1} : throw new _in::LateInitializationErrorImpl::•("Field 'field1' has not been initialized.");
+ return this.{self::C::_#C#field1#isSet} ?{FutureOr<dynamic>} this.{self::C::_#C#field1} : throw new _in::LateError::fieldNI("field1");
set field1(FutureOr<dynamic>#t1) → void {
this.{self::C::_#C#field1#isSet} = true;
this.{self::C::_#C#field1} = #t1;
}
get field2() → FutureOr<dynamic>?
- return this.{self::C::_#C#field2#isSet} ?{FutureOr<dynamic>?} this.{self::C::_#C#field2} : throw new _in::LateInitializationErrorImpl::•("Field 'field2' has not been initialized.");
+ return this.{self::C::_#C#field2#isSet} ?{FutureOr<dynamic>?} this.{self::C::_#C#field2} : throw new _in::LateError::fieldNI("field2");
set field2(FutureOr<dynamic>? #t2) → void {
this.{self::C::_#C#field2#isSet} = true;
this.{self::C::_#C#field2} = #t2;
}
get field3() → FutureOr<self::C::T%>
- return this.{self::C::_#C#field3#isSet} ?{FutureOr<self::C::T%>} let final FutureOr<self::C::T%>? #t3 = this.{self::C::_#C#field3} in #t3{FutureOr<self::C::T%>} : throw new _in::LateInitializationErrorImpl::•("Field 'field3' has not been initialized.");
+ return this.{self::C::_#C#field3#isSet} ?{FutureOr<self::C::T%>} let final FutureOr<self::C::T%>? #t3 = this.{self::C::_#C#field3} in #t3{FutureOr<self::C::T%>} : throw new _in::LateError::fieldNI("field3");
set field3(generic-covariant-impl FutureOr<self::C::T%>#t4) → void {
this.{self::C::_#C#field3#isSet} = true;
this.{self::C::_#C#field3} = #t4;
}
get field4() → FutureOr<self::C::T?>
- return this.{self::C::_#C#field4#isSet} ?{FutureOr<self::C::T?>} this.{self::C::_#C#field4} : throw new _in::LateInitializationErrorImpl::•("Field 'field4' has not been initialized.");
+ return this.{self::C::_#C#field4#isSet} ?{FutureOr<self::C::T?>} this.{self::C::_#C#field4} : throw new _in::LateError::fieldNI("field4");
set field4(generic-covariant-impl FutureOr<self::C::T?>#t5) → void {
this.{self::C::_#C#field4#isSet} = true;
this.{self::C::_#C#field4} = #t5;
}
get field5() → FutureOr<self::C::T?>?
- return this.{self::C::_#C#field5#isSet} ?{FutureOr<self::C::T?>?} this.{self::C::_#C#field5} : throw new _in::LateInitializationErrorImpl::•("Field 'field5' has not been initialized.");
+ return this.{self::C::_#C#field5#isSet} ?{FutureOr<self::C::T?>?} this.{self::C::_#C#field5} : throw new _in::LateError::fieldNI("field5");
set field5(generic-covariant-impl FutureOr<self::C::T?>? #t6) → void {
this.{self::C::_#C#field5#isSet} = true;
this.{self::C::_#C#field5} = #t6;
@@ -53,7 +53,7 @@
FutureOr<dynamic>? local1;
core::bool #local1#isSet = false;
function #local1#get() → FutureOr<dynamic>
- return #local1#isSet ?{FutureOr<dynamic>} local1 : throw new _in::LateInitializationErrorImpl::•("Local 'local1' has not been initialized.");
+ return #local1#isSet ?{FutureOr<dynamic>} local1 : throw new _in::LateError::localNI("local1");
function #local1#set(FutureOr<dynamic>#t7) → dynamic {
#local1#isSet = true;
return local1 = #t7;
@@ -61,7 +61,7 @@
FutureOr<dynamic>? local2;
core::bool #local2#isSet = false;
function #local2#get() → FutureOr<dynamic>?
- return #local2#isSet ?{FutureOr<dynamic>?} local2 : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{FutureOr<dynamic>?} local2 : throw new _in::LateError::localNI("local2");
function #local2#set(FutureOr<dynamic>? #t8) → dynamic {
#local2#isSet = true;
return local2 = #t8;
@@ -69,7 +69,7 @@
FutureOr<self::C::T%>? local3;
core::bool #local3#isSet = false;
function #local3#get() → FutureOr<self::C::T%>
- return #local3#isSet ?{FutureOr<self::C::T%>} local3{FutureOr<self::C::T%>} : throw new _in::LateInitializationErrorImpl::•("Local 'local3' has not been initialized.");
+ return #local3#isSet ?{FutureOr<self::C::T%>} local3{FutureOr<self::C::T%>} : throw new _in::LateError::localNI("local3");
function #local3#set(FutureOr<self::C::T%>#t9) → dynamic {
#local3#isSet = true;
return local3 = #t9;
@@ -77,7 +77,7 @@
FutureOr<self::C::T?>? local4;
core::bool #local4#isSet = false;
function #local4#get() → FutureOr<self::C::T?>
- return #local4#isSet ?{FutureOr<self::C::T?>} local4 : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{FutureOr<self::C::T?>} local4 : throw new _in::LateError::localNI("local4");
function #local4#set(FutureOr<self::C::T?>#t10) → dynamic {
#local4#isSet = true;
return local4 = #t10;
@@ -85,7 +85,7 @@
FutureOr<self::C::T?>? local5;
core::bool #local5#isSet = false;
function #local5#get() → FutureOr<self::C::T?>?
- return #local5#isSet ?{FutureOr<self::C::T?>?} local5 : throw new _in::LateInitializationErrorImpl::•("Local 'local5' has not been initialized.");
+ return #local5#isSet ?{FutureOr<self::C::T?>?} local5 : throw new _in::LateError::localNI("local5");
function #local5#set(FutureOr<self::C::T?>? #t11) → dynamic {
#local5#isSet = true;
return local5 = #t11;
diff --git a/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.transformed.expect
index ad35343..78cd9c9 100644
--- a/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.transformed.expect
@@ -20,31 +20,31 @@
: super core::Object::•()
;
get field1() → FutureOr<dynamic>
- return this.{self::C::_#C#field1#isSet} ?{FutureOr<dynamic>} this.{self::C::_#C#field1} : throw new _in::LateInitializationErrorImpl::•("Field 'field1' has not been initialized.");
+ return this.{self::C::_#C#field1#isSet} ?{FutureOr<dynamic>} this.{self::C::_#C#field1} : throw new _in::LateError::fieldNI("field1");
set field1(FutureOr<dynamic>#t1) → void {
this.{self::C::_#C#field1#isSet} = true;
this.{self::C::_#C#field1} = #t1;
}
get field2() → FutureOr<dynamic>?
- return this.{self::C::_#C#field2#isSet} ?{FutureOr<dynamic>?} this.{self::C::_#C#field2} : throw new _in::LateInitializationErrorImpl::•("Field 'field2' has not been initialized.");
+ return this.{self::C::_#C#field2#isSet} ?{FutureOr<dynamic>?} this.{self::C::_#C#field2} : throw new _in::LateError::fieldNI("field2");
set field2(FutureOr<dynamic>? #t2) → void {
this.{self::C::_#C#field2#isSet} = true;
this.{self::C::_#C#field2} = #t2;
}
get field3() → FutureOr<self::C::T%>
- return this.{self::C::_#C#field3#isSet} ?{FutureOr<self::C::T%>} let final FutureOr<self::C::T%>? #t3 = this.{self::C::_#C#field3} in #t3{FutureOr<self::C::T%>} : throw new _in::LateInitializationErrorImpl::•("Field 'field3' has not been initialized.");
+ return this.{self::C::_#C#field3#isSet} ?{FutureOr<self::C::T%>} let final FutureOr<self::C::T%>? #t3 = this.{self::C::_#C#field3} in #t3{FutureOr<self::C::T%>} : throw new _in::LateError::fieldNI("field3");
set field3(generic-covariant-impl FutureOr<self::C::T%>#t4) → void {
this.{self::C::_#C#field3#isSet} = true;
this.{self::C::_#C#field3} = #t4;
}
get field4() → FutureOr<self::C::T?>
- return this.{self::C::_#C#field4#isSet} ?{FutureOr<self::C::T?>} this.{self::C::_#C#field4} : throw new _in::LateInitializationErrorImpl::•("Field 'field4' has not been initialized.");
+ return this.{self::C::_#C#field4#isSet} ?{FutureOr<self::C::T?>} this.{self::C::_#C#field4} : throw new _in::LateError::fieldNI("field4");
set field4(generic-covariant-impl FutureOr<self::C::T?>#t5) → void {
this.{self::C::_#C#field4#isSet} = true;
this.{self::C::_#C#field4} = #t5;
}
get field5() → FutureOr<self::C::T?>?
- return this.{self::C::_#C#field5#isSet} ?{FutureOr<self::C::T?>?} this.{self::C::_#C#field5} : throw new _in::LateInitializationErrorImpl::•("Field 'field5' has not been initialized.");
+ return this.{self::C::_#C#field5#isSet} ?{FutureOr<self::C::T?>?} this.{self::C::_#C#field5} : throw new _in::LateError::fieldNI("field5");
set field5(generic-covariant-impl FutureOr<self::C::T?>? #t6) → void {
this.{self::C::_#C#field5#isSet} = true;
this.{self::C::_#C#field5} = #t6;
@@ -53,7 +53,7 @@
FutureOr<dynamic>? local1;
core::bool #local1#isSet = false;
function #local1#get() → FutureOr<dynamic>
- return #local1#isSet ?{FutureOr<dynamic>} local1 : throw new _in::LateInitializationErrorImpl::•("Local 'local1' has not been initialized.");
+ return #local1#isSet ?{FutureOr<dynamic>} local1 : throw new _in::LateError::localNI("local1");
function #local1#set(FutureOr<dynamic>#t7) → dynamic {
#local1#isSet = true;
return local1 = #t7;
@@ -61,7 +61,7 @@
FutureOr<dynamic>? local2;
core::bool #local2#isSet = false;
function #local2#get() → FutureOr<dynamic>?
- return #local2#isSet ?{FutureOr<dynamic>?} local2 : throw new _in::LateInitializationErrorImpl::•("Local 'local2' has not been initialized.");
+ return #local2#isSet ?{FutureOr<dynamic>?} local2 : throw new _in::LateError::localNI("local2");
function #local2#set(FutureOr<dynamic>? #t8) → dynamic {
#local2#isSet = true;
return local2 = #t8;
@@ -69,7 +69,7 @@
FutureOr<self::C::T%>? local3;
core::bool #local3#isSet = false;
function #local3#get() → FutureOr<self::C::T%>
- return #local3#isSet ?{FutureOr<self::C::T%>} local3{FutureOr<self::C::T%>} : throw new _in::LateInitializationErrorImpl::•("Local 'local3' has not been initialized.");
+ return #local3#isSet ?{FutureOr<self::C::T%>} local3{FutureOr<self::C::T%>} : throw new _in::LateError::localNI("local3");
function #local3#set(FutureOr<self::C::T%>#t9) → dynamic {
#local3#isSet = true;
return local3 = #t9;
@@ -77,7 +77,7 @@
FutureOr<self::C::T?>? local4;
core::bool #local4#isSet = false;
function #local4#get() → FutureOr<self::C::T?>
- return #local4#isSet ?{FutureOr<self::C::T?>} local4 : throw new _in::LateInitializationErrorImpl::•("Local 'local4' has not been initialized.");
+ return #local4#isSet ?{FutureOr<self::C::T?>} local4 : throw new _in::LateError::localNI("local4");
function #local4#set(FutureOr<self::C::T?>#t10) → dynamic {
#local4#isSet = true;
return local4 = #t10;
@@ -85,7 +85,7 @@
FutureOr<self::C::T?>? local5;
core::bool #local5#isSet = false;
function #local5#get() → FutureOr<self::C::T?>?
- return #local5#isSet ?{FutureOr<self::C::T?>?} local5 : throw new _in::LateInitializationErrorImpl::•("Local 'local5' has not been initialized.");
+ return #local5#isSet ?{FutureOr<self::C::T?>?} local5 : throw new _in::LateError::localNI("local5");
function #local5#set(FutureOr<self::C::T?>? #t11) → dynamic {
#local5#isSet = true;
return local5 = #t11;
diff --git a/pkg/front_end/testcases/late_lowering/late_local_without_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_local_without_initializer.dart.strong.expect
index eaf2671..36a822e 100644
--- a/pkg/front_end/testcases/late_lowering/late_local_without_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_local_without_initializer.dart.strong.expect
@@ -6,7 +6,7 @@
static method main() → dynamic {
core::int? lateLocal;
function #lateLocal#get() → core::int
- return let final core::int? #t1 = lateLocal in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = lateLocal in #t1.==(null) ?{core::int} throw new _in::LateError::localNI("lateLocal") : #t1{core::int};
function #lateLocal#set(core::int #t2) → dynamic
return lateLocal = #t2;
self::throws(() → core::int => #lateLocal#get.call(), "Read value from uninitialized lateLocal");
@@ -16,7 +16,7 @@
T? lateGenericLocal;
core::bool #lateGenericLocal#isSet = false;
function #lateGenericLocal#get() → T%
- return #lateGenericLocal#isSet ?{T%} lateGenericLocal{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has not been initialized.");
+ return #lateGenericLocal#isSet ?{T%} lateGenericLocal{T%} : throw new _in::LateError::localNI("lateGenericLocal");
function #lateGenericLocal#set(T% #t3) → dynamic {
#lateGenericLocal#isSet = true;
return lateGenericLocal = #t3;
diff --git a/pkg/front_end/testcases/late_lowering/late_local_without_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_local_without_initializer.dart.strong.transformed.expect
index eaf2671..36a822e 100644
--- a/pkg/front_end/testcases/late_lowering/late_local_without_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_local_without_initializer.dart.strong.transformed.expect
@@ -6,7 +6,7 @@
static method main() → dynamic {
core::int? lateLocal;
function #lateLocal#get() → core::int
- return let final core::int? #t1 = lateLocal in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = lateLocal in #t1.==(null) ?{core::int} throw new _in::LateError::localNI("lateLocal") : #t1{core::int};
function #lateLocal#set(core::int #t2) → dynamic
return lateLocal = #t2;
self::throws(() → core::int => #lateLocal#get.call(), "Read value from uninitialized lateLocal");
@@ -16,7 +16,7 @@
T? lateGenericLocal;
core::bool #lateGenericLocal#isSet = false;
function #lateGenericLocal#get() → T%
- return #lateGenericLocal#isSet ?{T%} lateGenericLocal{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has not been initialized.");
+ return #lateGenericLocal#isSet ?{T%} lateGenericLocal{T%} : throw new _in::LateError::localNI("lateGenericLocal");
function #lateGenericLocal#set(T% #t3) → dynamic {
#lateGenericLocal#isSet = true;
return lateGenericLocal = #t3;
diff --git a/pkg/front_end/testcases/late_lowering/late_local_without_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_local_without_initializer.dart.weak.expect
index 9c46d6e..fc0779c 100644
--- a/pkg/front_end/testcases/late_lowering/late_local_without_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_local_without_initializer.dart.weak.expect
@@ -7,7 +7,7 @@
core::int? lateLocal;
core::bool #lateLocal#isSet = false;
function #lateLocal#get() → core::int
- return #lateLocal#isSet ?{core::int} lateLocal{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has not been initialized.");
+ return #lateLocal#isSet ?{core::int} lateLocal{core::int} : throw new _in::LateError::localNI("lateLocal");
function #lateLocal#set(core::int #t1) → dynamic {
#lateLocal#isSet = true;
return lateLocal = #t1;
@@ -19,7 +19,7 @@
T? lateGenericLocal;
core::bool #lateGenericLocal#isSet = false;
function #lateGenericLocal#get() → T%
- return #lateGenericLocal#isSet ?{T%} lateGenericLocal{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has not been initialized.");
+ return #lateGenericLocal#isSet ?{T%} lateGenericLocal{T%} : throw new _in::LateError::localNI("lateGenericLocal");
function #lateGenericLocal#set(T% #t2) → dynamic {
#lateGenericLocal#isSet = true;
return lateGenericLocal = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/late_local_without_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_local_without_initializer.dart.weak.transformed.expect
index 9c46d6e..fc0779c 100644
--- a/pkg/front_end/testcases/late_lowering/late_local_without_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_local_without_initializer.dart.weak.transformed.expect
@@ -7,7 +7,7 @@
core::int? lateLocal;
core::bool #lateLocal#isSet = false;
function #lateLocal#get() → core::int
- return #lateLocal#isSet ?{core::int} lateLocal{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has not been initialized.");
+ return #lateLocal#isSet ?{core::int} lateLocal{core::int} : throw new _in::LateError::localNI("lateLocal");
function #lateLocal#set(core::int #t1) → dynamic {
#lateLocal#isSet = true;
return lateLocal = #t1;
@@ -19,7 +19,7 @@
T? lateGenericLocal;
core::bool #lateGenericLocal#isSet = false;
function #lateGenericLocal#get() → T%
- return #lateGenericLocal#isSet ?{T%} lateGenericLocal{T%} : throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has not been initialized.");
+ return #lateGenericLocal#isSet ?{T%} lateGenericLocal{T%} : throw new _in::LateError::localNI("lateGenericLocal");
function #lateGenericLocal#set(T% #t2) → dynamic {
#lateGenericLocal#isSet = true;
return lateGenericLocal = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.strong.expect
index fe6ab5e..5faf637 100644
--- a/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.strong.expect
@@ -16,13 +16,13 @@
: super core::Object::•()
;
static get lateStaticField1() → core::int?
- return self::Class::_#lateStaticField1#isSet ?{core::int?} self::Class::_#lateStaticField1 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has not been initialized.");
+ return self::Class::_#lateStaticField1#isSet ?{core::int?} self::Class::_#lateStaticField1 : throw new _in::LateError::fieldNI("lateStaticField1");
static set lateStaticField1(core::int? #t1) → void {
self::Class::_#lateStaticField1#isSet = true;
self::Class::_#lateStaticField1 = #t1;
}
static get lateStaticField2() → core::int?
- return self::Class::_#lateStaticField2#isSet ?{core::int?} self::Class::_#lateStaticField2 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has not been initialized.");
+ return self::Class::_#lateStaticField2#isSet ?{core::int?} self::Class::_#lateStaticField2 : throw new _in::LateError::fieldNI("lateStaticField2");
static set lateStaticField2(core::int? #t2) → void {
self::Class::_#lateStaticField2#isSet = true;
self::Class::_#lateStaticField2 = #t2;
@@ -33,13 +33,13 @@
self::expect(42, self::Class::lateStaticField2);
}
get lateInstanceField() → core::int?
- return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int?} this.{self::Class::_#Class#lateInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int?} this.{self::Class::_#Class#lateInstanceField} : throw new _in::LateError::fieldNI("lateInstanceField");
set lateInstanceField(core::int? #t3) → void {
this.{self::Class::_#Class#lateInstanceField#isSet} = true;
this.{self::Class::_#Class#lateInstanceField} = #t3;
}
get lateGenericInstanceField() → self::Class::T?
- return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
set lateGenericInstanceField(generic-covariant-impl self::Class::T? #t4) → void {
this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
@@ -71,19 +71,19 @@
static field core::int? _#Extension|lateExtensionField2 = null;
static field core::bool _#Extension|lateExtensionField2#isSet = false;
static get lateTopLevelField() → core::int?
- return self::_#lateTopLevelField#isSet ?{core::int?} self::_#lateTopLevelField : throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has not been initialized.");
+ return self::_#lateTopLevelField#isSet ?{core::int?} self::_#lateTopLevelField : throw new _in::LateError::fieldNI("lateTopLevelField");
static set lateTopLevelField(core::int? #t5) → void {
self::_#lateTopLevelField#isSet = true;
self::_#lateTopLevelField = #t5;
}
static get Extension|lateExtensionField1() → core::int?
- return self::_#Extension|lateExtensionField1#isSet ?{core::int?} self::_#Extension|lateExtensionField1 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has not been initialized.");
+ return self::_#Extension|lateExtensionField1#isSet ?{core::int?} self::_#Extension|lateExtensionField1 : throw new _in::LateError::fieldNI("lateExtensionField1");
static set Extension|lateExtensionField1(core::int? #t6) → void {
self::_#Extension|lateExtensionField1#isSet = true;
self::_#Extension|lateExtensionField1 = #t6;
}
static get Extension|lateExtensionField2() → core::int?
- return self::_#Extension|lateExtensionField2#isSet ?{core::int?} self::_#Extension|lateExtensionField2 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has not been initialized.");
+ return self::_#Extension|lateExtensionField2#isSet ?{core::int?} self::_#Extension|lateExtensionField2 : throw new _in::LateError::fieldNI("lateExtensionField2");
static set Extension|lateExtensionField2(core::int? #t7) → void {
self::_#Extension|lateExtensionField2#isSet = true;
self::_#Extension|lateExtensionField2 = #t7;
diff --git a/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.strong.transformed.expect
index fe6ab5e..5faf637 100644
--- a/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.strong.transformed.expect
@@ -16,13 +16,13 @@
: super core::Object::•()
;
static get lateStaticField1() → core::int?
- return self::Class::_#lateStaticField1#isSet ?{core::int?} self::Class::_#lateStaticField1 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has not been initialized.");
+ return self::Class::_#lateStaticField1#isSet ?{core::int?} self::Class::_#lateStaticField1 : throw new _in::LateError::fieldNI("lateStaticField1");
static set lateStaticField1(core::int? #t1) → void {
self::Class::_#lateStaticField1#isSet = true;
self::Class::_#lateStaticField1 = #t1;
}
static get lateStaticField2() → core::int?
- return self::Class::_#lateStaticField2#isSet ?{core::int?} self::Class::_#lateStaticField2 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has not been initialized.");
+ return self::Class::_#lateStaticField2#isSet ?{core::int?} self::Class::_#lateStaticField2 : throw new _in::LateError::fieldNI("lateStaticField2");
static set lateStaticField2(core::int? #t2) → void {
self::Class::_#lateStaticField2#isSet = true;
self::Class::_#lateStaticField2 = #t2;
@@ -33,13 +33,13 @@
self::expect(42, self::Class::lateStaticField2);
}
get lateInstanceField() → core::int?
- return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int?} this.{self::Class::_#Class#lateInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int?} this.{self::Class::_#Class#lateInstanceField} : throw new _in::LateError::fieldNI("lateInstanceField");
set lateInstanceField(core::int? #t3) → void {
this.{self::Class::_#Class#lateInstanceField#isSet} = true;
this.{self::Class::_#Class#lateInstanceField} = #t3;
}
get lateGenericInstanceField() → self::Class::T?
- return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
set lateGenericInstanceField(generic-covariant-impl self::Class::T? #t4) → void {
this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
@@ -71,19 +71,19 @@
static field core::int? _#Extension|lateExtensionField2 = null;
static field core::bool _#Extension|lateExtensionField2#isSet = false;
static get lateTopLevelField() → core::int?
- return self::_#lateTopLevelField#isSet ?{core::int?} self::_#lateTopLevelField : throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has not been initialized.");
+ return self::_#lateTopLevelField#isSet ?{core::int?} self::_#lateTopLevelField : throw new _in::LateError::fieldNI("lateTopLevelField");
static set lateTopLevelField(core::int? #t5) → void {
self::_#lateTopLevelField#isSet = true;
self::_#lateTopLevelField = #t5;
}
static get Extension|lateExtensionField1() → core::int?
- return self::_#Extension|lateExtensionField1#isSet ?{core::int?} self::_#Extension|lateExtensionField1 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has not been initialized.");
+ return self::_#Extension|lateExtensionField1#isSet ?{core::int?} self::_#Extension|lateExtensionField1 : throw new _in::LateError::fieldNI("lateExtensionField1");
static set Extension|lateExtensionField1(core::int? #t6) → void {
self::_#Extension|lateExtensionField1#isSet = true;
self::_#Extension|lateExtensionField1 = #t6;
}
static get Extension|lateExtensionField2() → core::int?
- return self::_#Extension|lateExtensionField2#isSet ?{core::int?} self::_#Extension|lateExtensionField2 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has not been initialized.");
+ return self::_#Extension|lateExtensionField2#isSet ?{core::int?} self::_#Extension|lateExtensionField2 : throw new _in::LateError::fieldNI("lateExtensionField2");
static set Extension|lateExtensionField2(core::int? #t7) → void {
self::_#Extension|lateExtensionField2#isSet = true;
self::_#Extension|lateExtensionField2 = #t7;
diff --git a/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.expect
index fe6ab5e..5faf637 100644
--- a/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.expect
@@ -16,13 +16,13 @@
: super core::Object::•()
;
static get lateStaticField1() → core::int?
- return self::Class::_#lateStaticField1#isSet ?{core::int?} self::Class::_#lateStaticField1 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has not been initialized.");
+ return self::Class::_#lateStaticField1#isSet ?{core::int?} self::Class::_#lateStaticField1 : throw new _in::LateError::fieldNI("lateStaticField1");
static set lateStaticField1(core::int? #t1) → void {
self::Class::_#lateStaticField1#isSet = true;
self::Class::_#lateStaticField1 = #t1;
}
static get lateStaticField2() → core::int?
- return self::Class::_#lateStaticField2#isSet ?{core::int?} self::Class::_#lateStaticField2 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has not been initialized.");
+ return self::Class::_#lateStaticField2#isSet ?{core::int?} self::Class::_#lateStaticField2 : throw new _in::LateError::fieldNI("lateStaticField2");
static set lateStaticField2(core::int? #t2) → void {
self::Class::_#lateStaticField2#isSet = true;
self::Class::_#lateStaticField2 = #t2;
@@ -33,13 +33,13 @@
self::expect(42, self::Class::lateStaticField2);
}
get lateInstanceField() → core::int?
- return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int?} this.{self::Class::_#Class#lateInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int?} this.{self::Class::_#Class#lateInstanceField} : throw new _in::LateError::fieldNI("lateInstanceField");
set lateInstanceField(core::int? #t3) → void {
this.{self::Class::_#Class#lateInstanceField#isSet} = true;
this.{self::Class::_#Class#lateInstanceField} = #t3;
}
get lateGenericInstanceField() → self::Class::T?
- return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
set lateGenericInstanceField(generic-covariant-impl self::Class::T? #t4) → void {
this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
@@ -71,19 +71,19 @@
static field core::int? _#Extension|lateExtensionField2 = null;
static field core::bool _#Extension|lateExtensionField2#isSet = false;
static get lateTopLevelField() → core::int?
- return self::_#lateTopLevelField#isSet ?{core::int?} self::_#lateTopLevelField : throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has not been initialized.");
+ return self::_#lateTopLevelField#isSet ?{core::int?} self::_#lateTopLevelField : throw new _in::LateError::fieldNI("lateTopLevelField");
static set lateTopLevelField(core::int? #t5) → void {
self::_#lateTopLevelField#isSet = true;
self::_#lateTopLevelField = #t5;
}
static get Extension|lateExtensionField1() → core::int?
- return self::_#Extension|lateExtensionField1#isSet ?{core::int?} self::_#Extension|lateExtensionField1 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has not been initialized.");
+ return self::_#Extension|lateExtensionField1#isSet ?{core::int?} self::_#Extension|lateExtensionField1 : throw new _in::LateError::fieldNI("lateExtensionField1");
static set Extension|lateExtensionField1(core::int? #t6) → void {
self::_#Extension|lateExtensionField1#isSet = true;
self::_#Extension|lateExtensionField1 = #t6;
}
static get Extension|lateExtensionField2() → core::int?
- return self::_#Extension|lateExtensionField2#isSet ?{core::int?} self::_#Extension|lateExtensionField2 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has not been initialized.");
+ return self::_#Extension|lateExtensionField2#isSet ?{core::int?} self::_#Extension|lateExtensionField2 : throw new _in::LateError::fieldNI("lateExtensionField2");
static set Extension|lateExtensionField2(core::int? #t7) → void {
self::_#Extension|lateExtensionField2#isSet = true;
self::_#Extension|lateExtensionField2 = #t7;
diff --git a/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.transformed.expect
index fe6ab5e..5faf637 100644
--- a/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.transformed.expect
@@ -16,13 +16,13 @@
: super core::Object::•()
;
static get lateStaticField1() → core::int?
- return self::Class::_#lateStaticField1#isSet ?{core::int?} self::Class::_#lateStaticField1 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField1' has not been initialized.");
+ return self::Class::_#lateStaticField1#isSet ?{core::int?} self::Class::_#lateStaticField1 : throw new _in::LateError::fieldNI("lateStaticField1");
static set lateStaticField1(core::int? #t1) → void {
self::Class::_#lateStaticField1#isSet = true;
self::Class::_#lateStaticField1 = #t1;
}
static get lateStaticField2() → core::int?
- return self::Class::_#lateStaticField2#isSet ?{core::int?} self::Class::_#lateStaticField2 : throw new _in::LateInitializationErrorImpl::•("Field 'lateStaticField2' has not been initialized.");
+ return self::Class::_#lateStaticField2#isSet ?{core::int?} self::Class::_#lateStaticField2 : throw new _in::LateError::fieldNI("lateStaticField2");
static set lateStaticField2(core::int? #t2) → void {
self::Class::_#lateStaticField2#isSet = true;
self::Class::_#lateStaticField2 = #t2;
@@ -33,13 +33,13 @@
self::expect(42, self::Class::lateStaticField2);
}
get lateInstanceField() → core::int?
- return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int?} this.{self::Class::_#Class#lateInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'lateInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateInstanceField#isSet} ?{core::int?} this.{self::Class::_#Class#lateInstanceField} : throw new _in::LateError::fieldNI("lateInstanceField");
set lateInstanceField(core::int? #t3) → void {
this.{self::Class::_#Class#lateInstanceField#isSet} = true;
this.{self::Class::_#Class#lateInstanceField} = #t3;
}
get lateGenericInstanceField() → self::Class::T?
- return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'lateGenericInstanceField' has not been initialized.");
+ return this.{self::Class::_#Class#lateGenericInstanceField#isSet} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
set lateGenericInstanceField(generic-covariant-impl self::Class::T? #t4) → void {
this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
@@ -71,19 +71,19 @@
static field core::int? _#Extension|lateExtensionField2 = null;
static field core::bool _#Extension|lateExtensionField2#isSet = false;
static get lateTopLevelField() → core::int?
- return self::_#lateTopLevelField#isSet ?{core::int?} self::_#lateTopLevelField : throw new _in::LateInitializationErrorImpl::•("Field 'lateTopLevelField' has not been initialized.");
+ return self::_#lateTopLevelField#isSet ?{core::int?} self::_#lateTopLevelField : throw new _in::LateError::fieldNI("lateTopLevelField");
static set lateTopLevelField(core::int? #t5) → void {
self::_#lateTopLevelField#isSet = true;
self::_#lateTopLevelField = #t5;
}
static get Extension|lateExtensionField1() → core::int?
- return self::_#Extension|lateExtensionField1#isSet ?{core::int?} self::_#Extension|lateExtensionField1 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField1' has not been initialized.");
+ return self::_#Extension|lateExtensionField1#isSet ?{core::int?} self::_#Extension|lateExtensionField1 : throw new _in::LateError::fieldNI("lateExtensionField1");
static set Extension|lateExtensionField1(core::int? #t6) → void {
self::_#Extension|lateExtensionField1#isSet = true;
self::_#Extension|lateExtensionField1 = #t6;
}
static get Extension|lateExtensionField2() → core::int?
- return self::_#Extension|lateExtensionField2#isSet ?{core::int?} self::_#Extension|lateExtensionField2 : throw new _in::LateInitializationErrorImpl::•("Field 'lateExtensionField2' has not been initialized.");
+ return self::_#Extension|lateExtensionField2#isSet ?{core::int?} self::_#Extension|lateExtensionField2 : throw new _in::LateError::fieldNI("lateExtensionField2");
static set Extension|lateExtensionField2(core::int? #t7) → void {
self::_#Extension|lateExtensionField2#isSet = true;
self::_#Extension|lateExtensionField2 = #t7;
diff --git a/pkg/front_end/testcases/late_lowering/late_nullable_local_without_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_nullable_local_without_initializer.dart.strong.expect
index b313971..91dd9f8 100644
--- a/pkg/front_end/testcases/late_lowering/late_nullable_local_without_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_nullable_local_without_initializer.dart.strong.expect
@@ -7,7 +7,7 @@
core::int? lateLocal;
core::bool #lateLocal#isSet = false;
function #lateLocal#get() → core::int?
- return #lateLocal#isSet ?{core::int?} lateLocal : throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has not been initialized.");
+ return #lateLocal#isSet ?{core::int?} lateLocal : throw new _in::LateError::localNI("lateLocal");
function #lateLocal#set(core::int? #t1) → dynamic {
#lateLocal#isSet = true;
return lateLocal = #t1;
@@ -19,7 +19,7 @@
T? lateGenericLocal;
core::bool #lateGenericLocal#isSet = false;
function #lateGenericLocal#get() → T?
- return #lateGenericLocal#isSet ?{T?} lateGenericLocal : throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has not been initialized.");
+ return #lateGenericLocal#isSet ?{T?} lateGenericLocal : throw new _in::LateError::localNI("lateGenericLocal");
function #lateGenericLocal#set(T? #t2) → dynamic {
#lateGenericLocal#isSet = true;
return lateGenericLocal = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/late_nullable_local_without_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_nullable_local_without_initializer.dart.strong.transformed.expect
index b313971..91dd9f8 100644
--- a/pkg/front_end/testcases/late_lowering/late_nullable_local_without_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_nullable_local_without_initializer.dart.strong.transformed.expect
@@ -7,7 +7,7 @@
core::int? lateLocal;
core::bool #lateLocal#isSet = false;
function #lateLocal#get() → core::int?
- return #lateLocal#isSet ?{core::int?} lateLocal : throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has not been initialized.");
+ return #lateLocal#isSet ?{core::int?} lateLocal : throw new _in::LateError::localNI("lateLocal");
function #lateLocal#set(core::int? #t1) → dynamic {
#lateLocal#isSet = true;
return lateLocal = #t1;
@@ -19,7 +19,7 @@
T? lateGenericLocal;
core::bool #lateGenericLocal#isSet = false;
function #lateGenericLocal#get() → T?
- return #lateGenericLocal#isSet ?{T?} lateGenericLocal : throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has not been initialized.");
+ return #lateGenericLocal#isSet ?{T?} lateGenericLocal : throw new _in::LateError::localNI("lateGenericLocal");
function #lateGenericLocal#set(T? #t2) → dynamic {
#lateGenericLocal#isSet = true;
return lateGenericLocal = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/late_nullable_local_without_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_nullable_local_without_initializer.dart.weak.expect
index b313971..91dd9f8 100644
--- a/pkg/front_end/testcases/late_lowering/late_nullable_local_without_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_nullable_local_without_initializer.dart.weak.expect
@@ -7,7 +7,7 @@
core::int? lateLocal;
core::bool #lateLocal#isSet = false;
function #lateLocal#get() → core::int?
- return #lateLocal#isSet ?{core::int?} lateLocal : throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has not been initialized.");
+ return #lateLocal#isSet ?{core::int?} lateLocal : throw new _in::LateError::localNI("lateLocal");
function #lateLocal#set(core::int? #t1) → dynamic {
#lateLocal#isSet = true;
return lateLocal = #t1;
@@ -19,7 +19,7 @@
T? lateGenericLocal;
core::bool #lateGenericLocal#isSet = false;
function #lateGenericLocal#get() → T?
- return #lateGenericLocal#isSet ?{T?} lateGenericLocal : throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has not been initialized.");
+ return #lateGenericLocal#isSet ?{T?} lateGenericLocal : throw new _in::LateError::localNI("lateGenericLocal");
function #lateGenericLocal#set(T? #t2) → dynamic {
#lateGenericLocal#isSet = true;
return lateGenericLocal = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/late_nullable_local_without_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_nullable_local_without_initializer.dart.weak.transformed.expect
index b313971..91dd9f8 100644
--- a/pkg/front_end/testcases/late_lowering/late_nullable_local_without_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_nullable_local_without_initializer.dart.weak.transformed.expect
@@ -7,7 +7,7 @@
core::int? lateLocal;
core::bool #lateLocal#isSet = false;
function #lateLocal#get() → core::int?
- return #lateLocal#isSet ?{core::int?} lateLocal : throw new _in::LateInitializationErrorImpl::•("Local 'lateLocal' has not been initialized.");
+ return #lateLocal#isSet ?{core::int?} lateLocal : throw new _in::LateError::localNI("lateLocal");
function #lateLocal#set(core::int? #t1) → dynamic {
#lateLocal#isSet = true;
return lateLocal = #t1;
@@ -19,7 +19,7 @@
T? lateGenericLocal;
core::bool #lateGenericLocal#isSet = false;
function #lateGenericLocal#get() → T?
- return #lateGenericLocal#isSet ?{T?} lateGenericLocal : throw new _in::LateInitializationErrorImpl::•("Local 'lateGenericLocal' has not been initialized.");
+ return #lateGenericLocal#isSet ?{T?} lateGenericLocal : throw new _in::LateError::localNI("lateGenericLocal");
function #lateGenericLocal#set(T? #t2) → dynamic {
#lateGenericLocal#isSet = true;
return lateGenericLocal = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/later.dart.outline.expect b/pkg/front_end/testcases/late_lowering/later.dart.outline.expect
index 8288606..7b8f4d1 100644
--- a/pkg/front_end/testcases/late_lowering/later.dart.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/later.dart.outline.expect
@@ -32,7 +32,7 @@
: super core::Object::•()
;
get x() → core::int
- return let final core::int? #t2 = this.{self::B::_#B#x} in #t2.==(null) ?{core::int} let final core::int #t3 = 42 in this.{self::B::_#B#x}.==(null) ?{core::int} this.{self::B::_#B#x} = #t3 : throw new _in::LateInitializationErrorImpl::•("Field 'x' has been assigned during initialization.") : #t2{core::int};
+ return let final core::int? #t2 = this.{self::B::_#B#x} in #t2.==(null) ?{core::int} let final core::int #t3 = 42 in this.{self::B::_#B#x}.==(null) ?{core::int} this.{self::B::_#B#x} = #t3 : throw new _in::LateError::fieldADI("x") : #t2{core::int};
}
class C extends core::Object {
field core::int? _#C#x;
diff --git a/pkg/front_end/testcases/late_lowering/later.dart.strong.expect b/pkg/front_end/testcases/late_lowering/later.dart.strong.expect
index cdcf986..0c77ea3 100644
--- a/pkg/front_end/testcases/late_lowering/later.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/later.dart.strong.expect
@@ -85,7 +85,7 @@
: super core::Object::•()
;
get x() → core::int
- return let final core::int? #t3 = this.{self::B::_#B#x} in #t3.==(null) ?{core::int} let final core::int #t4 = 42 in this.{self::B::_#B#x}.==(null) ?{core::int} this.{self::B::_#B#x} = #t4 : throw new _in::LateInitializationErrorImpl::•("Field 'x' has been assigned during initialization.") : #t3{core::int};
+ return let final core::int? #t3 = this.{self::B::_#B#x} in #t3.==(null) ?{core::int} let final core::int #t4 = 42 in this.{self::B::_#B#x}.==(null) ?{core::int} this.{self::B::_#B#x} = #t4 : throw new _in::LateError::fieldADI("x") : #t3{core::int};
}
class C extends core::Object {
field core::int? _#C#x = null;
@@ -93,12 +93,12 @@
: super core::Object::•()
;
get x() → core::int
- return let final core::int? #t5 = this.{self::C::_#C#x} in #t5.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.") : #t5{core::int};
+ return let final core::int? #t5 = this.{self::C::_#C#x} in #t5.==(null) ?{core::int} throw new _in::LateError::fieldNI("x") : #t5{core::int};
set x(core::int #t6) → void
if(this.{self::C::_#C#x}.==(null))
this.{self::C::_#C#x} = #t6;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'x' has already been initialized.");
+ throw new _in::LateError::fieldAI("x");
method initVars() → dynamic {
this.{self::C::x} = 42;
}
diff --git a/pkg/front_end/testcases/late_lowering/later.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/later.dart.strong.transformed.expect
index e0df1e9..88c3483 100644
--- a/pkg/front_end/testcases/late_lowering/later.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/later.dart.strong.transformed.expect
@@ -85,7 +85,7 @@
: super core::Object::•()
;
get x() → core::int
- return let final core::int? #t3 = this.{self::B::_#B#x} in #t3.==(null) ?{core::int} let final core::int #t4 = 42 in this.{self::B::_#B#x}.==(null) ?{core::int} this.{self::B::_#B#x} = #t4 : throw new _in::LateInitializationErrorImpl::•("Field 'x' has been assigned during initialization.") : #t3{core::int};
+ return let final core::int? #t3 = this.{self::B::_#B#x} in #t3.==(null) ?{core::int} let final core::int #t4 = 42 in this.{self::B::_#B#x}.==(null) ?{core::int} this.{self::B::_#B#x} = #t4 : throw new _in::LateError::fieldADI("x") : #t3{core::int};
}
class C extends core::Object {
field core::int? _#C#x = null;
@@ -93,12 +93,12 @@
: super core::Object::•()
;
get x() → core::int
- return let final core::int? #t5 = this.{self::C::_#C#x} in #t5.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.") : #t5{core::int};
+ return let final core::int? #t5 = this.{self::C::_#C#x} in #t5.==(null) ?{core::int} throw new _in::LateError::fieldNI("x") : #t5{core::int};
set x(core::int #t6) → void
if(this.{self::C::_#C#x}.==(null))
this.{self::C::_#C#x} = #t6;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'x' has already been initialized.");
+ throw new _in::LateError::fieldAI("x");
method initVars() → dynamic {
this.{self::C::x} = 42;
}
diff --git a/pkg/front_end/testcases/late_lowering/later.dart.weak.expect b/pkg/front_end/testcases/late_lowering/later.dart.weak.expect
index 1144c13..89130dc 100644
--- a/pkg/front_end/testcases/late_lowering/later.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/later.dart.weak.expect
@@ -97,7 +97,7 @@
if(!this.{self::B::_#B#x#isSet}) {
final core::int #t3 = 42;
if(this.{self::B::_#B#x#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'x' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("x");
this.{self::B::_#B#x} = #t3;
this.{self::B::_#B#x#isSet} = true;
}
@@ -111,10 +111,10 @@
: super core::Object::•()
;
get x() → core::int
- return this.{self::C::_#C#x#isSet} ?{core::int} let final core::int? #t5 = this.{self::C::_#C#x} in #t5{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.");
+ return this.{self::C::_#C#x#isSet} ?{core::int} let final core::int? #t5 = this.{self::C::_#C#x} in #t5{core::int} : throw new _in::LateError::fieldNI("x");
set x(core::int #t6) → void
if(this.{self::C::_#C#x#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'x' has already been initialized.");
+ throw new _in::LateError::fieldAI("x");
else {
this.{self::C::_#C#x#isSet} = true;
this.{self::C::_#C#x} = #t6;
diff --git a/pkg/front_end/testcases/late_lowering/later.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/later.dart.weak.transformed.expect
index 1e4b4fd..99c24bd 100644
--- a/pkg/front_end/testcases/late_lowering/later.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/later.dart.weak.transformed.expect
@@ -97,7 +97,7 @@
if(!this.{self::B::_#B#x#isSet}) {
final core::int #t3 = 42;
if(this.{self::B::_#B#x#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'x' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("x");
this.{self::B::_#B#x} = #t3;
this.{self::B::_#B#x#isSet} = true;
}
@@ -111,10 +111,10 @@
: super core::Object::•()
;
get x() → core::int
- return this.{self::C::_#C#x#isSet} ?{core::int} let final core::int? #t5 = this.{self::C::_#C#x} in #t5{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.");
+ return this.{self::C::_#C#x#isSet} ?{core::int} let final core::int? #t5 = this.{self::C::_#C#x} in #t5{core::int} : throw new _in::LateError::fieldNI("x");
set x(core::int #t6) → void
if(this.{self::C::_#C#x#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'x' has already been initialized.");
+ throw new _in::LateError::fieldAI("x");
else {
this.{self::C::_#C#x#isSet} = true;
this.{self::C::_#C#x} = #t6;
diff --git a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.expect b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.expect
index ae32a36..b0a568a 100644
--- a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.expect
@@ -55,38 +55,38 @@
: super core::Object::•()
;
get instanceField() → core::int
- return let final core::int? #t1 = this.{non::Class::_#Class#instanceField} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'instanceField' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{non::Class::_#Class#instanceField} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("instanceField") : #t1{core::int};
set instanceField(core::int #t2) → void
this.{non::Class::_#Class#instanceField} = #t2;
get finalInstanceField() → dynamic
- return this.{non::Class::_#Class#finalInstanceField#isSet} ?{dynamic} this.{non::Class::_#Class#finalInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has not been initialized.");
+ return this.{non::Class::_#Class#finalInstanceField#isSet} ?{dynamic} this.{non::Class::_#Class#finalInstanceField} : throw new _in::LateError::fieldNI("finalInstanceField");
set finalInstanceField(dynamic #t3) → void
if(this.{non::Class::_#Class#finalInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalInstanceField");
else {
this.{non::Class::_#Class#finalInstanceField#isSet} = true;
this.{non::Class::_#Class#finalInstanceField} = #t3;
}
get instanceTypeVariable() → non::Class::T
- return let final non::Class::T? #t4 = this.{non::Class::_#Class#instanceTypeVariable} in #t4.==(null) ?{non::Class::T} throw new _in::LateInitializationErrorImpl::•("Field 'instanceTypeVariable' has not been initialized.") : #t4{non::Class::T};
+ return let final non::Class::T? #t4 = this.{non::Class::_#Class#instanceTypeVariable} in #t4.==(null) ?{non::Class::T} throw new _in::LateError::fieldNI("instanceTypeVariable") : #t4{non::Class::T};
set instanceTypeVariable(generic-covariant-impl non::Class::T #t5) → void
this.{non::Class::_#Class#instanceTypeVariable} = #t5;
get finalInstanceTypeVariable() → non::Class::T
- return let final non::Class::T? #t6 = this.{non::Class::_#Class#finalInstanceTypeVariable} in #t6.==(null) ?{non::Class::T} throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceTypeVariable' has not been initialized.") : #t6{non::Class::T};
+ return let final non::Class::T? #t6 = this.{non::Class::_#Class#finalInstanceTypeVariable} in #t6.==(null) ?{non::Class::T} throw new _in::LateError::fieldNI("finalInstanceTypeVariable") : #t6{non::Class::T};
set finalInstanceTypeVariable(non::Class::T #t7) → void
if(this.{non::Class::_#Class#finalInstanceTypeVariable}.==(null))
this.{non::Class::_#Class#finalInstanceTypeVariable} = #t7;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceTypeVariable' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalInstanceTypeVariable");
static get staticField() → core::int
- return let final core::int? #t8 = non::Class::_#staticField in #t8.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'staticField' has not been initialized.") : #t8{core::int};
+ return let final core::int? #t8 = non::Class::_#staticField in #t8.==(null) ?{core::int} throw new _in::LateError::fieldNI("staticField") : #t8{core::int};
static set staticField(core::int #t9) → void
non::Class::_#staticField = #t9;
static get staticFinalField() → dynamic
- return non::Class::_#staticFinalField#isSet ?{dynamic} non::Class::_#staticFinalField : throw new _in::LateInitializationErrorImpl::•("Field 'staticFinalField' has not been initialized.");
+ return non::Class::_#staticFinalField#isSet ?{dynamic} non::Class::_#staticFinalField : throw new _in::LateError::fieldNI("staticFinalField");
static set staticFinalField(dynamic #t10) → void
if(non::Class::_#staticFinalField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'staticFinalField' has already been initialized.");
+ throw new _in::LateError::fieldAI("staticFinalField");
else {
non::Class::_#staticFinalField#isSet = true;
non::Class::_#staticFinalField = #t10;
@@ -96,14 +96,14 @@
static field dynamic _#finalTopLevelField = null;
static field core::bool _#finalTopLevelField#isSet = false;
static get topLevelField() → core::int
- return let final core::int? #t11 = non::_#topLevelField in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'topLevelField' has not been initialized.") : #t11{core::int};
+ return let final core::int? #t11 = non::_#topLevelField in #t11.==(null) ?{core::int} throw new _in::LateError::fieldNI("topLevelField") : #t11{core::int};
static set topLevelField(core::int #t12) → void
non::_#topLevelField = #t12;
static get finalTopLevelField() → dynamic
- return non::_#finalTopLevelField#isSet ?{dynamic} non::_#finalTopLevelField : throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has not been initialized.");
+ return non::_#finalTopLevelField#isSet ?{dynamic} non::_#finalTopLevelField : throw new _in::LateError::fieldNI("finalTopLevelField");
static set finalTopLevelField(dynamic #t13) → void
if(non::_#finalTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalTopLevelField");
else {
non::_#finalTopLevelField#isSet = true;
non::_#finalTopLevelField = #t13;
@@ -111,33 +111,33 @@
static method method<T extends core::Object = core::Object>(core::bool b, core::int i, non::method::T t) → dynamic {
core::int? local;
function #local#get() → core::int
- return let final core::int? #t14 = local in #t14.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local' has not been initialized.") : #t14{core::int};
+ return let final core::int? #t14 = local in #t14.==(null) ?{core::int} throw new _in::LateError::localNI("local") : #t14{core::int};
function #local#set(core::int #t15) → dynamic
return local = #t15;
final dynamic finalLocal;
core::bool #finalLocal#isSet = false;
function #finalLocal#get() → dynamic
- return #finalLocal#isSet ?{dynamic} finalLocal : throw new _in::LateInitializationErrorImpl::•("Local 'finalLocal' has not been initialized.");
+ return #finalLocal#isSet ?{dynamic} finalLocal : throw new _in::LateError::localNI("finalLocal");
function #finalLocal#set(dynamic #t16) → dynamic
if(#finalLocal#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'finalLocal' has already been initialized.");
+ throw new _in::LateError::localAI("finalLocal");
else {
#finalLocal#isSet = true;
return finalLocal = #t16;
}
non::method::T? localTypeVariable;
function #localTypeVariable#get() → non::method::T
- return let final non::method::T? #t17 = localTypeVariable in #t17.==(null) ?{non::method::T} throw new _in::LateInitializationErrorImpl::•("Local 'localTypeVariable' has not been initialized.") : #t17{non::method::T};
+ return let final non::method::T? #t17 = localTypeVariable in #t17.==(null) ?{non::method::T} throw new _in::LateError::localNI("localTypeVariable") : #t17{non::method::T};
function #localTypeVariable#set(non::method::T #t18) → dynamic
return localTypeVariable = #t18;
final non::method::T? finalLocalTypeVariable;
function #finalLocalTypeVariable#get() → non::method::T
- return let final non::method::T? #t19 = finalLocalTypeVariable in #t19.==(null) ?{non::method::T} throw new _in::LateInitializationErrorImpl::•("Local 'finalLocalTypeVariable' has not been initialized.") : #t19{non::method::T};
+ return let final non::method::T? #t19 = finalLocalTypeVariable in #t19.==(null) ?{non::method::T} throw new _in::LateError::localNI("finalLocalTypeVariable") : #t19{non::method::T};
function #finalLocalTypeVariable#set(non::method::T #t20) → dynamic
if(finalLocalTypeVariable.==(null))
return finalLocalTypeVariable = #t20;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'finalLocalTypeVariable' has already been initialized.");
+ throw new _in::LateError::localAI("finalLocalTypeVariable");
if(b) {
#local#set.call(i);
#finalLocal#set.call(i);
diff --git a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.transformed.expect
index ae32a36..b0a568a 100644
--- a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.transformed.expect
@@ -55,38 +55,38 @@
: super core::Object::•()
;
get instanceField() → core::int
- return let final core::int? #t1 = this.{non::Class::_#Class#instanceField} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'instanceField' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{non::Class::_#Class#instanceField} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("instanceField") : #t1{core::int};
set instanceField(core::int #t2) → void
this.{non::Class::_#Class#instanceField} = #t2;
get finalInstanceField() → dynamic
- return this.{non::Class::_#Class#finalInstanceField#isSet} ?{dynamic} this.{non::Class::_#Class#finalInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has not been initialized.");
+ return this.{non::Class::_#Class#finalInstanceField#isSet} ?{dynamic} this.{non::Class::_#Class#finalInstanceField} : throw new _in::LateError::fieldNI("finalInstanceField");
set finalInstanceField(dynamic #t3) → void
if(this.{non::Class::_#Class#finalInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalInstanceField");
else {
this.{non::Class::_#Class#finalInstanceField#isSet} = true;
this.{non::Class::_#Class#finalInstanceField} = #t3;
}
get instanceTypeVariable() → non::Class::T
- return let final non::Class::T? #t4 = this.{non::Class::_#Class#instanceTypeVariable} in #t4.==(null) ?{non::Class::T} throw new _in::LateInitializationErrorImpl::•("Field 'instanceTypeVariable' has not been initialized.") : #t4{non::Class::T};
+ return let final non::Class::T? #t4 = this.{non::Class::_#Class#instanceTypeVariable} in #t4.==(null) ?{non::Class::T} throw new _in::LateError::fieldNI("instanceTypeVariable") : #t4{non::Class::T};
set instanceTypeVariable(generic-covariant-impl non::Class::T #t5) → void
this.{non::Class::_#Class#instanceTypeVariable} = #t5;
get finalInstanceTypeVariable() → non::Class::T
- return let final non::Class::T? #t6 = this.{non::Class::_#Class#finalInstanceTypeVariable} in #t6.==(null) ?{non::Class::T} throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceTypeVariable' has not been initialized.") : #t6{non::Class::T};
+ return let final non::Class::T? #t6 = this.{non::Class::_#Class#finalInstanceTypeVariable} in #t6.==(null) ?{non::Class::T} throw new _in::LateError::fieldNI("finalInstanceTypeVariable") : #t6{non::Class::T};
set finalInstanceTypeVariable(non::Class::T #t7) → void
if(this.{non::Class::_#Class#finalInstanceTypeVariable}.==(null))
this.{non::Class::_#Class#finalInstanceTypeVariable} = #t7;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceTypeVariable' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalInstanceTypeVariable");
static get staticField() → core::int
- return let final core::int? #t8 = non::Class::_#staticField in #t8.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'staticField' has not been initialized.") : #t8{core::int};
+ return let final core::int? #t8 = non::Class::_#staticField in #t8.==(null) ?{core::int} throw new _in::LateError::fieldNI("staticField") : #t8{core::int};
static set staticField(core::int #t9) → void
non::Class::_#staticField = #t9;
static get staticFinalField() → dynamic
- return non::Class::_#staticFinalField#isSet ?{dynamic} non::Class::_#staticFinalField : throw new _in::LateInitializationErrorImpl::•("Field 'staticFinalField' has not been initialized.");
+ return non::Class::_#staticFinalField#isSet ?{dynamic} non::Class::_#staticFinalField : throw new _in::LateError::fieldNI("staticFinalField");
static set staticFinalField(dynamic #t10) → void
if(non::Class::_#staticFinalField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'staticFinalField' has already been initialized.");
+ throw new _in::LateError::fieldAI("staticFinalField");
else {
non::Class::_#staticFinalField#isSet = true;
non::Class::_#staticFinalField = #t10;
@@ -96,14 +96,14 @@
static field dynamic _#finalTopLevelField = null;
static field core::bool _#finalTopLevelField#isSet = false;
static get topLevelField() → core::int
- return let final core::int? #t11 = non::_#topLevelField in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'topLevelField' has not been initialized.") : #t11{core::int};
+ return let final core::int? #t11 = non::_#topLevelField in #t11.==(null) ?{core::int} throw new _in::LateError::fieldNI("topLevelField") : #t11{core::int};
static set topLevelField(core::int #t12) → void
non::_#topLevelField = #t12;
static get finalTopLevelField() → dynamic
- return non::_#finalTopLevelField#isSet ?{dynamic} non::_#finalTopLevelField : throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has not been initialized.");
+ return non::_#finalTopLevelField#isSet ?{dynamic} non::_#finalTopLevelField : throw new _in::LateError::fieldNI("finalTopLevelField");
static set finalTopLevelField(dynamic #t13) → void
if(non::_#finalTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalTopLevelField");
else {
non::_#finalTopLevelField#isSet = true;
non::_#finalTopLevelField = #t13;
@@ -111,33 +111,33 @@
static method method<T extends core::Object = core::Object>(core::bool b, core::int i, non::method::T t) → dynamic {
core::int? local;
function #local#get() → core::int
- return let final core::int? #t14 = local in #t14.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local' has not been initialized.") : #t14{core::int};
+ return let final core::int? #t14 = local in #t14.==(null) ?{core::int} throw new _in::LateError::localNI("local") : #t14{core::int};
function #local#set(core::int #t15) → dynamic
return local = #t15;
final dynamic finalLocal;
core::bool #finalLocal#isSet = false;
function #finalLocal#get() → dynamic
- return #finalLocal#isSet ?{dynamic} finalLocal : throw new _in::LateInitializationErrorImpl::•("Local 'finalLocal' has not been initialized.");
+ return #finalLocal#isSet ?{dynamic} finalLocal : throw new _in::LateError::localNI("finalLocal");
function #finalLocal#set(dynamic #t16) → dynamic
if(#finalLocal#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'finalLocal' has already been initialized.");
+ throw new _in::LateError::localAI("finalLocal");
else {
#finalLocal#isSet = true;
return finalLocal = #t16;
}
non::method::T? localTypeVariable;
function #localTypeVariable#get() → non::method::T
- return let final non::method::T? #t17 = localTypeVariable in #t17.==(null) ?{non::method::T} throw new _in::LateInitializationErrorImpl::•("Local 'localTypeVariable' has not been initialized.") : #t17{non::method::T};
+ return let final non::method::T? #t17 = localTypeVariable in #t17.==(null) ?{non::method::T} throw new _in::LateError::localNI("localTypeVariable") : #t17{non::method::T};
function #localTypeVariable#set(non::method::T #t18) → dynamic
return localTypeVariable = #t18;
final non::method::T? finalLocalTypeVariable;
function #finalLocalTypeVariable#get() → non::method::T
- return let final non::method::T? #t19 = finalLocalTypeVariable in #t19.==(null) ?{non::method::T} throw new _in::LateInitializationErrorImpl::•("Local 'finalLocalTypeVariable' has not been initialized.") : #t19{non::method::T};
+ return let final non::method::T? #t19 = finalLocalTypeVariable in #t19.==(null) ?{non::method::T} throw new _in::LateError::localNI("finalLocalTypeVariable") : #t19{non::method::T};
function #finalLocalTypeVariable#set(non::method::T #t20) → dynamic
if(finalLocalTypeVariable.==(null))
return finalLocalTypeVariable = #t20;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'finalLocalTypeVariable' has already been initialized.");
+ throw new _in::LateError::localAI("finalLocalTypeVariable");
if(b) {
#local#set.call(i);
#finalLocal#set.call(i);
diff --git a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.expect b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.expect
index 6f9bcef..9f26c1e 100644
--- a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.expect
@@ -52,46 +52,46 @@
: super core::Object::•()
;
get instanceField() → core::int
- return this.{non::Class::_#Class#instanceField#isSet} ?{core::int} let final core::int? #t1 = this.{non::Class::_#Class#instanceField} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'instanceField' has not been initialized.");
+ return this.{non::Class::_#Class#instanceField#isSet} ?{core::int} let final core::int? #t1 = this.{non::Class::_#Class#instanceField} in #t1{core::int} : throw new _in::LateError::fieldNI("instanceField");
set instanceField(core::int #t2) → void {
this.{non::Class::_#Class#instanceField#isSet} = true;
this.{non::Class::_#Class#instanceField} = #t2;
}
get finalInstanceField() → dynamic
- return this.{non::Class::_#Class#finalInstanceField#isSet} ?{dynamic} this.{non::Class::_#Class#finalInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has not been initialized.");
+ return this.{non::Class::_#Class#finalInstanceField#isSet} ?{dynamic} this.{non::Class::_#Class#finalInstanceField} : throw new _in::LateError::fieldNI("finalInstanceField");
set finalInstanceField(dynamic #t3) → void
if(this.{non::Class::_#Class#finalInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalInstanceField");
else {
this.{non::Class::_#Class#finalInstanceField#isSet} = true;
this.{non::Class::_#Class#finalInstanceField} = #t3;
}
get instanceTypeVariable() → non::Class::T
- return this.{non::Class::_#Class#instanceTypeVariable#isSet} ?{non::Class::T} let final non::Class::T? #t4 = this.{non::Class::_#Class#instanceTypeVariable} in #t4{non::Class::T} : throw new _in::LateInitializationErrorImpl::•("Field 'instanceTypeVariable' has not been initialized.");
+ return this.{non::Class::_#Class#instanceTypeVariable#isSet} ?{non::Class::T} let final non::Class::T? #t4 = this.{non::Class::_#Class#instanceTypeVariable} in #t4{non::Class::T} : throw new _in::LateError::fieldNI("instanceTypeVariable");
set instanceTypeVariable(generic-covariant-impl non::Class::T #t5) → void {
this.{non::Class::_#Class#instanceTypeVariable#isSet} = true;
this.{non::Class::_#Class#instanceTypeVariable} = #t5;
}
get finalInstanceTypeVariable() → non::Class::T
- return this.{non::Class::_#Class#finalInstanceTypeVariable#isSet} ?{non::Class::T} let final non::Class::T? #t6 = this.{non::Class::_#Class#finalInstanceTypeVariable} in #t6{non::Class::T} : throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceTypeVariable' has not been initialized.");
+ return this.{non::Class::_#Class#finalInstanceTypeVariable#isSet} ?{non::Class::T} let final non::Class::T? #t6 = this.{non::Class::_#Class#finalInstanceTypeVariable} in #t6{non::Class::T} : throw new _in::LateError::fieldNI("finalInstanceTypeVariable");
set finalInstanceTypeVariable(non::Class::T #t7) → void
if(this.{non::Class::_#Class#finalInstanceTypeVariable#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceTypeVariable' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalInstanceTypeVariable");
else {
this.{non::Class::_#Class#finalInstanceTypeVariable#isSet} = true;
this.{non::Class::_#Class#finalInstanceTypeVariable} = #t7;
}
static get staticField() → core::int
- return non::Class::_#staticField#isSet ?{core::int} let final core::int? #t8 = non::Class::_#staticField in #t8{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'staticField' has not been initialized.");
+ return non::Class::_#staticField#isSet ?{core::int} let final core::int? #t8 = non::Class::_#staticField in #t8{core::int} : throw new _in::LateError::fieldNI("staticField");
static set staticField(core::int #t9) → void {
non::Class::_#staticField#isSet = true;
non::Class::_#staticField = #t9;
}
static get staticFinalField() → dynamic
- return non::Class::_#staticFinalField#isSet ?{dynamic} non::Class::_#staticFinalField : throw new _in::LateInitializationErrorImpl::•("Field 'staticFinalField' has not been initialized.");
+ return non::Class::_#staticFinalField#isSet ?{dynamic} non::Class::_#staticFinalField : throw new _in::LateError::fieldNI("staticFinalField");
static set staticFinalField(dynamic #t10) → void
if(non::Class::_#staticFinalField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'staticFinalField' has already been initialized.");
+ throw new _in::LateError::fieldAI("staticFinalField");
else {
non::Class::_#staticFinalField#isSet = true;
non::Class::_#staticFinalField = #t10;
@@ -102,16 +102,16 @@
static field dynamic _#finalTopLevelField = null;
static field core::bool _#finalTopLevelField#isSet = false;
static get topLevelField() → core::int
- return non::_#topLevelField#isSet ?{core::int} let final core::int? #t11 = non::_#topLevelField in #t11{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'topLevelField' has not been initialized.");
+ return non::_#topLevelField#isSet ?{core::int} let final core::int? #t11 = non::_#topLevelField in #t11{core::int} : throw new _in::LateError::fieldNI("topLevelField");
static set topLevelField(core::int #t12) → void {
non::_#topLevelField#isSet = true;
non::_#topLevelField = #t12;
}
static get finalTopLevelField() → dynamic
- return non::_#finalTopLevelField#isSet ?{dynamic} non::_#finalTopLevelField : throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has not been initialized.");
+ return non::_#finalTopLevelField#isSet ?{dynamic} non::_#finalTopLevelField : throw new _in::LateError::fieldNI("finalTopLevelField");
static set finalTopLevelField(dynamic #t13) → void
if(non::_#finalTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalTopLevelField");
else {
non::_#finalTopLevelField#isSet = true;
non::_#finalTopLevelField = #t13;
@@ -120,7 +120,7 @@
core::int? local;
core::bool #local#isSet = false;
function #local#get() → core::int
- return #local#isSet ?{core::int} local{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local' has not been initialized.");
+ return #local#isSet ?{core::int} local{core::int} : throw new _in::LateError::localNI("local");
function #local#set(core::int #t14) → dynamic {
#local#isSet = true;
return local = #t14;
@@ -128,10 +128,10 @@
final dynamic finalLocal;
core::bool #finalLocal#isSet = false;
function #finalLocal#get() → dynamic
- return #finalLocal#isSet ?{dynamic} finalLocal : throw new _in::LateInitializationErrorImpl::•("Local 'finalLocal' has not been initialized.");
+ return #finalLocal#isSet ?{dynamic} finalLocal : throw new _in::LateError::localNI("finalLocal");
function #finalLocal#set(dynamic #t15) → dynamic
if(#finalLocal#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'finalLocal' has already been initialized.");
+ throw new _in::LateError::localAI("finalLocal");
else {
#finalLocal#isSet = true;
return finalLocal = #t15;
@@ -139,7 +139,7 @@
non::method::T? localTypeVariable;
core::bool #localTypeVariable#isSet = false;
function #localTypeVariable#get() → non::method::T
- return #localTypeVariable#isSet ?{non::method::T} localTypeVariable{non::method::T} : throw new _in::LateInitializationErrorImpl::•("Local 'localTypeVariable' has not been initialized.");
+ return #localTypeVariable#isSet ?{non::method::T} localTypeVariable{non::method::T} : throw new _in::LateError::localNI("localTypeVariable");
function #localTypeVariable#set(non::method::T #t16) → dynamic {
#localTypeVariable#isSet = true;
return localTypeVariable = #t16;
@@ -147,10 +147,10 @@
final non::method::T? finalLocalTypeVariable;
core::bool #finalLocalTypeVariable#isSet = false;
function #finalLocalTypeVariable#get() → non::method::T
- return #finalLocalTypeVariable#isSet ?{non::method::T} finalLocalTypeVariable{non::method::T} : throw new _in::LateInitializationErrorImpl::•("Local 'finalLocalTypeVariable' has not been initialized.");
+ return #finalLocalTypeVariable#isSet ?{non::method::T} finalLocalTypeVariable{non::method::T} : throw new _in::LateError::localNI("finalLocalTypeVariable");
function #finalLocalTypeVariable#set(non::method::T #t17) → dynamic
if(#finalLocalTypeVariable#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'finalLocalTypeVariable' has already been initialized.");
+ throw new _in::LateError::localAI("finalLocalTypeVariable");
else {
#finalLocalTypeVariable#isSet = true;
return finalLocalTypeVariable = #t17;
diff --git a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.transformed.expect
index 6f9bcef..9f26c1e 100644
--- a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.transformed.expect
@@ -52,46 +52,46 @@
: super core::Object::•()
;
get instanceField() → core::int
- return this.{non::Class::_#Class#instanceField#isSet} ?{core::int} let final core::int? #t1 = this.{non::Class::_#Class#instanceField} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'instanceField' has not been initialized.");
+ return this.{non::Class::_#Class#instanceField#isSet} ?{core::int} let final core::int? #t1 = this.{non::Class::_#Class#instanceField} in #t1{core::int} : throw new _in::LateError::fieldNI("instanceField");
set instanceField(core::int #t2) → void {
this.{non::Class::_#Class#instanceField#isSet} = true;
this.{non::Class::_#Class#instanceField} = #t2;
}
get finalInstanceField() → dynamic
- return this.{non::Class::_#Class#finalInstanceField#isSet} ?{dynamic} this.{non::Class::_#Class#finalInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has not been initialized.");
+ return this.{non::Class::_#Class#finalInstanceField#isSet} ?{dynamic} this.{non::Class::_#Class#finalInstanceField} : throw new _in::LateError::fieldNI("finalInstanceField");
set finalInstanceField(dynamic #t3) → void
if(this.{non::Class::_#Class#finalInstanceField#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalInstanceField");
else {
this.{non::Class::_#Class#finalInstanceField#isSet} = true;
this.{non::Class::_#Class#finalInstanceField} = #t3;
}
get instanceTypeVariable() → non::Class::T
- return this.{non::Class::_#Class#instanceTypeVariable#isSet} ?{non::Class::T} let final non::Class::T? #t4 = this.{non::Class::_#Class#instanceTypeVariable} in #t4{non::Class::T} : throw new _in::LateInitializationErrorImpl::•("Field 'instanceTypeVariable' has not been initialized.");
+ return this.{non::Class::_#Class#instanceTypeVariable#isSet} ?{non::Class::T} let final non::Class::T? #t4 = this.{non::Class::_#Class#instanceTypeVariable} in #t4{non::Class::T} : throw new _in::LateError::fieldNI("instanceTypeVariable");
set instanceTypeVariable(generic-covariant-impl non::Class::T #t5) → void {
this.{non::Class::_#Class#instanceTypeVariable#isSet} = true;
this.{non::Class::_#Class#instanceTypeVariable} = #t5;
}
get finalInstanceTypeVariable() → non::Class::T
- return this.{non::Class::_#Class#finalInstanceTypeVariable#isSet} ?{non::Class::T} let final non::Class::T? #t6 = this.{non::Class::_#Class#finalInstanceTypeVariable} in #t6{non::Class::T} : throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceTypeVariable' has not been initialized.");
+ return this.{non::Class::_#Class#finalInstanceTypeVariable#isSet} ?{non::Class::T} let final non::Class::T? #t6 = this.{non::Class::_#Class#finalInstanceTypeVariable} in #t6{non::Class::T} : throw new _in::LateError::fieldNI("finalInstanceTypeVariable");
set finalInstanceTypeVariable(non::Class::T #t7) → void
if(this.{non::Class::_#Class#finalInstanceTypeVariable#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceTypeVariable' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalInstanceTypeVariable");
else {
this.{non::Class::_#Class#finalInstanceTypeVariable#isSet} = true;
this.{non::Class::_#Class#finalInstanceTypeVariable} = #t7;
}
static get staticField() → core::int
- return non::Class::_#staticField#isSet ?{core::int} let final core::int? #t8 = non::Class::_#staticField in #t8{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'staticField' has not been initialized.");
+ return non::Class::_#staticField#isSet ?{core::int} let final core::int? #t8 = non::Class::_#staticField in #t8{core::int} : throw new _in::LateError::fieldNI("staticField");
static set staticField(core::int #t9) → void {
non::Class::_#staticField#isSet = true;
non::Class::_#staticField = #t9;
}
static get staticFinalField() → dynamic
- return non::Class::_#staticFinalField#isSet ?{dynamic} non::Class::_#staticFinalField : throw new _in::LateInitializationErrorImpl::•("Field 'staticFinalField' has not been initialized.");
+ return non::Class::_#staticFinalField#isSet ?{dynamic} non::Class::_#staticFinalField : throw new _in::LateError::fieldNI("staticFinalField");
static set staticFinalField(dynamic #t10) → void
if(non::Class::_#staticFinalField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'staticFinalField' has already been initialized.");
+ throw new _in::LateError::fieldAI("staticFinalField");
else {
non::Class::_#staticFinalField#isSet = true;
non::Class::_#staticFinalField = #t10;
@@ -102,16 +102,16 @@
static field dynamic _#finalTopLevelField = null;
static field core::bool _#finalTopLevelField#isSet = false;
static get topLevelField() → core::int
- return non::_#topLevelField#isSet ?{core::int} let final core::int? #t11 = non::_#topLevelField in #t11{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'topLevelField' has not been initialized.");
+ return non::_#topLevelField#isSet ?{core::int} let final core::int? #t11 = non::_#topLevelField in #t11{core::int} : throw new _in::LateError::fieldNI("topLevelField");
static set topLevelField(core::int #t12) → void {
non::_#topLevelField#isSet = true;
non::_#topLevelField = #t12;
}
static get finalTopLevelField() → dynamic
- return non::_#finalTopLevelField#isSet ?{dynamic} non::_#finalTopLevelField : throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has not been initialized.");
+ return non::_#finalTopLevelField#isSet ?{dynamic} non::_#finalTopLevelField : throw new _in::LateError::fieldNI("finalTopLevelField");
static set finalTopLevelField(dynamic #t13) → void
if(non::_#finalTopLevelField#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("finalTopLevelField");
else {
non::_#finalTopLevelField#isSet = true;
non::_#finalTopLevelField = #t13;
@@ -120,7 +120,7 @@
core::int? local;
core::bool #local#isSet = false;
function #local#get() → core::int
- return #local#isSet ?{core::int} local{core::int} : throw new _in::LateInitializationErrorImpl::•("Local 'local' has not been initialized.");
+ return #local#isSet ?{core::int} local{core::int} : throw new _in::LateError::localNI("local");
function #local#set(core::int #t14) → dynamic {
#local#isSet = true;
return local = #t14;
@@ -128,10 +128,10 @@
final dynamic finalLocal;
core::bool #finalLocal#isSet = false;
function #finalLocal#get() → dynamic
- return #finalLocal#isSet ?{dynamic} finalLocal : throw new _in::LateInitializationErrorImpl::•("Local 'finalLocal' has not been initialized.");
+ return #finalLocal#isSet ?{dynamic} finalLocal : throw new _in::LateError::localNI("finalLocal");
function #finalLocal#set(dynamic #t15) → dynamic
if(#finalLocal#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'finalLocal' has already been initialized.");
+ throw new _in::LateError::localAI("finalLocal");
else {
#finalLocal#isSet = true;
return finalLocal = #t15;
@@ -139,7 +139,7 @@
non::method::T? localTypeVariable;
core::bool #localTypeVariable#isSet = false;
function #localTypeVariable#get() → non::method::T
- return #localTypeVariable#isSet ?{non::method::T} localTypeVariable{non::method::T} : throw new _in::LateInitializationErrorImpl::•("Local 'localTypeVariable' has not been initialized.");
+ return #localTypeVariable#isSet ?{non::method::T} localTypeVariable{non::method::T} : throw new _in::LateError::localNI("localTypeVariable");
function #localTypeVariable#set(non::method::T #t16) → dynamic {
#localTypeVariable#isSet = true;
return localTypeVariable = #t16;
@@ -147,10 +147,10 @@
final non::method::T? finalLocalTypeVariable;
core::bool #finalLocalTypeVariable#isSet = false;
function #finalLocalTypeVariable#get() → non::method::T
- return #finalLocalTypeVariable#isSet ?{non::method::T} finalLocalTypeVariable{non::method::T} : throw new _in::LateInitializationErrorImpl::•("Local 'finalLocalTypeVariable' has not been initialized.");
+ return #finalLocalTypeVariable#isSet ?{non::method::T} finalLocalTypeVariable{non::method::T} : throw new _in::LateError::localNI("finalLocalTypeVariable");
function #finalLocalTypeVariable#set(non::method::T #t17) → dynamic
if(#finalLocalTypeVariable#isSet)
- throw new _in::LateInitializationErrorImpl::•("Local 'finalLocalTypeVariable' has already been initialized.");
+ throw new _in::LateError::localAI("finalLocalTypeVariable");
else {
#finalLocalTypeVariable#isSet = true;
return finalLocalTypeVariable = #t17;
diff --git a/pkg/front_end/testcases/late_lowering/override.dart.strong.expect b/pkg/front_end/testcases/late_lowering/override.dart.strong.expect
index 8e2fcee..bc88c3f 100644
--- a/pkg/front_end/testcases/late_lowering/override.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/override.dart.strong.expect
@@ -12,27 +12,27 @@
: super core::Object::•()
;
get field1() → core::int
- return let final core::int? #t1 = this.{self::Class::_#Class#field1} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'field1' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::Class::_#Class#field1} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("field1") : #t1{core::int};
set field1(core::int #t2) → void
this.{self::Class::_#Class#field1} = #t2;
get field2() → core::int
- return let final core::int? #t3 = this.{self::Class::_#Class#field2} in #t3.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'field2' has not been initialized.") : #t3{core::int};
+ return let final core::int? #t3 = this.{self::Class::_#Class#field2} in #t3.==(null) ?{core::int} throw new _in::LateError::fieldNI("field2") : #t3{core::int};
set field2(core::int #t4) → void
this.{self::Class::_#Class#field2} = #t4;
get field3() → core::int
- return let final core::int? #t5 = this.{self::Class::_#Class#field3} in #t5.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'field3' has not been initialized.") : #t5{core::int};
+ return let final core::int? #t5 = this.{self::Class::_#Class#field3} in #t5.==(null) ?{core::int} throw new _in::LateError::fieldNI("field3") : #t5{core::int};
set field3(core::int #t6) → void
if(this.{self::Class::_#Class#field3}.==(null))
this.{self::Class::_#Class#field3} = #t6;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'field3' has already been initialized.");
+ throw new _in::LateError::fieldAI("field3");
get field4() → core::int
- return let final core::int? #t7 = this.{self::Class::_#Class#field4} in #t7.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'field4' has not been initialized.") : #t7{core::int};
+ return let final core::int? #t7 = this.{self::Class::_#Class#field4} in #t7.==(null) ?{core::int} throw new _in::LateError::fieldNI("field4") : #t7{core::int};
set field4(core::int #t8) → void
if(this.{self::Class::_#Class#field4}.==(null))
this.{self::Class::_#Class#field4} = #t8;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'field4' has already been initialized.");
+ throw new _in::LateError::fieldAI("field4");
}
class SubClass extends self::Class {
field core::int? _#SubClass#field1 = null;
@@ -43,7 +43,7 @@
: super self::Class::•()
;
get field1() → core::int
- return let final core::int? #t9 = this.{self::SubClass::_#SubClass#field1} in #t9.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'field1' has not been initialized.") : #t9{core::int};
+ return let final core::int? #t9 = this.{self::SubClass::_#SubClass#field1} in #t9.==(null) ?{core::int} throw new _in::LateError::fieldNI("field1") : #t9{core::int};
set field1(core::int #t10) → void
this.{self::SubClass::_#SubClass#field1} = #t10;
get field2() → core::int
@@ -51,14 +51,14 @@
set field2(core::int #t12) → void
this.{self::SubClass::_#SubClass#field2} = #t12;
get field3() → core::int
- return let final core::int? #t13 = this.{self::SubClass::_#SubClass#field3} in #t13.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'field3' has not been initialized.") : #t13{core::int};
+ return let final core::int? #t13 = this.{self::SubClass::_#SubClass#field3} in #t13.==(null) ?{core::int} throw new _in::LateError::fieldNI("field3") : #t13{core::int};
set field3(core::int #t14) → void
if(this.{self::SubClass::_#SubClass#field3}.==(null))
this.{self::SubClass::_#SubClass#field3} = #t14;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'field3' has already been initialized.");
+ throw new _in::LateError::fieldAI("field3");
get field4() → core::int
- return let final core::int? #t15 = this.{self::SubClass::_#SubClass#field4} in #t15.==(null) ?{core::int} let final core::int #t16 = 0 in this.{self::SubClass::_#SubClass#field4}.==(null) ?{core::int} this.{self::SubClass::_#SubClass#field4} = #t16 : throw new _in::LateInitializationErrorImpl::•("Field 'field4' has been assigned during initialization.") : #t15{core::int};
+ return let final core::int? #t15 = this.{self::SubClass::_#SubClass#field4} in #t15.==(null) ?{core::int} let final core::int #t16 = 0 in this.{self::SubClass::_#SubClass#field4}.==(null) ?{core::int} this.{self::SubClass::_#SubClass#field4} = #t16 : throw new _in::LateError::fieldADI("field4") : #t15{core::int};
get directField1() → core::int
return super.{self::Class::field1};
set directField1(core::int value) → void {
diff --git a/pkg/front_end/testcases/late_lowering/override.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/override.dart.strong.transformed.expect
index f94376c..6b5321f 100644
--- a/pkg/front_end/testcases/late_lowering/override.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/override.dart.strong.transformed.expect
@@ -12,27 +12,27 @@
: super core::Object::•()
;
get field1() → core::int
- return let final core::int? #t1 = this.{self::Class::_#Class#field1} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'field1' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::Class::_#Class#field1} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("field1") : #t1{core::int};
set field1(core::int #t2) → void
this.{self::Class::_#Class#field1} = #t2;
get field2() → core::int
- return let final core::int? #t3 = this.{self::Class::_#Class#field2} in #t3.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'field2' has not been initialized.") : #t3{core::int};
+ return let final core::int? #t3 = this.{self::Class::_#Class#field2} in #t3.==(null) ?{core::int} throw new _in::LateError::fieldNI("field2") : #t3{core::int};
set field2(core::int #t4) → void
this.{self::Class::_#Class#field2} = #t4;
get field3() → core::int
- return let final core::int? #t5 = this.{self::Class::_#Class#field3} in #t5.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'field3' has not been initialized.") : #t5{core::int};
+ return let final core::int? #t5 = this.{self::Class::_#Class#field3} in #t5.==(null) ?{core::int} throw new _in::LateError::fieldNI("field3") : #t5{core::int};
set field3(core::int #t6) → void
if(this.{self::Class::_#Class#field3}.==(null))
this.{self::Class::_#Class#field3} = #t6;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'field3' has already been initialized.");
+ throw new _in::LateError::fieldAI("field3");
get field4() → core::int
- return let final core::int? #t7 = this.{self::Class::_#Class#field4} in #t7.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'field4' has not been initialized.") : #t7{core::int};
+ return let final core::int? #t7 = this.{self::Class::_#Class#field4} in #t7.==(null) ?{core::int} throw new _in::LateError::fieldNI("field4") : #t7{core::int};
set field4(core::int #t8) → void
if(this.{self::Class::_#Class#field4}.==(null))
this.{self::Class::_#Class#field4} = #t8;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'field4' has already been initialized.");
+ throw new _in::LateError::fieldAI("field4");
}
class SubClass extends self::Class {
field core::int? _#SubClass#field1 = null;
@@ -43,7 +43,7 @@
: super self::Class::•()
;
get field1() → core::int
- return let final core::int? #t9 = this.{self::SubClass::_#SubClass#field1} in #t9.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'field1' has not been initialized.") : #t9{core::int};
+ return let final core::int? #t9 = this.{self::SubClass::_#SubClass#field1} in #t9.==(null) ?{core::int} throw new _in::LateError::fieldNI("field1") : #t9{core::int};
set field1(core::int #t10) → void
this.{self::SubClass::_#SubClass#field1} = #t10;
get field2() → core::int
@@ -51,14 +51,14 @@
set field2(core::int #t12) → void
this.{self::SubClass::_#SubClass#field2} = #t12;
get field3() → core::int
- return let final core::int? #t13 = this.{self::SubClass::_#SubClass#field3} in #t13.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'field3' has not been initialized.") : #t13{core::int};
+ return let final core::int? #t13 = this.{self::SubClass::_#SubClass#field3} in #t13.==(null) ?{core::int} throw new _in::LateError::fieldNI("field3") : #t13{core::int};
set field3(core::int #t14) → void
if(this.{self::SubClass::_#SubClass#field3}.==(null))
this.{self::SubClass::_#SubClass#field3} = #t14;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'field3' has already been initialized.");
+ throw new _in::LateError::fieldAI("field3");
get field4() → core::int
- return let final core::int? #t15 = this.{self::SubClass::_#SubClass#field4} in #t15.==(null) ?{core::int} let final core::int #t16 = 0 in this.{self::SubClass::_#SubClass#field4}.==(null) ?{core::int} this.{self::SubClass::_#SubClass#field4} = #t16 : throw new _in::LateInitializationErrorImpl::•("Field 'field4' has been assigned during initialization.") : #t15{core::int};
+ return let final core::int? #t15 = this.{self::SubClass::_#SubClass#field4} in #t15.==(null) ?{core::int} let final core::int #t16 = 0 in this.{self::SubClass::_#SubClass#field4}.==(null) ?{core::int} this.{self::SubClass::_#SubClass#field4} = #t16 : throw new _in::LateError::fieldADI("field4") : #t15{core::int};
get directField1() → core::int
return super.{self::Class::field1};
set directField1(core::int value) → void {
diff --git a/pkg/front_end/testcases/late_lowering/override.dart.weak.expect b/pkg/front_end/testcases/late_lowering/override.dart.weak.expect
index 961d813..ee8f06d 100644
--- a/pkg/front_end/testcases/late_lowering/override.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/override.dart.weak.expect
@@ -16,31 +16,31 @@
: super core::Object::•()
;
get field1() → core::int
- return this.{self::Class::_#Class#field1#isSet} ?{core::int} let final core::int? #t1 = this.{self::Class::_#Class#field1} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'field1' has not been initialized.");
+ return this.{self::Class::_#Class#field1#isSet} ?{core::int} let final core::int? #t1 = this.{self::Class::_#Class#field1} in #t1{core::int} : throw new _in::LateError::fieldNI("field1");
set field1(core::int #t2) → void {
this.{self::Class::_#Class#field1#isSet} = true;
this.{self::Class::_#Class#field1} = #t2;
}
get field2() → core::int
- return this.{self::Class::_#Class#field2#isSet} ?{core::int} let final core::int? #t3 = this.{self::Class::_#Class#field2} in #t3{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'field2' has not been initialized.");
+ return this.{self::Class::_#Class#field2#isSet} ?{core::int} let final core::int? #t3 = this.{self::Class::_#Class#field2} in #t3{core::int} : throw new _in::LateError::fieldNI("field2");
set field2(core::int #t4) → void {
this.{self::Class::_#Class#field2#isSet} = true;
this.{self::Class::_#Class#field2} = #t4;
}
get field3() → core::int
- return this.{self::Class::_#Class#field3#isSet} ?{core::int} let final core::int? #t5 = this.{self::Class::_#Class#field3} in #t5{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'field3' has not been initialized.");
+ return this.{self::Class::_#Class#field3#isSet} ?{core::int} let final core::int? #t5 = this.{self::Class::_#Class#field3} in #t5{core::int} : throw new _in::LateError::fieldNI("field3");
set field3(core::int #t6) → void
if(this.{self::Class::_#Class#field3#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'field3' has already been initialized.");
+ throw new _in::LateError::fieldAI("field3");
else {
this.{self::Class::_#Class#field3#isSet} = true;
this.{self::Class::_#Class#field3} = #t6;
}
get field4() → core::int
- return this.{self::Class::_#Class#field4#isSet} ?{core::int} let final core::int? #t7 = this.{self::Class::_#Class#field4} in #t7{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'field4' has not been initialized.");
+ return this.{self::Class::_#Class#field4#isSet} ?{core::int} let final core::int? #t7 = this.{self::Class::_#Class#field4} in #t7{core::int} : throw new _in::LateError::fieldNI("field4");
set field4(core::int #t8) → void
if(this.{self::Class::_#Class#field4#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'field4' has already been initialized.");
+ throw new _in::LateError::fieldAI("field4");
else {
this.{self::Class::_#Class#field4#isSet} = true;
this.{self::Class::_#Class#field4} = #t8;
@@ -59,7 +59,7 @@
: super self::Class::•()
;
get field1() → core::int
- return this.{self::SubClass::_#SubClass#field1#isSet} ?{core::int} let final core::int? #t9 = this.{self::SubClass::_#SubClass#field1} in #t9{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'field1' has not been initialized.");
+ return this.{self::SubClass::_#SubClass#field1#isSet} ?{core::int} let final core::int? #t9 = this.{self::SubClass::_#SubClass#field1} in #t9{core::int} : throw new _in::LateError::fieldNI("field1");
set field1(core::int #t10) → void {
this.{self::SubClass::_#SubClass#field1#isSet} = true;
this.{self::SubClass::_#SubClass#field1} = #t10;
@@ -76,10 +76,10 @@
this.{self::SubClass::_#SubClass#field2} = #t12;
}
get field3() → core::int
- return this.{self::SubClass::_#SubClass#field3#isSet} ?{core::int} let final core::int? #t13 = this.{self::SubClass::_#SubClass#field3} in #t13{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'field3' has not been initialized.");
+ return this.{self::SubClass::_#SubClass#field3#isSet} ?{core::int} let final core::int? #t13 = this.{self::SubClass::_#SubClass#field3} in #t13{core::int} : throw new _in::LateError::fieldNI("field3");
set field3(core::int #t14) → void
if(this.{self::SubClass::_#SubClass#field3#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'field3' has already been initialized.");
+ throw new _in::LateError::fieldAI("field3");
else {
this.{self::SubClass::_#SubClass#field3#isSet} = true;
this.{self::SubClass::_#SubClass#field3} = #t14;
@@ -88,7 +88,7 @@
if(!this.{self::SubClass::_#SubClass#field4#isSet}) {
final core::int #t15 = 0;
if(this.{self::SubClass::_#SubClass#field4#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'field4' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("field4");
this.{self::SubClass::_#SubClass#field4} = #t15;
this.{self::SubClass::_#SubClass#field4#isSet} = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/override.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/override.dart.weak.transformed.expect
index 961d813..ee8f06d 100644
--- a/pkg/front_end/testcases/late_lowering/override.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/override.dart.weak.transformed.expect
@@ -16,31 +16,31 @@
: super core::Object::•()
;
get field1() → core::int
- return this.{self::Class::_#Class#field1#isSet} ?{core::int} let final core::int? #t1 = this.{self::Class::_#Class#field1} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'field1' has not been initialized.");
+ return this.{self::Class::_#Class#field1#isSet} ?{core::int} let final core::int? #t1 = this.{self::Class::_#Class#field1} in #t1{core::int} : throw new _in::LateError::fieldNI("field1");
set field1(core::int #t2) → void {
this.{self::Class::_#Class#field1#isSet} = true;
this.{self::Class::_#Class#field1} = #t2;
}
get field2() → core::int
- return this.{self::Class::_#Class#field2#isSet} ?{core::int} let final core::int? #t3 = this.{self::Class::_#Class#field2} in #t3{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'field2' has not been initialized.");
+ return this.{self::Class::_#Class#field2#isSet} ?{core::int} let final core::int? #t3 = this.{self::Class::_#Class#field2} in #t3{core::int} : throw new _in::LateError::fieldNI("field2");
set field2(core::int #t4) → void {
this.{self::Class::_#Class#field2#isSet} = true;
this.{self::Class::_#Class#field2} = #t4;
}
get field3() → core::int
- return this.{self::Class::_#Class#field3#isSet} ?{core::int} let final core::int? #t5 = this.{self::Class::_#Class#field3} in #t5{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'field3' has not been initialized.");
+ return this.{self::Class::_#Class#field3#isSet} ?{core::int} let final core::int? #t5 = this.{self::Class::_#Class#field3} in #t5{core::int} : throw new _in::LateError::fieldNI("field3");
set field3(core::int #t6) → void
if(this.{self::Class::_#Class#field3#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'field3' has already been initialized.");
+ throw new _in::LateError::fieldAI("field3");
else {
this.{self::Class::_#Class#field3#isSet} = true;
this.{self::Class::_#Class#field3} = #t6;
}
get field4() → core::int
- return this.{self::Class::_#Class#field4#isSet} ?{core::int} let final core::int? #t7 = this.{self::Class::_#Class#field4} in #t7{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'field4' has not been initialized.");
+ return this.{self::Class::_#Class#field4#isSet} ?{core::int} let final core::int? #t7 = this.{self::Class::_#Class#field4} in #t7{core::int} : throw new _in::LateError::fieldNI("field4");
set field4(core::int #t8) → void
if(this.{self::Class::_#Class#field4#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'field4' has already been initialized.");
+ throw new _in::LateError::fieldAI("field4");
else {
this.{self::Class::_#Class#field4#isSet} = true;
this.{self::Class::_#Class#field4} = #t8;
@@ -59,7 +59,7 @@
: super self::Class::•()
;
get field1() → core::int
- return this.{self::SubClass::_#SubClass#field1#isSet} ?{core::int} let final core::int? #t9 = this.{self::SubClass::_#SubClass#field1} in #t9{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'field1' has not been initialized.");
+ return this.{self::SubClass::_#SubClass#field1#isSet} ?{core::int} let final core::int? #t9 = this.{self::SubClass::_#SubClass#field1} in #t9{core::int} : throw new _in::LateError::fieldNI("field1");
set field1(core::int #t10) → void {
this.{self::SubClass::_#SubClass#field1#isSet} = true;
this.{self::SubClass::_#SubClass#field1} = #t10;
@@ -76,10 +76,10 @@
this.{self::SubClass::_#SubClass#field2} = #t12;
}
get field3() → core::int
- return this.{self::SubClass::_#SubClass#field3#isSet} ?{core::int} let final core::int? #t13 = this.{self::SubClass::_#SubClass#field3} in #t13{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'field3' has not been initialized.");
+ return this.{self::SubClass::_#SubClass#field3#isSet} ?{core::int} let final core::int? #t13 = this.{self::SubClass::_#SubClass#field3} in #t13{core::int} : throw new _in::LateError::fieldNI("field3");
set field3(core::int #t14) → void
if(this.{self::SubClass::_#SubClass#field3#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'field3' has already been initialized.");
+ throw new _in::LateError::fieldAI("field3");
else {
this.{self::SubClass::_#SubClass#field3#isSet} = true;
this.{self::SubClass::_#SubClass#field3} = #t14;
@@ -88,7 +88,7 @@
if(!this.{self::SubClass::_#SubClass#field4#isSet}) {
final core::int #t15 = 0;
if(this.{self::SubClass::_#SubClass#field4#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'field4' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("field4");
this.{self::SubClass::_#SubClass#field4} = #t15;
this.{self::SubClass::_#SubClass#field4#isSet} = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/override_getter_setter.dart.strong.expect b/pkg/front_end/testcases/late_lowering/override_getter_setter.dart.strong.expect
index 6e5f0ef..a40aad4 100644
--- a/pkg/front_end/testcases/late_lowering/override_getter_setter.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/override_getter_setter.dart.strong.expect
@@ -11,17 +11,17 @@
: super core::Object::•()
;
get x() → core::int
- return let final core::int? #t1 = this.{self::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("x") : #t1{core::int};
set x(core::int #t2) → void
if(this.{self::A::_#A#x}.==(null))
this.{self::A::_#A#x} = #t2;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'x' has already been initialized.");
+ throw new _in::LateError::fieldAI("x");
get y() → core::int?
- return this.{self::A::_#A#y#isSet} ?{core::int?} this.{self::A::_#A#y} : throw new _in::LateInitializationErrorImpl::•("Field 'y' has not been initialized.");
+ return this.{self::A::_#A#y#isSet} ?{core::int?} this.{self::A::_#A#y} : throw new _in::LateError::fieldNI("y");
set y(core::int? #t3) → void
if(this.{self::A::_#A#y#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'y' has already been initialized.");
+ throw new _in::LateError::fieldAI("y");
else {
this.{self::A::_#A#y#isSet} = true;
this.{self::A::_#A#y} = #t3;
@@ -44,12 +44,12 @@
: super self::A::•()
;
get x() → core::int
- return let final core::int? #t4 = this.{self::C::_#C#x} in #t4.==(null) ?{core::int} let final core::int #t5 = 2 in this.{self::C::_#C#x}.==(null) ?{core::int} this.{self::C::_#C#x} = #t5 : throw new _in::LateInitializationErrorImpl::•("Field 'x' has been assigned during initialization.") : #t4{core::int};
+ return let final core::int? #t4 = this.{self::C::_#C#x} in #t4.==(null) ?{core::int} let final core::int #t5 = 2 in this.{self::C::_#C#x}.==(null) ?{core::int} this.{self::C::_#C#x} = #t5 : throw new _in::LateError::fieldADI("x") : #t4{core::int};
get y() → core::int? {
if(!this.{self::C::_#C#y#isSet}) {
final core::int? #t6 = 2;
if(this.{self::C::_#C#y#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'y' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("y");
this.{self::C::_#C#y} = #t6;
this.{self::C::_#C#y#isSet} = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/override_getter_setter.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/override_getter_setter.dart.strong.transformed.expect
index 6466db6..270a287 100644
--- a/pkg/front_end/testcases/late_lowering/override_getter_setter.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/override_getter_setter.dart.strong.transformed.expect
@@ -11,17 +11,17 @@
: super core::Object::•()
;
get x() → core::int
- return let final core::int? #t1 = this.{self::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("x") : #t1{core::int};
set x(core::int #t2) → void
if(this.{self::A::_#A#x}.==(null))
this.{self::A::_#A#x} = #t2;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'x' has already been initialized.");
+ throw new _in::LateError::fieldAI("x");
get y() → core::int?
- return this.{self::A::_#A#y#isSet} ?{core::int?} this.{self::A::_#A#y} : throw new _in::LateInitializationErrorImpl::•("Field 'y' has not been initialized.");
+ return this.{self::A::_#A#y#isSet} ?{core::int?} this.{self::A::_#A#y} : throw new _in::LateError::fieldNI("y");
set y(core::int? #t3) → void
if(this.{self::A::_#A#y#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'y' has already been initialized.");
+ throw new _in::LateError::fieldAI("y");
else {
this.{self::A::_#A#y#isSet} = true;
this.{self::A::_#A#y} = #t3;
@@ -44,12 +44,12 @@
: super self::A::•()
;
get x() → core::int
- return let final core::int? #t4 = this.{self::C::_#C#x} in #t4.==(null) ?{core::int} let final core::int #t5 = 2 in this.{self::C::_#C#x}.==(null) ?{core::int} this.{self::C::_#C#x} = #t5 : throw new _in::LateInitializationErrorImpl::•("Field 'x' has been assigned during initialization.") : #t4{core::int};
+ return let final core::int? #t4 = this.{self::C::_#C#x} in #t4.==(null) ?{core::int} let final core::int #t5 = 2 in this.{self::C::_#C#x}.==(null) ?{core::int} this.{self::C::_#C#x} = #t5 : throw new _in::LateError::fieldADI("x") : #t4{core::int};
get y() → core::int? {
if(!this.{self::C::_#C#y#isSet}) {
final core::int? #t6 = 2;
if(this.{self::C::_#C#y#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'y' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("y");
this.{self::C::_#C#y} = #t6;
this.{self::C::_#C#y#isSet} = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/override_getter_setter.dart.weak.expect b/pkg/front_end/testcases/late_lowering/override_getter_setter.dart.weak.expect
index e51321c..ed7604c 100644
--- a/pkg/front_end/testcases/late_lowering/override_getter_setter.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/override_getter_setter.dart.weak.expect
@@ -12,19 +12,19 @@
: super core::Object::•()
;
get x() → core::int
- return this.{self::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#x} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.");
+ return this.{self::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#x} in #t1{core::int} : throw new _in::LateError::fieldNI("x");
set x(core::int #t2) → void
if(this.{self::A::_#A#x#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'x' has already been initialized.");
+ throw new _in::LateError::fieldAI("x");
else {
this.{self::A::_#A#x#isSet} = true;
this.{self::A::_#A#x} = #t2;
}
get y() → core::int?
- return this.{self::A::_#A#y#isSet} ?{core::int?} this.{self::A::_#A#y} : throw new _in::LateInitializationErrorImpl::•("Field 'y' has not been initialized.");
+ return this.{self::A::_#A#y#isSet} ?{core::int?} this.{self::A::_#A#y} : throw new _in::LateError::fieldNI("y");
set y(core::int? #t3) → void
if(this.{self::A::_#A#y#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'y' has already been initialized.");
+ throw new _in::LateError::fieldAI("y");
else {
this.{self::A::_#A#y#isSet} = true;
this.{self::A::_#A#y} = #t3;
@@ -51,7 +51,7 @@
if(!this.{self::C::_#C#x#isSet}) {
final core::int #t4 = 2;
if(this.{self::C::_#C#x#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'x' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("x");
this.{self::C::_#C#x} = #t4;
this.{self::C::_#C#x#isSet} = true;
}
@@ -61,7 +61,7 @@
if(!this.{self::C::_#C#y#isSet}) {
final core::int? #t6 = 2;
if(this.{self::C::_#C#y#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'y' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("y");
this.{self::C::_#C#y} = #t6;
this.{self::C::_#C#y#isSet} = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/override_getter_setter.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/override_getter_setter.dart.weak.transformed.expect
index e51321c..ed7604c 100644
--- a/pkg/front_end/testcases/late_lowering/override_getter_setter.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/override_getter_setter.dart.weak.transformed.expect
@@ -12,19 +12,19 @@
: super core::Object::•()
;
get x() → core::int
- return this.{self::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#x} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.");
+ return this.{self::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#x} in #t1{core::int} : throw new _in::LateError::fieldNI("x");
set x(core::int #t2) → void
if(this.{self::A::_#A#x#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'x' has already been initialized.");
+ throw new _in::LateError::fieldAI("x");
else {
this.{self::A::_#A#x#isSet} = true;
this.{self::A::_#A#x} = #t2;
}
get y() → core::int?
- return this.{self::A::_#A#y#isSet} ?{core::int?} this.{self::A::_#A#y} : throw new _in::LateInitializationErrorImpl::•("Field 'y' has not been initialized.");
+ return this.{self::A::_#A#y#isSet} ?{core::int?} this.{self::A::_#A#y} : throw new _in::LateError::fieldNI("y");
set y(core::int? #t3) → void
if(this.{self::A::_#A#y#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'y' has already been initialized.");
+ throw new _in::LateError::fieldAI("y");
else {
this.{self::A::_#A#y#isSet} = true;
this.{self::A::_#A#y} = #t3;
@@ -51,7 +51,7 @@
if(!this.{self::C::_#C#x#isSet}) {
final core::int #t4 = 2;
if(this.{self::C::_#C#x#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'x' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("x");
this.{self::C::_#C#x} = #t4;
this.{self::C::_#C#x#isSet} = true;
}
@@ -61,7 +61,7 @@
if(!this.{self::C::_#C#y#isSet}) {
final core::int? #t6 = 2;
if(this.{self::C::_#C#y#isSet})
- throw new _in::LateInitializationErrorImpl::•("Field 'y' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("y");
this.{self::C::_#C#y} = #t6;
this.{self::C::_#C#y#isSet} = true;
}
diff --git a/pkg/front_end/testcases/late_lowering/uninitialized_non_nullable_late_fields.dart.strong.expect b/pkg/front_end/testcases/late_lowering/uninitialized_non_nullable_late_fields.dart.strong.expect
index 2829fae..8297049 100644
--- a/pkg/front_end/testcases/late_lowering/uninitialized_non_nullable_late_fields.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/uninitialized_non_nullable_late_fields.dart.strong.expect
@@ -12,7 +12,7 @@
: super core::Object::•()
;
get x() → core::int
- return let final core::int? #t1 = this.{self::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("x") : #t1{core::int};
set x(core::int #t2) → void
this.{self::A::_#A#x} = #t2;
}
diff --git a/pkg/front_end/testcases/late_lowering/uninitialized_non_nullable_late_fields.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/uninitialized_non_nullable_late_fields.dart.strong.transformed.expect
index 2829fae..8297049 100644
--- a/pkg/front_end/testcases/late_lowering/uninitialized_non_nullable_late_fields.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/uninitialized_non_nullable_late_fields.dart.strong.transformed.expect
@@ -12,7 +12,7 @@
: super core::Object::•()
;
get x() → core::int
- return let final core::int? #t1 = this.{self::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.") : #t1{core::int};
+ return let final core::int? #t1 = this.{self::A::_#A#x} in #t1.==(null) ?{core::int} throw new _in::LateError::fieldNI("x") : #t1{core::int};
set x(core::int #t2) → void
this.{self::A::_#A#x} = #t2;
}
diff --git a/pkg/front_end/testcases/late_lowering/uninitialized_non_nullable_late_fields.dart.weak.expect b/pkg/front_end/testcases/late_lowering/uninitialized_non_nullable_late_fields.dart.weak.expect
index 327729a..1f6e81c 100644
--- a/pkg/front_end/testcases/late_lowering/uninitialized_non_nullable_late_fields.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/uninitialized_non_nullable_late_fields.dart.weak.expect
@@ -13,7 +13,7 @@
: super core::Object::•()
;
get x() → core::int
- return this.{self::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#x} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.");
+ return this.{self::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#x} in #t1{core::int} : throw new _in::LateError::fieldNI("x");
set x(core::int #t2) → void {
this.{self::A::_#A#x#isSet} = true;
this.{self::A::_#A#x} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering/uninitialized_non_nullable_late_fields.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/uninitialized_non_nullable_late_fields.dart.weak.transformed.expect
index 327729a..1f6e81c 100644
--- a/pkg/front_end/testcases/late_lowering/uninitialized_non_nullable_late_fields.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/uninitialized_non_nullable_late_fields.dart.weak.transformed.expect
@@ -13,7 +13,7 @@
: super core::Object::•()
;
get x() → core::int
- return this.{self::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#x} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'x' has not been initialized.");
+ return this.{self::A::_#A#x#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#x} in #t1{core::int} : throw new _in::LateError::fieldNI("x");
set x(core::int #t2) → void {
this.{self::A::_#A#x#isSet} = true;
this.{self::A::_#A#x} = #t2;
diff --git a/pkg/front_end/testcases/late_lowering_sentinel/late_fields.dart.strong.expect b/pkg/front_end/testcases/late_lowering_sentinel/late_fields.dart.strong.expect
index 2bd9072..5b254e4 100644
--- a/pkg/front_end/testcases/late_lowering_sentinel/late_fields.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering_sentinel/late_fields.dart.strong.expect
@@ -12,11 +12,11 @@
static field core::int? _#nullableFinalTopLevelFieldWithInitializer = _in::createSentinel<core::int?>();
static field core::int? _#nonNullableFinalTopLevelFieldWithInitializer = null;
static get nullableTopLevelField() → core::int?
- return let final core::int? #t1 = self::_#nullableTopLevelField in _in::isSentinel(#t1) ?{core::int?} throw new _in::LateInitializationErrorImpl::•("Field 'nullableTopLevelField' has not been initialized.") : #t1{core::int?};
+ return let final core::int? #t1 = self::_#nullableTopLevelField in _in::isSentinel(#t1) ?{core::int?} throw new _in::LateError::fieldNI("nullableTopLevelField") : #t1{core::int?};
static set nullableTopLevelField(core::int? #t2) → void
self::_#nullableTopLevelField = #t2;
static get nonNullableTopLevelField() → core::int
- return let final core::int? #t3 = self::_#nonNullableTopLevelField in #t3.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableTopLevelField' has not been initialized.") : #t3{core::int};
+ return let final core::int? #t3 = self::_#nonNullableTopLevelField in #t3.==(null) ?{core::int} throw new _in::LateError::fieldNI("nonNullableTopLevelField") : #t3{core::int};
static set nonNullableTopLevelField(core::int #t4) → void
self::_#nonNullableTopLevelField = #t4;
static get nullableTopLevelFieldWithInitializer() → core::int?
@@ -28,21 +28,21 @@
static set nonNullableTopLevelFieldWithInitializer(core::int #t8) → void
self::_#nonNullableTopLevelFieldWithInitializer = #t8;
static get nullableFinalTopLevelField() → core::int?
- return let final core::int? #t9 = self::_#nullableFinalTopLevelField in _in::isSentinel(#t9) ?{core::int?} throw new _in::LateInitializationErrorImpl::•("Field 'nullableFinalTopLevelField' has not been initialized.") : #t9{core::int?};
+ return let final core::int? #t9 = self::_#nullableFinalTopLevelField in _in::isSentinel(#t9) ?{core::int?} throw new _in::LateError::fieldNI("nullableFinalTopLevelField") : #t9{core::int?};
static set nullableFinalTopLevelField(core::int? #t10) → void
if(_in::isSentinel(self::_#nullableFinalTopLevelField))
self::_#nullableFinalTopLevelField = #t10;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableFinalTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("nullableFinalTopLevelField");
static get nonNullableFinalTopLevelField() → core::int
- return let final core::int? #t11 = self::_#nonNullableFinalTopLevelField in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableFinalTopLevelField' has not been initialized.") : #t11{core::int};
+ return let final core::int? #t11 = self::_#nonNullableFinalTopLevelField in #t11.==(null) ?{core::int} throw new _in::LateError::fieldNI("nonNullableFinalTopLevelField") : #t11{core::int};
static set nonNullableFinalTopLevelField(core::int #t12) → void
if(self::_#nonNullableFinalTopLevelField.==(null))
self::_#nonNullableFinalTopLevelField = #t12;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableFinalTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("nonNullableFinalTopLevelField");
static get nullableFinalTopLevelFieldWithInitializer() → core::int?
- return let final core::int? #t13 = self::_#nullableFinalTopLevelFieldWithInitializer in _in::isSentinel(#t13) ?{core::int?} let final core::int? #t14 = null in _in::isSentinel(self::_#nullableFinalTopLevelFieldWithInitializer) ?{core::int?} self::_#nullableFinalTopLevelFieldWithInitializer = #t14 : throw new _in::LateInitializationErrorImpl::•("Field 'nullableFinalTopLevelFieldWithInitializer' has been assigned during initialization.") : #t13;
+ return let final core::int? #t13 = self::_#nullableFinalTopLevelFieldWithInitializer in _in::isSentinel(#t13) ?{core::int?} let final core::int? #t14 = null in _in::isSentinel(self::_#nullableFinalTopLevelFieldWithInitializer) ?{core::int?} self::_#nullableFinalTopLevelFieldWithInitializer = #t14 : throw new _in::LateError::fieldADI("nullableFinalTopLevelFieldWithInitializer") : #t13;
static get nonNullableFinalTopLevelFieldWithInitializer() → core::int
- return let final core::int? #t15 = self::_#nonNullableFinalTopLevelFieldWithInitializer in #t15.==(null) ?{core::int} let final core::int #t16 = 0 in self::_#nonNullableFinalTopLevelFieldWithInitializer.==(null) ?{core::int} self::_#nonNullableFinalTopLevelFieldWithInitializer = #t16 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableFinalTopLevelFieldWithInitializer' has been assigned during initialization.") : #t15{core::int};
+ return let final core::int? #t15 = self::_#nonNullableFinalTopLevelFieldWithInitializer in #t15.==(null) ?{core::int} let final core::int #t16 = 0 in self::_#nonNullableFinalTopLevelFieldWithInitializer.==(null) ?{core::int} self::_#nonNullableFinalTopLevelFieldWithInitializer = #t16 : throw new _in::LateError::fieldADI("nonNullableFinalTopLevelFieldWithInitializer") : #t15{core::int};
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/late_lowering_sentinel/late_fields.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering_sentinel/late_fields.dart.strong.transformed.expect
index 6d153d9..0a63f7d 100644
--- a/pkg/front_end/testcases/late_lowering_sentinel/late_fields.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering_sentinel/late_fields.dart.strong.transformed.expect
@@ -12,11 +12,11 @@
static field core::int? _#nullableFinalTopLevelFieldWithInitializer = _in::createSentinel<core::int?>();
static field core::int? _#nonNullableFinalTopLevelFieldWithInitializer = null;
static get nullableTopLevelField() → core::int?
- return let final core::int? #t1 = self::_#nullableTopLevelField in _in::isSentinel(#t1) ?{core::int?} throw new _in::LateInitializationErrorImpl::•("Field 'nullableTopLevelField' has not been initialized.") : #t1{core::int?};
+ return let final core::int? #t1 = self::_#nullableTopLevelField in _in::isSentinel(#t1) ?{core::int?} throw new _in::LateError::fieldNI("nullableTopLevelField") : #t1{core::int?};
static set nullableTopLevelField(core::int? #t2) → void
self::_#nullableTopLevelField = #t2;
static get nonNullableTopLevelField() → core::int
- return let final core::int? #t3 = self::_#nonNullableTopLevelField in #t3.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableTopLevelField' has not been initialized.") : #t3{core::int};
+ return let final core::int? #t3 = self::_#nonNullableTopLevelField in #t3.==(null) ?{core::int} throw new _in::LateError::fieldNI("nonNullableTopLevelField") : #t3{core::int};
static set nonNullableTopLevelField(core::int #t4) → void
self::_#nonNullableTopLevelField = #t4;
static get nullableTopLevelFieldWithInitializer() → core::int?
@@ -28,23 +28,23 @@
static set nonNullableTopLevelFieldWithInitializer(core::int #t8) → void
self::_#nonNullableTopLevelFieldWithInitializer = #t8;
static get nullableFinalTopLevelField() → core::int?
- return let final core::int? #t9 = self::_#nullableFinalTopLevelField in _in::isSentinel(#t9) ?{core::int?} throw new _in::LateInitializationErrorImpl::•("Field 'nullableFinalTopLevelField' has not been initialized.") : #t9{core::int?};
+ return let final core::int? #t9 = self::_#nullableFinalTopLevelField in _in::isSentinel(#t9) ?{core::int?} throw new _in::LateError::fieldNI("nullableFinalTopLevelField") : #t9{core::int?};
static set nullableFinalTopLevelField(core::int? #t10) → void
if(_in::isSentinel(self::_#nullableFinalTopLevelField))
self::_#nullableFinalTopLevelField = #t10;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableFinalTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("nullableFinalTopLevelField");
static get nonNullableFinalTopLevelField() → core::int
- return let final core::int? #t11 = self::_#nonNullableFinalTopLevelField in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableFinalTopLevelField' has not been initialized.") : #t11{core::int};
+ return let final core::int? #t11 = self::_#nonNullableFinalTopLevelField in #t11.==(null) ?{core::int} throw new _in::LateError::fieldNI("nonNullableFinalTopLevelField") : #t11{core::int};
static set nonNullableFinalTopLevelField(core::int #t12) → void
if(self::_#nonNullableFinalTopLevelField.==(null))
self::_#nonNullableFinalTopLevelField = #t12;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableFinalTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("nonNullableFinalTopLevelField");
static get nullableFinalTopLevelFieldWithInitializer() → core::int?
- return let final core::int? #t13 = self::_#nullableFinalTopLevelFieldWithInitializer in _in::isSentinel(#t13) ?{core::int?} let final core::int? #t14 = null in _in::isSentinel(self::_#nullableFinalTopLevelFieldWithInitializer) ?{core::int?} self::_#nullableFinalTopLevelFieldWithInitializer = #t14 : throw new _in::LateInitializationErrorImpl::•("Field 'nullableFinalTopLevelFieldWithInitializer' has been assigned during initialization.") : #t13;
+ return let final core::int? #t13 = self::_#nullableFinalTopLevelFieldWithInitializer in _in::isSentinel(#t13) ?{core::int?} let final core::int? #t14 = null in _in::isSentinel(self::_#nullableFinalTopLevelFieldWithInitializer) ?{core::int?} self::_#nullableFinalTopLevelFieldWithInitializer = #t14 : throw new _in::LateError::fieldADI("nullableFinalTopLevelFieldWithInitializer") : #t13;
static get nonNullableFinalTopLevelFieldWithInitializer() → core::int
- return let final core::int? #t15 = self::_#nonNullableFinalTopLevelFieldWithInitializer in #t15.==(null) ?{core::int} let final core::int #t16 = 0 in self::_#nonNullableFinalTopLevelFieldWithInitializer.==(null) ?{core::int} self::_#nonNullableFinalTopLevelFieldWithInitializer = #t16 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableFinalTopLevelFieldWithInitializer' has been assigned during initialization.") : #t15{core::int};
+ return let final core::int? #t15 = self::_#nonNullableFinalTopLevelFieldWithInitializer in #t15.==(null) ?{core::int} let final core::int #t16 = 0 in self::_#nonNullableFinalTopLevelFieldWithInitializer.==(null) ?{core::int} self::_#nonNullableFinalTopLevelFieldWithInitializer = #t16 : throw new _in::LateError::fieldADI("nonNullableFinalTopLevelFieldWithInitializer") : #t15{core::int};
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/late_lowering_sentinel/late_fields.dart.weak.expect b/pkg/front_end/testcases/late_lowering_sentinel/late_fields.dart.weak.expect
index 2bd9072..5b254e4 100644
--- a/pkg/front_end/testcases/late_lowering_sentinel/late_fields.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering_sentinel/late_fields.dart.weak.expect
@@ -12,11 +12,11 @@
static field core::int? _#nullableFinalTopLevelFieldWithInitializer = _in::createSentinel<core::int?>();
static field core::int? _#nonNullableFinalTopLevelFieldWithInitializer = null;
static get nullableTopLevelField() → core::int?
- return let final core::int? #t1 = self::_#nullableTopLevelField in _in::isSentinel(#t1) ?{core::int?} throw new _in::LateInitializationErrorImpl::•("Field 'nullableTopLevelField' has not been initialized.") : #t1{core::int?};
+ return let final core::int? #t1 = self::_#nullableTopLevelField in _in::isSentinel(#t1) ?{core::int?} throw new _in::LateError::fieldNI("nullableTopLevelField") : #t1{core::int?};
static set nullableTopLevelField(core::int? #t2) → void
self::_#nullableTopLevelField = #t2;
static get nonNullableTopLevelField() → core::int
- return let final core::int? #t3 = self::_#nonNullableTopLevelField in #t3.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableTopLevelField' has not been initialized.") : #t3{core::int};
+ return let final core::int? #t3 = self::_#nonNullableTopLevelField in #t3.==(null) ?{core::int} throw new _in::LateError::fieldNI("nonNullableTopLevelField") : #t3{core::int};
static set nonNullableTopLevelField(core::int #t4) → void
self::_#nonNullableTopLevelField = #t4;
static get nullableTopLevelFieldWithInitializer() → core::int?
@@ -28,21 +28,21 @@
static set nonNullableTopLevelFieldWithInitializer(core::int #t8) → void
self::_#nonNullableTopLevelFieldWithInitializer = #t8;
static get nullableFinalTopLevelField() → core::int?
- return let final core::int? #t9 = self::_#nullableFinalTopLevelField in _in::isSentinel(#t9) ?{core::int?} throw new _in::LateInitializationErrorImpl::•("Field 'nullableFinalTopLevelField' has not been initialized.") : #t9{core::int?};
+ return let final core::int? #t9 = self::_#nullableFinalTopLevelField in _in::isSentinel(#t9) ?{core::int?} throw new _in::LateError::fieldNI("nullableFinalTopLevelField") : #t9{core::int?};
static set nullableFinalTopLevelField(core::int? #t10) → void
if(_in::isSentinel(self::_#nullableFinalTopLevelField))
self::_#nullableFinalTopLevelField = #t10;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableFinalTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("nullableFinalTopLevelField");
static get nonNullableFinalTopLevelField() → core::int
- return let final core::int? #t11 = self::_#nonNullableFinalTopLevelField in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableFinalTopLevelField' has not been initialized.") : #t11{core::int};
+ return let final core::int? #t11 = self::_#nonNullableFinalTopLevelField in #t11.==(null) ?{core::int} throw new _in::LateError::fieldNI("nonNullableFinalTopLevelField") : #t11{core::int};
static set nonNullableFinalTopLevelField(core::int #t12) → void
if(self::_#nonNullableFinalTopLevelField.==(null))
self::_#nonNullableFinalTopLevelField = #t12;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableFinalTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("nonNullableFinalTopLevelField");
static get nullableFinalTopLevelFieldWithInitializer() → core::int?
- return let final core::int? #t13 = self::_#nullableFinalTopLevelFieldWithInitializer in _in::isSentinel(#t13) ?{core::int?} let final core::int? #t14 = null in _in::isSentinel(self::_#nullableFinalTopLevelFieldWithInitializer) ?{core::int?} self::_#nullableFinalTopLevelFieldWithInitializer = #t14 : throw new _in::LateInitializationErrorImpl::•("Field 'nullableFinalTopLevelFieldWithInitializer' has been assigned during initialization.") : #t13;
+ return let final core::int? #t13 = self::_#nullableFinalTopLevelFieldWithInitializer in _in::isSentinel(#t13) ?{core::int?} let final core::int? #t14 = null in _in::isSentinel(self::_#nullableFinalTopLevelFieldWithInitializer) ?{core::int?} self::_#nullableFinalTopLevelFieldWithInitializer = #t14 : throw new _in::LateError::fieldADI("nullableFinalTopLevelFieldWithInitializer") : #t13;
static get nonNullableFinalTopLevelFieldWithInitializer() → core::int
- return let final core::int? #t15 = self::_#nonNullableFinalTopLevelFieldWithInitializer in #t15.==(null) ?{core::int} let final core::int #t16 = 0 in self::_#nonNullableFinalTopLevelFieldWithInitializer.==(null) ?{core::int} self::_#nonNullableFinalTopLevelFieldWithInitializer = #t16 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableFinalTopLevelFieldWithInitializer' has been assigned during initialization.") : #t15{core::int};
+ return let final core::int? #t15 = self::_#nonNullableFinalTopLevelFieldWithInitializer in #t15.==(null) ?{core::int} let final core::int #t16 = 0 in self::_#nonNullableFinalTopLevelFieldWithInitializer.==(null) ?{core::int} self::_#nonNullableFinalTopLevelFieldWithInitializer = #t16 : throw new _in::LateError::fieldADI("nonNullableFinalTopLevelFieldWithInitializer") : #t15{core::int};
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/late_lowering_sentinel/late_fields.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering_sentinel/late_fields.dart.weak.transformed.expect
index 6d153d9..0a63f7d 100644
--- a/pkg/front_end/testcases/late_lowering_sentinel/late_fields.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering_sentinel/late_fields.dart.weak.transformed.expect
@@ -12,11 +12,11 @@
static field core::int? _#nullableFinalTopLevelFieldWithInitializer = _in::createSentinel<core::int?>();
static field core::int? _#nonNullableFinalTopLevelFieldWithInitializer = null;
static get nullableTopLevelField() → core::int?
- return let final core::int? #t1 = self::_#nullableTopLevelField in _in::isSentinel(#t1) ?{core::int?} throw new _in::LateInitializationErrorImpl::•("Field 'nullableTopLevelField' has not been initialized.") : #t1{core::int?};
+ return let final core::int? #t1 = self::_#nullableTopLevelField in _in::isSentinel(#t1) ?{core::int?} throw new _in::LateError::fieldNI("nullableTopLevelField") : #t1{core::int?};
static set nullableTopLevelField(core::int? #t2) → void
self::_#nullableTopLevelField = #t2;
static get nonNullableTopLevelField() → core::int
- return let final core::int? #t3 = self::_#nonNullableTopLevelField in #t3.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableTopLevelField' has not been initialized.") : #t3{core::int};
+ return let final core::int? #t3 = self::_#nonNullableTopLevelField in #t3.==(null) ?{core::int} throw new _in::LateError::fieldNI("nonNullableTopLevelField") : #t3{core::int};
static set nonNullableTopLevelField(core::int #t4) → void
self::_#nonNullableTopLevelField = #t4;
static get nullableTopLevelFieldWithInitializer() → core::int?
@@ -28,23 +28,23 @@
static set nonNullableTopLevelFieldWithInitializer(core::int #t8) → void
self::_#nonNullableTopLevelFieldWithInitializer = #t8;
static get nullableFinalTopLevelField() → core::int?
- return let final core::int? #t9 = self::_#nullableFinalTopLevelField in _in::isSentinel(#t9) ?{core::int?} throw new _in::LateInitializationErrorImpl::•("Field 'nullableFinalTopLevelField' has not been initialized.") : #t9{core::int?};
+ return let final core::int? #t9 = self::_#nullableFinalTopLevelField in _in::isSentinel(#t9) ?{core::int?} throw new _in::LateError::fieldNI("nullableFinalTopLevelField") : #t9{core::int?};
static set nullableFinalTopLevelField(core::int? #t10) → void
if(_in::isSentinel(self::_#nullableFinalTopLevelField))
self::_#nullableFinalTopLevelField = #t10;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableFinalTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("nullableFinalTopLevelField");
static get nonNullableFinalTopLevelField() → core::int
- return let final core::int? #t11 = self::_#nonNullableFinalTopLevelField in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableFinalTopLevelField' has not been initialized.") : #t11{core::int};
+ return let final core::int? #t11 = self::_#nonNullableFinalTopLevelField in #t11.==(null) ?{core::int} throw new _in::LateError::fieldNI("nonNullableFinalTopLevelField") : #t11{core::int};
static set nonNullableFinalTopLevelField(core::int #t12) → void
if(self::_#nonNullableFinalTopLevelField.==(null))
self::_#nonNullableFinalTopLevelField = #t12;
else
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableFinalTopLevelField' has already been initialized.");
+ throw new _in::LateError::fieldAI("nonNullableFinalTopLevelField");
static get nullableFinalTopLevelFieldWithInitializer() → core::int?
- return let final core::int? #t13 = self::_#nullableFinalTopLevelFieldWithInitializer in _in::isSentinel(#t13) ?{core::int?} let final core::int? #t14 = null in _in::isSentinel(self::_#nullableFinalTopLevelFieldWithInitializer) ?{core::int?} self::_#nullableFinalTopLevelFieldWithInitializer = #t14 : throw new _in::LateInitializationErrorImpl::•("Field 'nullableFinalTopLevelFieldWithInitializer' has been assigned during initialization.") : #t13;
+ return let final core::int? #t13 = self::_#nullableFinalTopLevelFieldWithInitializer in _in::isSentinel(#t13) ?{core::int?} let final core::int? #t14 = null in _in::isSentinel(self::_#nullableFinalTopLevelFieldWithInitializer) ?{core::int?} self::_#nullableFinalTopLevelFieldWithInitializer = #t14 : throw new _in::LateError::fieldADI("nullableFinalTopLevelFieldWithInitializer") : #t13;
static get nonNullableFinalTopLevelFieldWithInitializer() → core::int
- return let final core::int? #t15 = self::_#nonNullableFinalTopLevelFieldWithInitializer in #t15.==(null) ?{core::int} let final core::int #t16 = 0 in self::_#nonNullableFinalTopLevelFieldWithInitializer.==(null) ?{core::int} self::_#nonNullableFinalTopLevelFieldWithInitializer = #t16 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableFinalTopLevelFieldWithInitializer' has been assigned during initialization.") : #t15{core::int};
+ return let final core::int? #t15 = self::_#nonNullableFinalTopLevelFieldWithInitializer in #t15.==(null) ?{core::int} let final core::int #t16 = 0 in self::_#nonNullableFinalTopLevelFieldWithInitializer.==(null) ?{core::int} self::_#nonNullableFinalTopLevelFieldWithInitializer = #t16 : throw new _in::LateError::fieldADI("nonNullableFinalTopLevelFieldWithInitializer") : #t15{core::int};
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/late_lowering_sentinel/late_locals.dart.strong.expect b/pkg/front_end/testcases/late_lowering_sentinel/late_locals.dart.strong.expect
index aace5e6..d8369ba 100644
--- a/pkg/front_end/testcases/late_lowering_sentinel/late_locals.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering_sentinel/late_locals.dart.strong.expect
@@ -6,12 +6,12 @@
static method test() → dynamic {
core::int? nullableTopLevelLocal = _in::createSentinel<core::int?>();
function #nullableTopLevelLocal#get() → core::int?
- return let final core::int? #t1 = nullableTopLevelLocal in _in::isSentinel(#t1) ?{core::int?} throw new _in::LateInitializationErrorImpl::•("Local 'nullableTopLevelLocal' has not been initialized.") : #t1{core::int?};
+ return let final core::int? #t1 = nullableTopLevelLocal in _in::isSentinel(#t1) ?{core::int?} throw new _in::LateError::localNI("nullableTopLevelLocal") : #t1{core::int?};
function #nullableTopLevelLocal#set(core::int? #t2) → dynamic
return nullableTopLevelLocal = #t2;
core::int? nonNullableTopLevelLocal;
function #nonNullableTopLevelLocal#get() → core::int
- return let final core::int? #t3 = nonNullableTopLevelLocal in #t3.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'nonNullableTopLevelLocal' has not been initialized.") : #t3{core::int};
+ return let final core::int? #t3 = nonNullableTopLevelLocal in #t3.==(null) ?{core::int} throw new _in::LateError::localNI("nonNullableTopLevelLocal") : #t3{core::int};
function #nonNullableTopLevelLocal#set(core::int #t4) → dynamic
return nonNullableTopLevelLocal = #t4;
core::int? nullableTopLevelLocalWithInitializer = _in::createSentinel<core::int?>();
@@ -26,20 +26,20 @@
return nonNullableTopLevelLocalWithInitializer = #t8;
final core::int? nullableFinalTopLevelLocal = _in::createSentinel<core::int?>();
function #nullableFinalTopLevelLocal#get() → core::int?
- return let final core::int? #t9 = nullableFinalTopLevelLocal in _in::isSentinel(#t9) ?{core::int?} throw new _in::LateInitializationErrorImpl::•("Local 'nullableFinalTopLevelLocal' has not been initialized.") : #t9{core::int?};
+ return let final core::int? #t9 = nullableFinalTopLevelLocal in _in::isSentinel(#t9) ?{core::int?} throw new _in::LateError::localNI("nullableFinalTopLevelLocal") : #t9{core::int?};
function #nullableFinalTopLevelLocal#set(core::int? #t10) → dynamic
if(_in::isSentinel(nullableFinalTopLevelLocal))
return nullableFinalTopLevelLocal = #t10;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'nullableFinalTopLevelLocal' has already been initialized.");
+ throw new _in::LateError::localAI("nullableFinalTopLevelLocal");
final core::int? nonNullableFinalTopLevelLocal;
function #nonNullableFinalTopLevelLocal#get() → core::int
- return let final core::int? #t11 = nonNullableFinalTopLevelLocal in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'nonNullableFinalTopLevelLocal' has not been initialized.") : #t11{core::int};
+ return let final core::int? #t11 = nonNullableFinalTopLevelLocal in #t11.==(null) ?{core::int} throw new _in::LateError::localNI("nonNullableFinalTopLevelLocal") : #t11{core::int};
function #nonNullableFinalTopLevelLocal#set(core::int #t12) → dynamic
if(nonNullableFinalTopLevelLocal.==(null))
return nonNullableFinalTopLevelLocal = #t12;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'nonNullableFinalTopLevelLocal' has already been initialized.");
+ throw new _in::LateError::localAI("nonNullableFinalTopLevelLocal");
final core::int? nullableFinalTopLevelLocalWithInitializer = _in::createSentinel<core::int?>();
function #nullableFinalTopLevelLocalWithInitializer#get() → core::int?
return let final core::int? #t13 = nullableFinalTopLevelLocalWithInitializer in _in::isSentinel(#t13) ?{core::int?} nullableFinalTopLevelLocalWithInitializer = null : #t13{core::int?};
diff --git a/pkg/front_end/testcases/late_lowering_sentinel/late_locals.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering_sentinel/late_locals.dart.strong.transformed.expect
index aace5e6..d8369ba 100644
--- a/pkg/front_end/testcases/late_lowering_sentinel/late_locals.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering_sentinel/late_locals.dart.strong.transformed.expect
@@ -6,12 +6,12 @@
static method test() → dynamic {
core::int? nullableTopLevelLocal = _in::createSentinel<core::int?>();
function #nullableTopLevelLocal#get() → core::int?
- return let final core::int? #t1 = nullableTopLevelLocal in _in::isSentinel(#t1) ?{core::int?} throw new _in::LateInitializationErrorImpl::•("Local 'nullableTopLevelLocal' has not been initialized.") : #t1{core::int?};
+ return let final core::int? #t1 = nullableTopLevelLocal in _in::isSentinel(#t1) ?{core::int?} throw new _in::LateError::localNI("nullableTopLevelLocal") : #t1{core::int?};
function #nullableTopLevelLocal#set(core::int? #t2) → dynamic
return nullableTopLevelLocal = #t2;
core::int? nonNullableTopLevelLocal;
function #nonNullableTopLevelLocal#get() → core::int
- return let final core::int? #t3 = nonNullableTopLevelLocal in #t3.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'nonNullableTopLevelLocal' has not been initialized.") : #t3{core::int};
+ return let final core::int? #t3 = nonNullableTopLevelLocal in #t3.==(null) ?{core::int} throw new _in::LateError::localNI("nonNullableTopLevelLocal") : #t3{core::int};
function #nonNullableTopLevelLocal#set(core::int #t4) → dynamic
return nonNullableTopLevelLocal = #t4;
core::int? nullableTopLevelLocalWithInitializer = _in::createSentinel<core::int?>();
@@ -26,20 +26,20 @@
return nonNullableTopLevelLocalWithInitializer = #t8;
final core::int? nullableFinalTopLevelLocal = _in::createSentinel<core::int?>();
function #nullableFinalTopLevelLocal#get() → core::int?
- return let final core::int? #t9 = nullableFinalTopLevelLocal in _in::isSentinel(#t9) ?{core::int?} throw new _in::LateInitializationErrorImpl::•("Local 'nullableFinalTopLevelLocal' has not been initialized.") : #t9{core::int?};
+ return let final core::int? #t9 = nullableFinalTopLevelLocal in _in::isSentinel(#t9) ?{core::int?} throw new _in::LateError::localNI("nullableFinalTopLevelLocal") : #t9{core::int?};
function #nullableFinalTopLevelLocal#set(core::int? #t10) → dynamic
if(_in::isSentinel(nullableFinalTopLevelLocal))
return nullableFinalTopLevelLocal = #t10;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'nullableFinalTopLevelLocal' has already been initialized.");
+ throw new _in::LateError::localAI("nullableFinalTopLevelLocal");
final core::int? nonNullableFinalTopLevelLocal;
function #nonNullableFinalTopLevelLocal#get() → core::int
- return let final core::int? #t11 = nonNullableFinalTopLevelLocal in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'nonNullableFinalTopLevelLocal' has not been initialized.") : #t11{core::int};
+ return let final core::int? #t11 = nonNullableFinalTopLevelLocal in #t11.==(null) ?{core::int} throw new _in::LateError::localNI("nonNullableFinalTopLevelLocal") : #t11{core::int};
function #nonNullableFinalTopLevelLocal#set(core::int #t12) → dynamic
if(nonNullableFinalTopLevelLocal.==(null))
return nonNullableFinalTopLevelLocal = #t12;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'nonNullableFinalTopLevelLocal' has already been initialized.");
+ throw new _in::LateError::localAI("nonNullableFinalTopLevelLocal");
final core::int? nullableFinalTopLevelLocalWithInitializer = _in::createSentinel<core::int?>();
function #nullableFinalTopLevelLocalWithInitializer#get() → core::int?
return let final core::int? #t13 = nullableFinalTopLevelLocalWithInitializer in _in::isSentinel(#t13) ?{core::int?} nullableFinalTopLevelLocalWithInitializer = null : #t13{core::int?};
diff --git a/pkg/front_end/testcases/late_lowering_sentinel/late_locals.dart.weak.expect b/pkg/front_end/testcases/late_lowering_sentinel/late_locals.dart.weak.expect
index aace5e6..d8369ba 100644
--- a/pkg/front_end/testcases/late_lowering_sentinel/late_locals.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering_sentinel/late_locals.dart.weak.expect
@@ -6,12 +6,12 @@
static method test() → dynamic {
core::int? nullableTopLevelLocal = _in::createSentinel<core::int?>();
function #nullableTopLevelLocal#get() → core::int?
- return let final core::int? #t1 = nullableTopLevelLocal in _in::isSentinel(#t1) ?{core::int?} throw new _in::LateInitializationErrorImpl::•("Local 'nullableTopLevelLocal' has not been initialized.") : #t1{core::int?};
+ return let final core::int? #t1 = nullableTopLevelLocal in _in::isSentinel(#t1) ?{core::int?} throw new _in::LateError::localNI("nullableTopLevelLocal") : #t1{core::int?};
function #nullableTopLevelLocal#set(core::int? #t2) → dynamic
return nullableTopLevelLocal = #t2;
core::int? nonNullableTopLevelLocal;
function #nonNullableTopLevelLocal#get() → core::int
- return let final core::int? #t3 = nonNullableTopLevelLocal in #t3.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'nonNullableTopLevelLocal' has not been initialized.") : #t3{core::int};
+ return let final core::int? #t3 = nonNullableTopLevelLocal in #t3.==(null) ?{core::int} throw new _in::LateError::localNI("nonNullableTopLevelLocal") : #t3{core::int};
function #nonNullableTopLevelLocal#set(core::int #t4) → dynamic
return nonNullableTopLevelLocal = #t4;
core::int? nullableTopLevelLocalWithInitializer = _in::createSentinel<core::int?>();
@@ -26,20 +26,20 @@
return nonNullableTopLevelLocalWithInitializer = #t8;
final core::int? nullableFinalTopLevelLocal = _in::createSentinel<core::int?>();
function #nullableFinalTopLevelLocal#get() → core::int?
- return let final core::int? #t9 = nullableFinalTopLevelLocal in _in::isSentinel(#t9) ?{core::int?} throw new _in::LateInitializationErrorImpl::•("Local 'nullableFinalTopLevelLocal' has not been initialized.") : #t9{core::int?};
+ return let final core::int? #t9 = nullableFinalTopLevelLocal in _in::isSentinel(#t9) ?{core::int?} throw new _in::LateError::localNI("nullableFinalTopLevelLocal") : #t9{core::int?};
function #nullableFinalTopLevelLocal#set(core::int? #t10) → dynamic
if(_in::isSentinel(nullableFinalTopLevelLocal))
return nullableFinalTopLevelLocal = #t10;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'nullableFinalTopLevelLocal' has already been initialized.");
+ throw new _in::LateError::localAI("nullableFinalTopLevelLocal");
final core::int? nonNullableFinalTopLevelLocal;
function #nonNullableFinalTopLevelLocal#get() → core::int
- return let final core::int? #t11 = nonNullableFinalTopLevelLocal in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'nonNullableFinalTopLevelLocal' has not been initialized.") : #t11{core::int};
+ return let final core::int? #t11 = nonNullableFinalTopLevelLocal in #t11.==(null) ?{core::int} throw new _in::LateError::localNI("nonNullableFinalTopLevelLocal") : #t11{core::int};
function #nonNullableFinalTopLevelLocal#set(core::int #t12) → dynamic
if(nonNullableFinalTopLevelLocal.==(null))
return nonNullableFinalTopLevelLocal = #t12;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'nonNullableFinalTopLevelLocal' has already been initialized.");
+ throw new _in::LateError::localAI("nonNullableFinalTopLevelLocal");
final core::int? nullableFinalTopLevelLocalWithInitializer = _in::createSentinel<core::int?>();
function #nullableFinalTopLevelLocalWithInitializer#get() → core::int?
return let final core::int? #t13 = nullableFinalTopLevelLocalWithInitializer in _in::isSentinel(#t13) ?{core::int?} nullableFinalTopLevelLocalWithInitializer = null : #t13{core::int?};
diff --git a/pkg/front_end/testcases/late_lowering_sentinel/late_locals.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering_sentinel/late_locals.dart.weak.transformed.expect
index aace5e6..d8369ba 100644
--- a/pkg/front_end/testcases/late_lowering_sentinel/late_locals.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering_sentinel/late_locals.dart.weak.transformed.expect
@@ -6,12 +6,12 @@
static method test() → dynamic {
core::int? nullableTopLevelLocal = _in::createSentinel<core::int?>();
function #nullableTopLevelLocal#get() → core::int?
- return let final core::int? #t1 = nullableTopLevelLocal in _in::isSentinel(#t1) ?{core::int?} throw new _in::LateInitializationErrorImpl::•("Local 'nullableTopLevelLocal' has not been initialized.") : #t1{core::int?};
+ return let final core::int? #t1 = nullableTopLevelLocal in _in::isSentinel(#t1) ?{core::int?} throw new _in::LateError::localNI("nullableTopLevelLocal") : #t1{core::int?};
function #nullableTopLevelLocal#set(core::int? #t2) → dynamic
return nullableTopLevelLocal = #t2;
core::int? nonNullableTopLevelLocal;
function #nonNullableTopLevelLocal#get() → core::int
- return let final core::int? #t3 = nonNullableTopLevelLocal in #t3.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'nonNullableTopLevelLocal' has not been initialized.") : #t3{core::int};
+ return let final core::int? #t3 = nonNullableTopLevelLocal in #t3.==(null) ?{core::int} throw new _in::LateError::localNI("nonNullableTopLevelLocal") : #t3{core::int};
function #nonNullableTopLevelLocal#set(core::int #t4) → dynamic
return nonNullableTopLevelLocal = #t4;
core::int? nullableTopLevelLocalWithInitializer = _in::createSentinel<core::int?>();
@@ -26,20 +26,20 @@
return nonNullableTopLevelLocalWithInitializer = #t8;
final core::int? nullableFinalTopLevelLocal = _in::createSentinel<core::int?>();
function #nullableFinalTopLevelLocal#get() → core::int?
- return let final core::int? #t9 = nullableFinalTopLevelLocal in _in::isSentinel(#t9) ?{core::int?} throw new _in::LateInitializationErrorImpl::•("Local 'nullableFinalTopLevelLocal' has not been initialized.") : #t9{core::int?};
+ return let final core::int? #t9 = nullableFinalTopLevelLocal in _in::isSentinel(#t9) ?{core::int?} throw new _in::LateError::localNI("nullableFinalTopLevelLocal") : #t9{core::int?};
function #nullableFinalTopLevelLocal#set(core::int? #t10) → dynamic
if(_in::isSentinel(nullableFinalTopLevelLocal))
return nullableFinalTopLevelLocal = #t10;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'nullableFinalTopLevelLocal' has already been initialized.");
+ throw new _in::LateError::localAI("nullableFinalTopLevelLocal");
final core::int? nonNullableFinalTopLevelLocal;
function #nonNullableFinalTopLevelLocal#get() → core::int
- return let final core::int? #t11 = nonNullableFinalTopLevelLocal in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'nonNullableFinalTopLevelLocal' has not been initialized.") : #t11{core::int};
+ return let final core::int? #t11 = nonNullableFinalTopLevelLocal in #t11.==(null) ?{core::int} throw new _in::LateError::localNI("nonNullableFinalTopLevelLocal") : #t11{core::int};
function #nonNullableFinalTopLevelLocal#set(core::int #t12) → dynamic
if(nonNullableFinalTopLevelLocal.==(null))
return nonNullableFinalTopLevelLocal = #t12;
else
- throw new _in::LateInitializationErrorImpl::•("Local 'nonNullableFinalTopLevelLocal' has already been initialized.");
+ throw new _in::LateError::localAI("nonNullableFinalTopLevelLocal");
final core::int? nullableFinalTopLevelLocalWithInitializer = _in::createSentinel<core::int?>();
function #nullableFinalTopLevelLocalWithInitializer#get() → core::int?
return let final core::int? #t13 = nullableFinalTopLevelLocalWithInitializer in _in::isSentinel(#t13) ?{core::int?} nullableFinalTopLevelLocalWithInitializer = null : #t13{core::int?};
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.outline.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.outline.expect
index 71ff088..a0f941d 100644
--- a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.outline.expect
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.outline.expect
@@ -10,6 +10,8 @@
// Run 'pub outdated --mode=null-safety' to determine if versions of your
// dependencies supporting null safety are available.
//
+// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_in_package/lib/opt_in_lib.dart: Error: Loaded library is compiled with unsound null safety and cannot be used in compilation for sound null safety.
+//
library /*isNonNullableByDefault*/;
import self as self;
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.strong.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.strong.expect
index c889df0..d72b9a7 100644
--- a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.strong.expect
@@ -10,6 +10,8 @@
// Run 'pub outdated --mode=null-safety' to determine if versions of your
// dependencies supporting null safety are available.
//
+// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_in_package/lib/opt_in_lib.dart: Error: Loaded library is compiled with unsound null safety and cannot be used in compilation for sound null safety.
+//
library /*isNonNullableByDefault*/;
import self as self;
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.strong.transformed.expect
index c889df0..d72b9a7 100644
--- a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.strong.transformed.expect
@@ -10,6 +10,8 @@
// Run 'pub outdated --mode=null-safety' to determine if versions of your
// dependencies supporting null safety are available.
//
+// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_in_package/lib/opt_in_lib.dart: Error: Loaded library is compiled with unsound null safety and cannot be used in compilation for sound null safety.
+//
library /*isNonNullableByDefault*/;
import self as self;
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart
new file mode 100644
index 0000000..7f60cbd
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// @dart=2.9
+
+import 'main_lib.dart';
+
+class E1 with A, D {}
+
+class E2 = Object with A, D;
+
+abstract class C6 extends C3 implements C4 {}
+
+abstract class C8 extends C5 implements C7 {}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.textual_outline.expect
new file mode 100644
index 0000000..1763bc0
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.textual_outline.expect
@@ -0,0 +1,12 @@
+// @dart = 2.9
+import 'main_lib.dart';
+
+class E1 with A, D {}
+
+class E2 = Object with A, D;
+
+abstract class C6 extends C3 implements C4 {}
+
+abstract class C8 extends C5 implements C7 {}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..9bd7263
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.textual_outline_modelled.expect
@@ -0,0 +1,11 @@
+// @dart = 2.9
+import 'main_lib.dart';
+
+abstract class C6 extends C3 implements C4 {}
+
+abstract class C8 extends C5 implements C7 {}
+
+class E1 with A, D {}
+
+class E2 = Object with A, D;
+main() {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.expect
new file mode 100644
index 0000000..1345fdd
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.expect
@@ -0,0 +1,156 @@
+library;
+import self as self;
+import "dart:core" as core;
+import "main_lib.dart" as mai;
+
+import "org-dartlang-testcase:///main_lib.dart";
+
+abstract class _E1&Object&A = core::Object with mai::A /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_E1&Object&A*
+ : super core::Object::•()
+ ;
+ abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+ abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+ abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ abstract member-signature method toString() → core::String*; -> core::Object::toString
+ abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+ abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
+abstract class _E1&Object&A&D = self::_E1&Object&A with mai::D /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_E1&Object&A&D*
+ : super self::_E1&Object&A::•()
+ ;
+ abstract forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*;
+}
+class E1 extends self::_E1&Object&A&D {
+ synthetic constructor •() → self::E1*
+ : super self::_E1&Object&A&D::•()
+ ;
+ abstract member-signature method method(covariant core::num* i, {core::String* s = #C1}) → core::String*; -> self::_E1&Object&A&D::method
+}
+abstract class _E2&Object&A = core::Object with mai::A /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_E2&Object&A*
+ : super core::Object::•()
+ ;
+ abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+ abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+ abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ abstract member-signature method toString() → core::String*; -> core::Object::toString
+ abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+ abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
+class E2 = self::_E2&Object&A with mai::D /*hasConstConstructor*/ {
+ const synthetic constructor •() → self::E2*
+ : super self::_E2&Object&A::•()
+ ;
+ abstract forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*;
+}
+abstract class C6 extends mai::C3 implements mai::C4 {
+ synthetic constructor •() → self::C6*
+ : super mai::C3::•()
+ ;
+ abstract forwarding-stub method method2([covariant core::String* a = #C2]) → dynamic;
+ abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+ abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+ abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ abstract member-signature method toString() → core::String*; -> core::Object::toString
+ abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+ abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
+abstract class C8 extends mai::C5 implements mai::C7 {
+ synthetic constructor •() → self::C8*
+ : super mai::C5::•()
+ ;
+ abstract forwarding-stub method method2([covariant core::String* a = #C2, core::num* b = #C2]) → dynamic;
+ abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+ abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+ abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ abstract member-signature method toString() → core::String*; -> core::Object::toString
+ abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+ abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+import self as mai;
+import "dart:core" as core;
+
+abstract class Interface extends core::Object {
+ synthetic constructor •() → mai::Interface
+ : super core::Object::•()
+ ;
+ abstract method method(core::num i) → core::String;
+}
+abstract class Interface2 extends core::Object {
+ synthetic constructor •() → mai::Interface2
+ : super core::Object::•()
+ ;
+ abstract method method(covariant core::int i) → core::String;
+}
+abstract class A extends core::Object implements mai::Interface /*isMixinDeclaration*/ {
+ method method(core::num i, {core::String s = #C1}) → core::String
+ return s;
+}
+abstract class D extends core::Object implements mai::Interface, mai::Interface2 {
+ synthetic constructor •() → mai::D
+ : super core::Object::•()
+ ;
+ abstract forwarding-stub method method(covariant core::num i) → core::String;
+}
+abstract class C1 extends core::Object {
+ synthetic constructor •() → mai::C1
+ : super core::Object::•()
+ ;
+ abstract method method2() → dynamic;
+}
+abstract class C2 extends core::Object {
+ synthetic constructor •() → mai::C2
+ : super core::Object::•()
+ ;
+ abstract method method2([core::String a = #C2]) → dynamic;
+}
+abstract class C3 extends core::Object implements mai::C1, mai::C2 {
+ synthetic constructor •() → mai::C3
+ : super core::Object::•()
+ ;
+ abstract member-signature method method2([core::String a = #C2]) → dynamic; -> mai::C2::method2
+}
+abstract class C4 extends core::Object {
+ synthetic constructor •() → mai::C4
+ : super core::Object::•()
+ ;
+ abstract method method2([covariant core::String a = #C2]) → dynamic;
+}
+abstract class C5 extends mai::C3 implements mai::C4 {
+ synthetic constructor •() → mai::C5
+ : super mai::C3::•()
+ ;
+ abstract forwarding-stub method method2([covariant core::String a = #C2]) → dynamic;
+}
+abstract class C7 extends core::Object {
+ synthetic constructor •() → mai::C7
+ : super core::Object::•()
+ ;
+ abstract method method2([core::String a = #C2, core::num b = #C2]) → dynamic;
+}
+
+constants {
+ #C1 = "hello"
+ #C2 = null
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.transformed.expect
new file mode 100644
index 0000000..341bd9b
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.transformed.expect
@@ -0,0 +1,160 @@
+library;
+import self as self;
+import "dart:core" as core;
+import "main_lib.dart" as mai;
+
+import "org-dartlang-testcase:///main_lib.dart";
+
+abstract class _E1&Object&A extends core::Object implements mai::A /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_E1&Object&A*
+ : super core::Object::•()
+ ;
+ abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+ abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+ abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ abstract member-signature method toString() → core::String*; -> core::Object::toString
+ abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+ abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+ method /*isNonNullableByDefault, from org-dartlang-testcase:///main_lib.dart */ method(core::num i, {core::String s = #C1}) → core::String
+ return s;
+}
+abstract class _E1&Object&A&D extends self::_E1&Object&A implements mai::D /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_E1&Object&A&D*
+ : super self::_E1&Object&A::•()
+ ;
+ abstract forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*;
+}
+class E1 extends self::_E1&Object&A&D {
+ synthetic constructor •() → self::E1*
+ : super self::_E1&Object&A&D::•()
+ ;
+ abstract member-signature method method(covariant core::num* i, {core::String* s = #C1}) → core::String*; -> self::_E1&Object&A&D::method
+}
+abstract class _E2&Object&A extends core::Object implements mai::A /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_E2&Object&A*
+ : super core::Object::•()
+ ;
+ abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+ abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+ abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ abstract member-signature method toString() → core::String*; -> core::Object::toString
+ abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+ abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+ method /*isNonNullableByDefault, from org-dartlang-testcase:///main_lib.dart */ method(core::num i, {core::String s = #C1}) → core::String
+ return s;
+}
+class E2 extends self::_E2&Object&A implements mai::D /*isEliminatedMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::E2*
+ : super self::_E2&Object&A::•()
+ ;
+ abstract forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*;
+}
+abstract class C6 extends mai::C3 implements mai::C4 {
+ synthetic constructor •() → self::C6*
+ : super mai::C3::•()
+ ;
+ abstract forwarding-stub method method2([covariant core::String* a = #C2]) → dynamic;
+ abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+ abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+ abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ abstract member-signature method toString() → core::String*; -> core::Object::toString
+ abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+ abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
+abstract class C8 extends mai::C5 implements mai::C7 {
+ synthetic constructor •() → self::C8*
+ : super mai::C5::•()
+ ;
+ abstract forwarding-stub method method2([covariant core::String* a = #C2, core::num* b = #C2]) → dynamic;
+ abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+ abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+ abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ abstract member-signature method toString() → core::String*; -> core::Object::toString
+ abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+ abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+import self as mai;
+import "dart:core" as core;
+
+abstract class Interface extends core::Object {
+ synthetic constructor •() → mai::Interface
+ : super core::Object::•()
+ ;
+ abstract method method(core::num i) → core::String;
+}
+abstract class Interface2 extends core::Object {
+ synthetic constructor •() → mai::Interface2
+ : super core::Object::•()
+ ;
+ abstract method method(covariant core::int i) → core::String;
+}
+abstract class A extends core::Object implements mai::Interface /*isMixinDeclaration*/ {
+ method method(core::num i, {core::String s = #C1}) → core::String
+ return s;
+}
+abstract class D extends core::Object implements mai::Interface, mai::Interface2 {
+ synthetic constructor •() → mai::D
+ : super core::Object::•()
+ ;
+ abstract forwarding-stub method method(covariant core::num i) → core::String;
+}
+abstract class C1 extends core::Object {
+ synthetic constructor •() → mai::C1
+ : super core::Object::•()
+ ;
+ abstract method method2() → dynamic;
+}
+abstract class C2 extends core::Object {
+ synthetic constructor •() → mai::C2
+ : super core::Object::•()
+ ;
+ abstract method method2([core::String a = #C2]) → dynamic;
+}
+abstract class C3 extends core::Object implements mai::C1, mai::C2 {
+ synthetic constructor •() → mai::C3
+ : super core::Object::•()
+ ;
+ abstract member-signature method method2([core::String a = #C2]) → dynamic; -> mai::C2::method2
+}
+abstract class C4 extends core::Object {
+ synthetic constructor •() → mai::C4
+ : super core::Object::•()
+ ;
+ abstract method method2([covariant core::String a = #C2]) → dynamic;
+}
+abstract class C5 extends mai::C3 implements mai::C4 {
+ synthetic constructor •() → mai::C5
+ : super mai::C3::•()
+ ;
+ abstract forwarding-stub method method2([covariant core::String a = #C2]) → dynamic;
+}
+abstract class C7 extends core::Object {
+ synthetic constructor •() → mai::C7
+ : super core::Object::•()
+ ;
+ abstract method method2([core::String a = #C2, core::num b = #C2]) → dynamic;
+}
+
+constants {
+ #C1 = "hello"
+ #C2 = null
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue43988/main_lib.dart b/pkg/front_end/testcases/nnbd_mixed/issue43988/main_lib.dart
new file mode 100644
index 0000000..5291414
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue43988/main_lib.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+abstract class Interface {
+ String method(num i);
+}
+
+abstract class Interface2 {
+ String method(covariant int i);
+}
+
+mixin A implements Interface {
+ String method(num i, {String s = "hello"}) => s;
+}
+
+abstract class D implements Interface, Interface2 {}
+
+abstract class C1 {
+ method2();
+}
+
+abstract class C2 {
+ method2([String a]);
+}
+
+abstract class C3 implements C1, C2 {}
+
+abstract class C4 {
+ method2([covariant String a]);
+}
+
+abstract class C5 extends C3 implements C4 {}
+
+abstract class C7 {
+ method2([String a, num b]);
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue43988/test.options b/pkg/front_end/testcases/nnbd_mixed/issue43988/test.options
new file mode 100644
index 0000000..bfe6dc8
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue43988/test.options
@@ -0,0 +1 @@
+main_lib.dart
\ No newline at end of file
diff --git a/pkg/front_end/testcases/static_field_lowering/opt_in.dart.weak.expect b/pkg/front_end/testcases/static_field_lowering/opt_in.dart.weak.expect
index da6a3f4..c4ea2b5 100644
--- a/pkg/front_end/testcases/static_field_lowering/opt_in.dart.weak.expect
+++ b/pkg/front_end/testcases/static_field_lowering/opt_in.dart.weak.expect
@@ -79,7 +79,7 @@
if(!self::Class::_#nonNullableStaticFinalFieldWithInitializer1#isSet) {
final core::int #t7 = self::init<core::int>(73);
if(self::Class::_#nonNullableStaticFinalFieldWithInitializer1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableStaticFinalFieldWithInitializer1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableStaticFinalFieldWithInitializer1");
self::Class::_#nonNullableStaticFinalFieldWithInitializer1 = #t7;
self::Class::_#nonNullableStaticFinalFieldWithInitializer1#isSet = true;
}
@@ -89,7 +89,7 @@
if(!self::Class::_#nullableStaticFinalFieldWithInitializer1#isSet) {
final core::int? #t9 = self::init<core::int?>(19);
if(self::Class::_#nullableStaticFinalFieldWithInitializer1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableStaticFinalFieldWithInitializer1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableStaticFinalFieldWithInitializer1");
self::Class::_#nullableStaticFinalFieldWithInitializer1 = #t9;
self::Class::_#nullableStaticFinalFieldWithInitializer1#isSet = true;
}
@@ -110,7 +110,7 @@
if(!self::Class::_#nonNullableStaticFinalFieldWithInitializer2#isSet) {
final core::int #t12 = (let final core::int #t13 = self::Class::nonNullableStaticFinalFieldWithInitializer2Init in let final core::int #t14 = self::Class::nonNullableStaticFinalFieldWithInitializer2Init = #t13.{core::num::+}(1) in #t13).{core::num::==}(0) ?{core::int} self::Class::nonNullableStaticFinalFieldWithInitializer2.{core::num::+}(1) : 87;
if(self::Class::_#nonNullableStaticFinalFieldWithInitializer2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableStaticFinalFieldWithInitializer2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableStaticFinalFieldWithInitializer2");
self::Class::_#nonNullableStaticFinalFieldWithInitializer2 = #t12;
self::Class::_#nonNullableStaticFinalFieldWithInitializer2#isSet = true;
}
@@ -131,7 +131,7 @@
if(!self::Class::_#nullableStaticFinalFieldWithInitializer2#isSet) {
final core::int? #t18 = (let final core::int #t19 = self::Class::nullableStaticFinalFieldWithInitializer2Init in let final core::int #t20 = self::Class::nullableStaticFinalFieldWithInitializer2Init = #t19.{core::num::+}(1) in #t19).{core::num::==}(0) ?{core::int} self::Class::nullableStaticFinalFieldWithInitializer2!.{core::num::+}(1) : 32;
if(self::Class::_#nullableStaticFinalFieldWithInitializer2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableStaticFinalFieldWithInitializer2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableStaticFinalFieldWithInitializer2");
self::Class::_#nullableStaticFinalFieldWithInitializer2 = #t18;
self::Class::_#nullableStaticFinalFieldWithInitializer2#isSet = true;
}
@@ -213,7 +213,7 @@
if(!self::_#nonNullableFinalTopLevelFieldWithInitializer1#isSet) {
final core::int #t27 = self::init<core::int>(87);
if(self::_#nonNullableFinalTopLevelFieldWithInitializer1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableFinalTopLevelFieldWithInitializer1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableFinalTopLevelFieldWithInitializer1");
self::_#nonNullableFinalTopLevelFieldWithInitializer1 = #t27;
self::_#nonNullableFinalTopLevelFieldWithInitializer1#isSet = true;
}
@@ -223,7 +223,7 @@
if(!self::_#nullableFinalTopLevelFieldWithInitializer1#isSet) {
final core::int? #t29 = self::init<core::int?>(32);
if(self::_#nullableFinalTopLevelFieldWithInitializer1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableFinalTopLevelFieldWithInitializer1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableFinalTopLevelFieldWithInitializer1");
self::_#nullableFinalTopLevelFieldWithInitializer1 = #t29;
self::_#nullableFinalTopLevelFieldWithInitializer1#isSet = true;
}
@@ -244,7 +244,7 @@
if(!self::_#nonNullableFinalTopLevelFieldWithInitializer2#isSet) {
final core::int #t32 = (let final core::int #t33 = self::nonNullableFinalTopLevelFieldWithInitializer2Init in let final core::int #t34 = self::nonNullableFinalTopLevelFieldWithInitializer2Init = #t33.{core::num::+}(1) in #t33).{core::num::==}(0) ?{core::int} self::nonNullableFinalTopLevelFieldWithInitializer2.{core::num::+}(1) : 87;
if(self::_#nonNullableFinalTopLevelFieldWithInitializer2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableFinalTopLevelFieldWithInitializer2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableFinalTopLevelFieldWithInitializer2");
self::_#nonNullableFinalTopLevelFieldWithInitializer2 = #t32;
self::_#nonNullableFinalTopLevelFieldWithInitializer2#isSet = true;
}
@@ -265,7 +265,7 @@
if(!self::_#nullableFinalTopLevelFieldWithInitializer2#isSet) {
final core::int? #t38 = (let final core::int #t39 = self::nullableFinalTopLevelFieldWithInitializer2Init in let final core::int #t40 = self::nullableFinalTopLevelFieldWithInitializer2Init = #t39.{core::num::+}(1) in #t39).{core::num::==}(0) ?{core::int} self::nullableFinalTopLevelFieldWithInitializer2!.{core::num::+}(1) : 32;
if(self::_#nullableFinalTopLevelFieldWithInitializer2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableFinalTopLevelFieldWithInitializer2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableFinalTopLevelFieldWithInitializer2");
self::_#nullableFinalTopLevelFieldWithInitializer2 = #t38;
self::_#nullableFinalTopLevelFieldWithInitializer2#isSet = true;
}
diff --git a/pkg/front_end/testcases/static_field_lowering/opt_in.dart.weak.transformed.expect b/pkg/front_end/testcases/static_field_lowering/opt_in.dart.weak.transformed.expect
index da6a3f4..c4ea2b5 100644
--- a/pkg/front_end/testcases/static_field_lowering/opt_in.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/static_field_lowering/opt_in.dart.weak.transformed.expect
@@ -79,7 +79,7 @@
if(!self::Class::_#nonNullableStaticFinalFieldWithInitializer1#isSet) {
final core::int #t7 = self::init<core::int>(73);
if(self::Class::_#nonNullableStaticFinalFieldWithInitializer1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableStaticFinalFieldWithInitializer1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableStaticFinalFieldWithInitializer1");
self::Class::_#nonNullableStaticFinalFieldWithInitializer1 = #t7;
self::Class::_#nonNullableStaticFinalFieldWithInitializer1#isSet = true;
}
@@ -89,7 +89,7 @@
if(!self::Class::_#nullableStaticFinalFieldWithInitializer1#isSet) {
final core::int? #t9 = self::init<core::int?>(19);
if(self::Class::_#nullableStaticFinalFieldWithInitializer1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableStaticFinalFieldWithInitializer1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableStaticFinalFieldWithInitializer1");
self::Class::_#nullableStaticFinalFieldWithInitializer1 = #t9;
self::Class::_#nullableStaticFinalFieldWithInitializer1#isSet = true;
}
@@ -110,7 +110,7 @@
if(!self::Class::_#nonNullableStaticFinalFieldWithInitializer2#isSet) {
final core::int #t12 = (let final core::int #t13 = self::Class::nonNullableStaticFinalFieldWithInitializer2Init in let final core::int #t14 = self::Class::nonNullableStaticFinalFieldWithInitializer2Init = #t13.{core::num::+}(1) in #t13).{core::num::==}(0) ?{core::int} self::Class::nonNullableStaticFinalFieldWithInitializer2.{core::num::+}(1) : 87;
if(self::Class::_#nonNullableStaticFinalFieldWithInitializer2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableStaticFinalFieldWithInitializer2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableStaticFinalFieldWithInitializer2");
self::Class::_#nonNullableStaticFinalFieldWithInitializer2 = #t12;
self::Class::_#nonNullableStaticFinalFieldWithInitializer2#isSet = true;
}
@@ -131,7 +131,7 @@
if(!self::Class::_#nullableStaticFinalFieldWithInitializer2#isSet) {
final core::int? #t18 = (let final core::int #t19 = self::Class::nullableStaticFinalFieldWithInitializer2Init in let final core::int #t20 = self::Class::nullableStaticFinalFieldWithInitializer2Init = #t19.{core::num::+}(1) in #t19).{core::num::==}(0) ?{core::int} self::Class::nullableStaticFinalFieldWithInitializer2!.{core::num::+}(1) : 32;
if(self::Class::_#nullableStaticFinalFieldWithInitializer2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableStaticFinalFieldWithInitializer2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableStaticFinalFieldWithInitializer2");
self::Class::_#nullableStaticFinalFieldWithInitializer2 = #t18;
self::Class::_#nullableStaticFinalFieldWithInitializer2#isSet = true;
}
@@ -213,7 +213,7 @@
if(!self::_#nonNullableFinalTopLevelFieldWithInitializer1#isSet) {
final core::int #t27 = self::init<core::int>(87);
if(self::_#nonNullableFinalTopLevelFieldWithInitializer1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableFinalTopLevelFieldWithInitializer1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableFinalTopLevelFieldWithInitializer1");
self::_#nonNullableFinalTopLevelFieldWithInitializer1 = #t27;
self::_#nonNullableFinalTopLevelFieldWithInitializer1#isSet = true;
}
@@ -223,7 +223,7 @@
if(!self::_#nullableFinalTopLevelFieldWithInitializer1#isSet) {
final core::int? #t29 = self::init<core::int?>(32);
if(self::_#nullableFinalTopLevelFieldWithInitializer1#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableFinalTopLevelFieldWithInitializer1' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableFinalTopLevelFieldWithInitializer1");
self::_#nullableFinalTopLevelFieldWithInitializer1 = #t29;
self::_#nullableFinalTopLevelFieldWithInitializer1#isSet = true;
}
@@ -244,7 +244,7 @@
if(!self::_#nonNullableFinalTopLevelFieldWithInitializer2#isSet) {
final core::int #t32 = (let final core::int #t33 = self::nonNullableFinalTopLevelFieldWithInitializer2Init in let final core::int #t34 = self::nonNullableFinalTopLevelFieldWithInitializer2Init = #t33.{core::num::+}(1) in #t33).{core::num::==}(0) ?{core::int} self::nonNullableFinalTopLevelFieldWithInitializer2.{core::num::+}(1) : 87;
if(self::_#nonNullableFinalTopLevelFieldWithInitializer2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableFinalTopLevelFieldWithInitializer2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nonNullableFinalTopLevelFieldWithInitializer2");
self::_#nonNullableFinalTopLevelFieldWithInitializer2 = #t32;
self::_#nonNullableFinalTopLevelFieldWithInitializer2#isSet = true;
}
@@ -265,7 +265,7 @@
if(!self::_#nullableFinalTopLevelFieldWithInitializer2#isSet) {
final core::int? #t38 = (let final core::int #t39 = self::nullableFinalTopLevelFieldWithInitializer2Init in let final core::int #t40 = self::nullableFinalTopLevelFieldWithInitializer2Init = #t39.{core::num::+}(1) in #t39).{core::num::==}(0) ?{core::int} self::nullableFinalTopLevelFieldWithInitializer2!.{core::num::+}(1) : 32;
if(self::_#nullableFinalTopLevelFieldWithInitializer2#isSet)
- throw new _in::LateInitializationErrorImpl::•("Field 'nullableFinalTopLevelFieldWithInitializer2' has been assigned during initialization.");
+ throw new _in::LateError::fieldADI("nullableFinalTopLevelFieldWithInitializer2");
self::_#nullableFinalTopLevelFieldWithInitializer2 = #t38;
self::_#nullableFinalTopLevelFieldWithInitializer2#isSet = true;
}
diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status
index 452295f..674fd31 100644
--- a/pkg/front_end/testcases/strong.status
+++ b/pkg/front_end/testcases/strong.status
@@ -165,8 +165,6 @@
inference_new/infer_assign_to_property_custom: TypeCheckError
inference_new/invalid_assignment_during_toplevel_inference: TypeCheckError
late_lowering/covariant_late_field: TypeCheckError
-late_lowering/initializer_rewrite_from_opt_out: RuntimeError # Test is inherently mixed mode
-late_lowering/non_nullable_from_opt_out: RuntimeError # Test is inherently mixed mode
nnbd/covariant_late_field: TypeCheckError
nnbd/getter_vs_setter_type: TypeCheckError
nnbd/issue41180: RuntimeError # Strong mode runtime checking fails due to mixed strong mode.
@@ -176,8 +174,6 @@
nnbd/nullable_object_access: TypeCheckError
nnbd/nullable_receiver: TypeCheckError
nnbd/potentially_nullable_access: TypeCheckError
-nnbd/strong_lib_not_ok_from_dill/strong: RuntimeError
-nnbd/strong_package_not_ok_from_dill/strong: RuntimeError
rasta/abstract_constructor: RuntimeError
rasta/bad_constructor_redirection: RuntimeError
rasta/bad_continue: RuntimeError
diff --git a/pkg/front_end/testcases/text_serialization.status b/pkg/front_end/testcases/text_serialization.status
index 7d1edf3..3605015 100644
--- a/pkg/front_end/testcases/text_serialization.status
+++ b/pkg/front_end/testcases/text_serialization.status
@@ -167,8 +167,6 @@
inference_new/infer_assign_to_property_custom: TypeCheckError
inference_new/invalid_assignment_during_toplevel_inference: TypeCheckError
late_lowering/covariant_late_field: TypeCheckError
-late_lowering/initializer_rewrite_from_opt_out: RuntimeError # Test is inherently mixed mode
-late_lowering/non_nullable_from_opt_out: RuntimeError # Test is inherently mixed mode
nnbd/covariant_late_field: TypeCheckError
nnbd/getter_vs_setter_type: TypeCheckError
nnbd/issue41180: RuntimeError
@@ -178,8 +176,6 @@
nnbd/nullable_object_access: TypeCheckError
nnbd/nullable_receiver: TypeCheckError
nnbd/potentially_nullable_access: TypeCheckError
-nnbd/strong_lib_not_ok_from_dill/strong: RuntimeError
-nnbd/strong_package_not_ok_from_dill/strong: RuntimeError
rasta/abstract_constructor: RuntimeError
rasta/bad_constructor_redirection: RuntimeError
rasta/bad_continue: RuntimeError
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index ec80b02..9928ad2 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -342,7 +342,7 @@
// LIBRARIES and CLASSES
// ------------------------------------------------------------------------
-enum NonNullableByDefaultCompiledMode { Weak, Strong, Agnostic }
+enum NonNullableByDefaultCompiledMode { Weak, Strong, Agnostic, Invalid }
class Library extends NamedNode
implements Annotatable, Comparable<Library>, FileUriNode {
@@ -393,7 +393,7 @@
if (!bit1 && !bit2) return NonNullableByDefaultCompiledMode.Weak;
if (bit1 && !bit2) return NonNullableByDefaultCompiledMode.Strong;
if (bit1 && bit2) return NonNullableByDefaultCompiledMode.Agnostic;
- // !bit1 && bit2 is unused.
+ if (!bit1 && bit2) return NonNullableByDefaultCompiledMode.Invalid;
throw new StateError("Unused bit-pattern for compilation mode");
}
@@ -412,6 +412,10 @@
flags = (flags | NonNullableByDefaultModeBit1) |
NonNullableByDefaultModeBit2;
break;
+ case NonNullableByDefaultCompiledMode.Invalid:
+ flags = (flags & ~NonNullableByDefaultModeBit1) |
+ NonNullableByDefaultModeBit2;
+ break;
}
}
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
index 8153e05..6f73e68 100644
--- a/pkg/kernel/lib/binary/ast_from_binary.dart
+++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -2637,6 +2637,15 @@
if (a == null || a == b) {
return b;
}
+
+ // If something is invalid, it should always merge as invalid.
+ if (a == NonNullableByDefaultCompiledMode.Invalid) {
+ return a;
+ }
+ if (b == NonNullableByDefaultCompiledMode.Invalid) {
+ return b;
+ }
+
if (a == NonNullableByDefaultCompiledMode.Agnostic) {
return b;
}
diff --git a/pkg/kernel/lib/class_hierarchy.dart b/pkg/kernel/lib/class_hierarchy.dart
index 9f92ab0..710baf7 100644
--- a/pkg/kernel/lib/class_hierarchy.dart
+++ b/pkg/kernel/lib/class_hierarchy.dart
@@ -765,7 +765,12 @@
Member getDispatchTarget(Class class_, Name name, {bool setter: false}) {
List<Member> list =
_buildImplementedMembers(class_, infoFor(class_), setters: setter);
- return ClassHierarchy.findMemberByName(list, name);
+ Member member = ClassHierarchy.findMemberByName(list, name);
+ assert(
+ member == null || !member.isAbstract,
+ "Abstract member $member found as dispatch target "
+ "for $name on $class_");
+ return member;
}
@override
diff --git a/pkg/kernel/lib/core_types.dart b/pkg/kernel/lib/core_types.dart
index 407861c..ec578d3 100644
--- a/pkg/kernel/lib/core_types.dart
+++ b/pkg/kernel/lib/core_types.dart
@@ -96,7 +96,11 @@
Procedure _asyncErrorWrapperHelperProcedure;
Procedure _awaitHelperProcedure;
Procedure _boolFromEnvironment;
- Constructor _lateInitializationErrorConstructor;
+ Constructor _lateInitializationFieldAssignedDuringInitializationConstructor;
+ Constructor _lateInitializationFieldNotInitializedConstructor;
+ Constructor _lateInitializationLocalNotInitializedConstructor;
+ Constructor _lateInitializationFieldAlreadyInitializedConstructor;
+ Constructor _lateInitializationLocalAlreadyInitializedConstructor;
Constructor _reachabilityErrorConstructor;
/// The `dart:mirrors` library, or `null` if the component does not use it.
@@ -1226,9 +1230,30 @@
return result;
}
- Constructor get lateInitializationErrorConstructor {
- return _lateInitializationErrorConstructor ??=
- index.getMember('dart:_internal', 'LateInitializationErrorImpl', '');
+ Constructor
+ get lateInitializationFieldAssignedDuringInitializationConstructor {
+ return _lateInitializationFieldAssignedDuringInitializationConstructor ??=
+ index.getMember('dart:_internal', 'LateError', 'fieldADI');
+ }
+
+ Constructor get lateInitializationFieldNotInitializedConstructor {
+ return _lateInitializationFieldNotInitializedConstructor ??=
+ index.getMember('dart:_internal', 'LateError', 'fieldNI');
+ }
+
+ Constructor get lateInitializationLocalNotInitializedConstructor {
+ return _lateInitializationLocalNotInitializedConstructor ??=
+ index.getMember('dart:_internal', 'LateError', 'localNI');
+ }
+
+ Constructor get lateInitializationFieldAlreadyInitializedConstructor {
+ return _lateInitializationFieldAlreadyInitializedConstructor ??=
+ index.getMember('dart:_internal', 'LateError', 'fieldAI');
+ }
+
+ Constructor get lateInitializationLocalAlreadyInitializedConstructor {
+ return _lateInitializationLocalAlreadyInitializedConstructor ??=
+ index.getMember('dart:_internal', 'LateError', 'localAI');
}
Constructor get reachabilityErrorConstructor {
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.h b/runtime/vm/compiler/frontend/kernel_translation_helper.h
index 4dfed5a..ed347e5 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.h
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.h
@@ -793,7 +793,7 @@
if (!bit1 && !bit2) return NNBDCompiledMode::kWeak;
if (bit1 && !bit2) return NNBDCompiledMode::kStrong;
if (bit1 && bit2) return NNBDCompiledMode::kAgnostic;
- // !bit1 && bit2 is unused.
+ if (!bit1 && bit2) return NNBDCompiledMode::kInvalid;
UNREACHABLE();
}
diff --git a/runtime/vm/kernel_loader.cc b/runtime/vm/kernel_loader.cc
index e3860d0..4f977cc 100644
--- a/runtime/vm/kernel_loader.cc
+++ b/runtime/vm/kernel_loader.cc
@@ -1013,6 +1013,12 @@
library.set_is_nnbd(library_helper.IsNonNullableByDefault());
const NNBDCompiledMode mode =
library_helper.GetNonNullableByDefaultCompiledMode();
+ if (mode == NNBDCompiledMode::kInvalid) {
+ H.ReportError(
+ "Library '%s' was compiled in an unsupported mixed mode between sound "
+ "null safety and not sound null safety.",
+ String::Handle(library.url()).ToCString());
+ }
if (!I->null_safety() && mode == NNBDCompiledMode::kStrong) {
H.ReportError(
"Library '%s' was compiled with sound null safety (in strong mode) and "
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 28e2443..bb0b642 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -914,6 +914,7 @@
kWeak = 0,
kStrong = 1,
kAgnostic = 2,
+ kInvalid = 3,
};
class Class : public Object {
diff --git a/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart
index 13ab061..3ec1689 100644
--- a/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart
+++ b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart
@@ -44,7 +44,7 @@
}
throwLateInitializationError(String name) {
- throw internal.LateInitializationErrorImpl(name);
+ throw internal.LateError(name);
}
throwCyclicInitializationError([String? field]) {
diff --git a/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/runtime.dart b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/runtime.dart
index 3738a3d..21c6f31 100644
--- a/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/runtime.dart
+++ b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/runtime.dart
@@ -11,7 +11,7 @@
import 'dart:_debugger' show stackTraceMapper, trackCall;
import 'dart:_foreign_helper' show JS, JSExportName, rest, spread;
import 'dart:_interceptors' show JSArray, jsNull, JSFunction, NativeError;
-import 'dart:_internal' as internal show LateInitializationErrorImpl, Symbol;
+import 'dart:_internal' as internal show LateError, Symbol;
import 'dart:_js_helper'
show
AssertionErrorImpl,
diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
index 542f18b..3b29c45 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
@@ -48,7 +48,7 @@
import 'dart:_internal'
show
EfficientLengthIterable,
- LateInitializationErrorImpl,
+ LateError,
MappedIterable,
IterableElementError,
SubListIterable;
@@ -3026,5 +3026,4 @@
bool isRequired(Object? value) => identical(kRequiredSentinel, value);
/// Called by generated code to throw a LateInitializationError.
-void throwLateInitializationError(String name) =>
- throw LateInitializationErrorImpl(name);
+void throwLateInitializationError(String name) => throw LateError(name);
diff --git a/sdk/lib/internal/errors.dart b/sdk/lib/internal/errors.dart
index 93c01f1..5f8ca81 100644
--- a/sdk/lib/internal/errors.dart
+++ b/sdk/lib/internal/errors.dart
@@ -4,11 +4,29 @@
part of dart._internal;
-class LateInitializationErrorImpl extends Error
- implements LateInitializationError {
+class LateError extends Error implements LateInitializationError {
final String? _message;
- LateInitializationErrorImpl([this._message]);
+ LateError([this._message]);
+
+ // The constructor names have been deliberately shortened to reduce the size
+ // of unminified code as used by DDC.
+
+ LateError.fieldADI(String fieldName)
+ : _message =
+ "Field '$fieldName' has been assigned during initialization.";
+
+ LateError.fieldNI(String fieldName)
+ : _message = "Field '${fieldName}' has not been initialized.";
+
+ LateError.localNI(String localName)
+ : _message = "Local '${localName}' has not been initialized.";
+
+ LateError.fieldAI(String fieldName)
+ : _message = "Field '${fieldName}' has already been initialized.";
+
+ LateError.localAI(String localName)
+ : _message = "Local '${localName}' has already been initialized.";
String toString() {
var message = _message;
diff --git a/tools/VERSION b/tools/VERSION
index 5ffc271..86ee304 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 12
PATCH 0
-PRERELEASE 15
+PRERELEASE 16
PRERELEASE_PATCH 0
\ No newline at end of file