mirror of
https://github.com/dart-lang/sdk
synced 2024-09-20 00:01:59 +00:00
[cfe] Use isPureExpression to ensure temp variables are not created for this expressions
Closes #44475 Change-Id: Ie5a767448e27d2f84b90ebd0ebe2287d897fcd6d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176441 Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
This commit is contained in:
parent
5f28cb13f8
commit
706632d994
|
@ -809,8 +809,9 @@ testCascade2() {
|
|||
return new CascadeHelper()
|
||||
.. /*update: [exact=CascadeHelper]*/ a = "hello"
|
||||
.. /*update: [exact=CascadeHelper]*/ b = 42
|
||||
.. /*[exact=CascadeHelper]*/ /*update: [exact=CascadeHelper]*/ i
|
||||
/*invoke: [subclass=JSPositiveInt]*/ += 1;
|
||||
.. /*[exact=CascadeHelper]*/ i
|
||||
/*invoke: [subclass=JSPositiveInt]*/ /*update: [exact=CascadeHelper]*/ +=
|
||||
1;
|
||||
}
|
||||
|
||||
/*member: CascadeHelper.:[exact=CascadeHelper]*/
|
||||
|
|
|
@ -516,7 +516,6 @@ class PropertyAccessGenerator extends Generator {
|
|||
bool isPostIncDec: false}) {
|
||||
return new CompoundPropertySet(receiver, name, binaryOperator, value,
|
||||
forEffect: voidContext,
|
||||
readOnlyReceiver: false,
|
||||
readOffset: fileOffset,
|
||||
binaryOffset: offset,
|
||||
writeOffset: fileOffset)
|
||||
|
@ -994,19 +993,16 @@ class IndexedAccessGenerator extends Generator {
|
|||
Expression buildAssignment(Expression value, {bool voidContext: false}) {
|
||||
VariableDeclaration variable;
|
||||
Expression receiverValue;
|
||||
bool readOnlyReceiver;
|
||||
if (isNullAware) {
|
||||
variable = _forest.createVariableDeclarationForValue(receiver);
|
||||
receiverValue = _helper.createVariableGet(variable, fileOffset,
|
||||
forNullGuardedAccess: true);
|
||||
readOnlyReceiver = true;
|
||||
} else {
|
||||
receiverValue = receiver;
|
||||
readOnlyReceiver = false;
|
||||
}
|
||||
Expression result = _forest.createIndexSet(
|
||||
fileOffset, receiverValue, index, value,
|
||||
forEffect: voidContext, readOnlyReceiver: readOnlyReceiver);
|
||||
forEffect: voidContext);
|
||||
if (isNullAware) {
|
||||
result = new NullAwareMethodInvocation(variable, result)
|
||||
..fileOffset = fileOffset;
|
||||
|
@ -1019,23 +1015,19 @@ class IndexedAccessGenerator extends Generator {
|
|||
{bool voidContext: false}) {
|
||||
VariableDeclaration variable;
|
||||
Expression receiverValue;
|
||||
bool readOnlyReceiver;
|
||||
if (isNullAware) {
|
||||
variable = _forest.createVariableDeclarationForValue(receiver);
|
||||
receiverValue = _helper.createVariableGet(variable, fileOffset,
|
||||
forNullGuardedAccess: true);
|
||||
readOnlyReceiver = true;
|
||||
} else {
|
||||
receiverValue = receiver;
|
||||
readOnlyReceiver = false;
|
||||
}
|
||||
|
||||
Expression result = new IfNullIndexSet(receiverValue, index, value,
|
||||
readOffset: fileOffset,
|
||||
testOffset: offset,
|
||||
writeOffset: fileOffset,
|
||||
forEffect: voidContext,
|
||||
readOnlyReceiver: readOnlyReceiver)
|
||||
forEffect: voidContext)
|
||||
..fileOffset = offset;
|
||||
if (isNullAware) {
|
||||
result = new NullAwareMethodInvocation(variable, result)
|
||||
|
@ -1051,15 +1043,12 @@ class IndexedAccessGenerator extends Generator {
|
|||
bool isPostIncDec: false}) {
|
||||
VariableDeclaration variable;
|
||||
Expression receiverValue;
|
||||
bool readOnlyReceiver;
|
||||
if (isNullAware) {
|
||||
variable = _forest.createVariableDeclarationForValue(receiver);
|
||||
receiverValue = _helper.createVariableGet(variable, fileOffset,
|
||||
forNullGuardedAccess: true);
|
||||
readOnlyReceiver = true;
|
||||
} else {
|
||||
receiverValue = receiver;
|
||||
readOnlyReceiver = false;
|
||||
}
|
||||
|
||||
Expression result = new CompoundIndexSet(
|
||||
|
@ -1068,8 +1057,7 @@ class IndexedAccessGenerator extends Generator {
|
|||
binaryOffset: offset,
|
||||
writeOffset: fileOffset,
|
||||
forEffect: voidContext,
|
||||
forPostIncDec: isPostIncDec,
|
||||
readOnlyReceiver: readOnlyReceiver);
|
||||
forPostIncDec: isPostIncDec);
|
||||
if (isNullAware) {
|
||||
result = new NullAwareMethodInvocation(variable, result)
|
||||
..fileOffset = fileOffset;
|
||||
|
@ -1166,7 +1154,7 @@ class ThisIndexedAccessGenerator extends Generator {
|
|||
_reportNonNullableInNullAwareWarningIfNeeded();
|
||||
Expression receiver = _helper.forest.createThisExpression(fileOffset);
|
||||
return _forest.createIndexSet(fileOffset, receiver, index, value,
|
||||
forEffect: voidContext, readOnlyReceiver: true);
|
||||
forEffect: voidContext);
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -1178,8 +1166,7 @@ class ThisIndexedAccessGenerator extends Generator {
|
|||
readOffset: fileOffset,
|
||||
testOffset: offset,
|
||||
writeOffset: fileOffset,
|
||||
forEffect: voidContext,
|
||||
readOnlyReceiver: true)
|
||||
forEffect: voidContext)
|
||||
..fileOffset = offset;
|
||||
}
|
||||
|
||||
|
@ -1195,8 +1182,7 @@ class ThisIndexedAccessGenerator extends Generator {
|
|||
binaryOffset: offset,
|
||||
writeOffset: fileOffset,
|
||||
forEffect: voidContext,
|
||||
forPostIncDec: isPostIncDec,
|
||||
readOnlyReceiver: true);
|
||||
forPostIncDec: isPostIncDec);
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -1723,8 +1709,7 @@ class ExtensionInstanceAccessGenerator extends Generator {
|
|||
_helper.createVariableGet(extensionThis, fileOffset),
|
||||
writeTarget,
|
||||
value,
|
||||
forEffect: forEffect,
|
||||
readOnlyReceiver: true);
|
||||
forEffect: forEffect);
|
||||
}
|
||||
write.fileOffset = offset;
|
||||
return write;
|
||||
|
@ -2040,24 +2025,22 @@ class ExplicitExtensionInstanceAccessGenerator extends Generator {
|
|||
_helper.createVariableGet(variable, variable.fileOffset,
|
||||
forNullGuardedAccess: true),
|
||||
value,
|
||||
forEffect: voidContext,
|
||||
readOnlyReceiver: true))
|
||||
forEffect: voidContext))
|
||||
..fileOffset = fileOffset;
|
||||
} else {
|
||||
return _createWrite(fileOffset, receiver, value,
|
||||
forEffect: voidContext, readOnlyReceiver: false);
|
||||
return _createWrite(fileOffset, receiver, value, forEffect: voidContext);
|
||||
}
|
||||
}
|
||||
|
||||
Expression _createWrite(int offset, Expression receiver, Expression value,
|
||||
{bool readOnlyReceiver, bool forEffect}) {
|
||||
{bool forEffect}) {
|
||||
Expression write;
|
||||
if (writeTarget == null) {
|
||||
write = _makeInvalidWrite(value);
|
||||
} else {
|
||||
write = new ExtensionSet(
|
||||
extension, explicitTypeArguments, receiver, writeTarget, value,
|
||||
readOnlyReceiver: readOnlyReceiver, forEffect: forEffect);
|
||||
forEffect: forEffect);
|
||||
}
|
||||
write.fileOffset = offset;
|
||||
return write;
|
||||
|
@ -2077,8 +2060,7 @@ class ExplicitExtensionInstanceAccessGenerator extends Generator {
|
|||
_helper.createVariableGet(variable, receiver.fileOffset,
|
||||
forNullGuardedAccess: true),
|
||||
value,
|
||||
forEffect: voidContext,
|
||||
readOnlyReceiver: true);
|
||||
forEffect: voidContext);
|
||||
return new NullAwareExtension(
|
||||
variable,
|
||||
new IfNullSet(read, write, forEffect: voidContext)
|
||||
|
@ -2113,13 +2095,11 @@ class ExplicitExtensionInstanceAccessGenerator extends Generator {
|
|||
_helper.createVariableGet(variable, receiver.fileOffset,
|
||||
forNullGuardedAccess: true),
|
||||
binary,
|
||||
forEffect: voidContext,
|
||||
readOnlyReceiver: true);
|
||||
forEffect: voidContext);
|
||||
return new NullAwareExtension(variable, write)..fileOffset = offset;
|
||||
} else {
|
||||
return new CompoundExtensionSet(extension, explicitTypeArguments,
|
||||
receiver, targetName, readTarget, binaryOperator, value, writeTarget,
|
||||
readOnlyReceiver: false,
|
||||
forEffect: voidContext,
|
||||
readOffset: fileOffset,
|
||||
binaryOffset: offset,
|
||||
|
@ -2150,8 +2130,7 @@ class ExplicitExtensionInstanceAccessGenerator extends Generator {
|
|||
_helper.createVariableGet(variable, receiver.fileOffset,
|
||||
forNullGuardedAccess: true),
|
||||
binary,
|
||||
forEffect: voidContext,
|
||||
readOnlyReceiver: true)
|
||||
forEffect: voidContext)
|
||||
..fileOffset = fileOffset);
|
||||
return new NullAwareExtension(
|
||||
variable, new LocalPostIncDec(read, write)..fileOffset = offset)
|
||||
|
@ -2167,7 +2146,7 @@ class ExplicitExtensionInstanceAccessGenerator extends Generator {
|
|||
VariableDeclaration write = _helper.forest
|
||||
.createVariableDeclarationForValue(_createWrite(fileOffset,
|
||||
_helper.createVariableGet(variable, receiver.fileOffset), binary,
|
||||
forEffect: voidContext, readOnlyReceiver: true)
|
||||
forEffect: voidContext)
|
||||
..fileOffset = fileOffset);
|
||||
return new PropertyPostIncDec(variable, read, write)..fileOffset = offset;
|
||||
}
|
||||
|
@ -2419,15 +2398,12 @@ class ExplicitExtensionIndexedAccessGenerator extends Generator {
|
|||
{bool voidContext: false}) {
|
||||
VariableDeclaration variable;
|
||||
Expression receiverValue;
|
||||
bool readOnlyReceiver;
|
||||
if (isNullAware) {
|
||||
variable = _forest.createVariableDeclarationForValue(receiver);
|
||||
receiverValue = _helper.createVariableGet(variable, fileOffset,
|
||||
forNullGuardedAccess: true);
|
||||
readOnlyReceiver = true;
|
||||
} else {
|
||||
receiverValue = receiver;
|
||||
readOnlyReceiver = false;
|
||||
}
|
||||
Expression result = new IfNullExtensionIndexSet(
|
||||
extension,
|
||||
|
@ -2440,8 +2416,7 @@ class ExplicitExtensionIndexedAccessGenerator extends Generator {
|
|||
readOffset: fileOffset,
|
||||
testOffset: offset,
|
||||
writeOffset: fileOffset,
|
||||
forEffect: voidContext,
|
||||
readOnlyReceiver: readOnlyReceiver)
|
||||
forEffect: voidContext)
|
||||
..fileOffset = offset;
|
||||
if (isNullAware) {
|
||||
result = new NullAwareMethodInvocation(variable, result)
|
||||
|
@ -2457,15 +2432,12 @@ class ExplicitExtensionIndexedAccessGenerator extends Generator {
|
|||
bool isPostIncDec: false}) {
|
||||
VariableDeclaration variable;
|
||||
Expression receiverValue;
|
||||
bool readOnlyReceiver;
|
||||
if (isNullAware) {
|
||||
variable = _forest.createVariableDeclarationForValue(receiver);
|
||||
receiverValue = _helper.createVariableGet(variable, fileOffset,
|
||||
forNullGuardedAccess: true);
|
||||
readOnlyReceiver = true;
|
||||
} else {
|
||||
receiverValue = receiver;
|
||||
readOnlyReceiver = false;
|
||||
}
|
||||
Expression result = new CompoundExtensionIndexSet(
|
||||
extension,
|
||||
|
@ -2480,8 +2452,7 @@ class ExplicitExtensionIndexedAccessGenerator extends Generator {
|
|||
binaryOffset: offset,
|
||||
writeOffset: fileOffset,
|
||||
forEffect: voidContext,
|
||||
forPostIncDec: isPostIncDec,
|
||||
readOnlyReceiver: readOnlyReceiver);
|
||||
forPostIncDec: isPostIncDec);
|
||||
if (isNullAware) {
|
||||
result = new NullAwareMethodInvocation(variable, result)
|
||||
..fileOffset = fileOffset;
|
||||
|
|
|
@ -706,12 +706,10 @@ class Forest {
|
|||
|
||||
IndexSet createIndexSet(
|
||||
int fileOffset, Expression receiver, Expression index, Expression value,
|
||||
{bool forEffect, bool readOnlyReceiver}) {
|
||||
{bool forEffect}) {
|
||||
assert(fileOffset != null);
|
||||
assert(forEffect != null);
|
||||
assert(readOnlyReceiver != null);
|
||||
return new IndexSet(receiver, index, value,
|
||||
forEffect: forEffect, readOnlyReceiver: readOnlyReceiver)
|
||||
return new IndexSet(receiver, index, value, forEffect: forEffect)
|
||||
..fileOffset = fileOffset;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,20 +61,6 @@ class InferenceVisitor
|
|||
|
||||
InferenceVisitor(this.inferrer);
|
||||
|
||||
Expression _clone(Expression node) {
|
||||
if (node is ThisExpression) {
|
||||
return new ThisExpression()..fileOffset = node.fileOffset;
|
||||
} else if (node is VariableGet) {
|
||||
assert(
|
||||
node.variable.isFinal,
|
||||
"Trying to clone VariableGet of non-final variable"
|
||||
" ${node.variable}.");
|
||||
return new VariableGet(node.variable, node.promotedType)
|
||||
..fileOffset = node.fileOffset;
|
||||
}
|
||||
throw new UnsupportedError("Clone not supported for ${node.runtimeType}.");
|
||||
}
|
||||
|
||||
ExpressionInferenceResult _unhandledExpression(
|
||||
Expression node, DartType typeContext) {
|
||||
unhandled("${node.runtimeType}", "InferenceVisitor", node.fileOffset,
|
||||
|
@ -500,7 +486,7 @@ class InferenceVisitor
|
|||
}
|
||||
|
||||
VariableDeclaration receiverVariable;
|
||||
if (node.forEffect || node.readOnlyReceiver) {
|
||||
if (node.forEffect || isPureExpression(receiver)) {
|
||||
// No need for receiver variable.
|
||||
} else {
|
||||
receiverVariable = createVariable(receiver, receiverResult.inferredType);
|
||||
|
@ -551,9 +537,9 @@ class InferenceVisitor
|
|||
VariableDeclaration receiverVariable;
|
||||
Expression readReceiver;
|
||||
Expression writeReceiver;
|
||||
if (node.readOnlyReceiver && identical(receiver, node.receiver)) {
|
||||
if (isPureExpression(receiver)) {
|
||||
readReceiver = receiver;
|
||||
writeReceiver = _clone(receiver);
|
||||
writeReceiver = clonePureExpression(receiver);
|
||||
} else {
|
||||
receiverVariable = createVariable(receiver, receiverType);
|
||||
readReceiver = createVariableGet(receiverVariable);
|
||||
|
@ -2749,9 +2735,9 @@ class InferenceVisitor
|
|||
VariableDeclaration receiverVariable;
|
||||
Expression readReceiver;
|
||||
Expression writeReceiver;
|
||||
if (node.readOnlyReceiver && identical(receiver, node.receiver)) {
|
||||
if (isPureExpression(receiver)) {
|
||||
readReceiver = receiver;
|
||||
writeReceiver = _clone(receiver);
|
||||
writeReceiver = clonePureExpression(receiver);
|
||||
} else {
|
||||
receiverVariable = createVariable(receiver, receiverType);
|
||||
inferrer.instrumentation?.record(
|
||||
|
@ -3004,7 +2990,7 @@ class InferenceVisitor
|
|||
DartType receiverType = receiverResult.nullAwareActionType;
|
||||
|
||||
VariableDeclaration receiverVariable;
|
||||
if (!node.forEffect && !node.readOnlyReceiver) {
|
||||
if (!node.forEffect && !isPureExpression(receiver)) {
|
||||
receiverVariable = createVariable(receiver, receiverType);
|
||||
receiver = createVariableGet(receiverVariable);
|
||||
}
|
||||
|
@ -3023,7 +3009,7 @@ class InferenceVisitor
|
|||
Expression index = inferrer.ensureAssignableResult(indexType, indexResult);
|
||||
|
||||
VariableDeclaration indexVariable;
|
||||
if (!node.forEffect) {
|
||||
if (!node.forEffect && !isPureExpression(index)) {
|
||||
indexVariable = createVariable(index, indexResult.inferredType);
|
||||
index = createVariableGet(indexVariable);
|
||||
}
|
||||
|
@ -3033,9 +3019,14 @@ class InferenceVisitor
|
|||
Expression value = inferrer.ensureAssignableResult(valueType, valueResult);
|
||||
|
||||
VariableDeclaration valueVariable;
|
||||
if (!node.forEffect) {
|
||||
Expression returnedValue;
|
||||
if (node.forEffect) {
|
||||
} else if (isPureExpression(value)) {
|
||||
returnedValue = clonePureExpression(value);
|
||||
} else {
|
||||
valueVariable = createVariable(value, valueResult.inferredType);
|
||||
value = createVariableGet(valueVariable);
|
||||
returnedValue = createVariableGet(valueVariable);
|
||||
}
|
||||
|
||||
// The inferred type is that inferred type of the value expression and not
|
||||
|
@ -3049,14 +3040,15 @@ class InferenceVisitor
|
|||
if (node.forEffect) {
|
||||
replacement = assignment;
|
||||
} else {
|
||||
assert(indexVariable != null);
|
||||
assert(valueVariable != null);
|
||||
VariableDeclaration assignmentVariable =
|
||||
createVariable(assignment, const VoidType());
|
||||
replacement = createLet(
|
||||
indexVariable,
|
||||
createLet(valueVariable,
|
||||
createLet(assignmentVariable, createVariableGet(valueVariable))));
|
||||
replacement = createLet(assignmentVariable, returnedValue);
|
||||
if (valueVariable != null) {
|
||||
replacement = createLet(valueVariable, replacement);
|
||||
}
|
||||
if (indexVariable != null) {
|
||||
replacement = createLet(indexVariable, replacement);
|
||||
}
|
||||
if (receiverVariable != null) {
|
||||
replacement = createLet(receiverVariable, replacement);
|
||||
}
|
||||
|
@ -3083,14 +3075,25 @@ class InferenceVisitor
|
|||
|
||||
Expression index = inferrer.ensureAssignableResult(indexType, indexResult);
|
||||
|
||||
VariableDeclaration indexVariable =
|
||||
createVariable(index, indexResult.inferredType);
|
||||
VariableDeclaration indexVariable;
|
||||
if (!isPureExpression(index)) {
|
||||
indexVariable = createVariable(index, indexResult.inferredType);
|
||||
index = createVariableGet(indexVariable);
|
||||
}
|
||||
|
||||
ExpressionInferenceResult valueResult = inferrer
|
||||
.inferExpression(node.value, valueType, true, isVoidAllowed: true);
|
||||
Expression value = inferrer.ensureAssignableResult(valueType, valueResult);
|
||||
VariableDeclaration valueVariable =
|
||||
createVariable(value, valueResult.inferredType);
|
||||
|
||||
VariableDeclaration valueVariable;
|
||||
Expression returnedValue;
|
||||
if (isPureExpression(value)) {
|
||||
returnedValue = clonePureExpression(value);
|
||||
} else {
|
||||
valueVariable = createVariable(value, valueResult.inferredType);
|
||||
value = createVariableGet(valueVariable);
|
||||
returnedValue = createVariableGet(valueVariable);
|
||||
}
|
||||
|
||||
// The inferred type is that inferred type of the value expression and not
|
||||
// the type of the value parameter.
|
||||
|
@ -3098,8 +3101,8 @@ class InferenceVisitor
|
|||
|
||||
Expression assignment;
|
||||
if (indexSetTarget.isMissing) {
|
||||
assignment = inferrer.createMissingSuperIndexSet(node.fileOffset,
|
||||
createVariableGet(indexVariable), createVariableGet(valueVariable));
|
||||
assignment =
|
||||
inferrer.createMissingSuperIndexSet(node.fileOffset, index, value);
|
||||
} else {
|
||||
assert(indexSetTarget.isInstanceMember || indexSetTarget.isObjectMember);
|
||||
inferrer.instrumentation?.record(
|
||||
|
@ -3109,21 +3112,20 @@ class InferenceVisitor
|
|||
new InstrumentationValueForMember(node.setter));
|
||||
assignment = new SuperMethodInvocation(
|
||||
indexSetName,
|
||||
new Arguments(<Expression>[
|
||||
createVariableGet(indexVariable),
|
||||
createVariableGet(valueVariable)
|
||||
])
|
||||
new Arguments(<Expression>[index, value])
|
||||
..fileOffset = node.fileOffset,
|
||||
indexSetTarget.member)
|
||||
..fileOffset = node.fileOffset;
|
||||
}
|
||||
VariableDeclaration assignmentVariable =
|
||||
createVariable(assignment, const VoidType());
|
||||
Expression replacement = new Let(
|
||||
indexVariable,
|
||||
createLet(valueVariable,
|
||||
createLet(assignmentVariable, createVariableGet(valueVariable))))
|
||||
..fileOffset = node.fileOffset;
|
||||
Expression replacement = createLet(assignmentVariable, returnedValue);
|
||||
if (valueVariable != null) {
|
||||
replacement = createLet(valueVariable, replacement);
|
||||
}
|
||||
if (indexVariable != null) {
|
||||
replacement = createLet(indexVariable, replacement);
|
||||
}
|
||||
return new ExpressionInferenceResult(inferredType, replacement);
|
||||
}
|
||||
|
||||
|
@ -3143,8 +3145,11 @@ class InferenceVisitor
|
|||
Expression receiver =
|
||||
inferrer.ensureAssignableResult(receiverType, receiverResult);
|
||||
|
||||
VariableDeclaration receiverVariable =
|
||||
createVariable(receiver, receiverType);
|
||||
VariableDeclaration receiverVariable;
|
||||
if (!isPureExpression(receiver)) {
|
||||
receiverVariable = createVariable(receiver, receiverType);
|
||||
receiver = createVariableGet(receiverVariable);
|
||||
}
|
||||
|
||||
ObjectAccessTarget target = new ExtensionAccessTarget(
|
||||
node.setter, null, ProcedureKind.Operator, extensionTypeArguments);
|
||||
|
@ -3157,40 +3162,38 @@ class InferenceVisitor
|
|||
|
||||
Expression index = inferrer.ensureAssignableResult(indexType, indexResult);
|
||||
|
||||
VariableDeclaration indexVariable =
|
||||
createVariable(index, indexResult.inferredType);
|
||||
|
||||
ExpressionInferenceResult valueResult = inferrer
|
||||
.inferExpression(node.value, valueType, true, isVoidAllowed: true);
|
||||
Expression value = inferrer.ensureAssignableResult(valueType, valueResult);
|
||||
VariableDeclaration valueVariable =
|
||||
createVariable(value, valueResult.inferredType);
|
||||
|
||||
VariableDeclaration valueVariable;
|
||||
Expression returnedValue;
|
||||
if (isPureExpression(value)) {
|
||||
returnedValue = clonePureExpression(value);
|
||||
} else {
|
||||
valueVariable = createVariable(value, valueResult.inferredType);
|
||||
value = createVariableGet(valueVariable);
|
||||
returnedValue = createVariableGet(valueVariable);
|
||||
}
|
||||
|
||||
// The inferred type is that inferred type of the value expression and not
|
||||
// the type of the value parameter.
|
||||
DartType inferredType = valueResult.inferredType;
|
||||
|
||||
Expression assignment = _computeIndexSet(
|
||||
node.fileOffset,
|
||||
createVariableGet(receiverVariable),
|
||||
receiverType,
|
||||
target,
|
||||
createVariableGet(indexVariable),
|
||||
indexType,
|
||||
createVariableGet(valueVariable),
|
||||
valueType);
|
||||
Expression assignment = _computeIndexSet(node.fileOffset, receiver,
|
||||
receiverType, target, index, indexType, value, valueType);
|
||||
|
||||
VariableDeclaration assignmentVariable =
|
||||
createVariable(assignment, const VoidType());
|
||||
Expression replacement = new Let(
|
||||
receiverVariable,
|
||||
createLet(
|
||||
indexVariable,
|
||||
createLet(
|
||||
valueVariable,
|
||||
createLet(
|
||||
assignmentVariable, createVariableGet(valueVariable)))))
|
||||
..fileOffset = node.fileOffset;
|
||||
Expression replacement = createLet(assignmentVariable, returnedValue);
|
||||
if (valueVariable != null) {
|
||||
replacement = createLet(valueVariable, replacement);
|
||||
}
|
||||
if (receiverVariable != null) {
|
||||
replacement = createLet(receiverVariable, replacement);
|
||||
}
|
||||
replacement.fileOffset = node.fileOffset;
|
||||
|
||||
return new ExpressionInferenceResult(inferredType, replacement);
|
||||
}
|
||||
|
||||
|
@ -3207,8 +3210,8 @@ class InferenceVisitor
|
|||
VariableDeclaration receiverVariable;
|
||||
Expression readReceiver = receiver;
|
||||
Expression writeReceiver;
|
||||
if (node.readOnlyReceiver && identical(receiver, node.receiver)) {
|
||||
writeReceiver = _clone(readReceiver);
|
||||
if (isPureExpression(readReceiver)) {
|
||||
writeReceiver = clonePureExpression(readReceiver);
|
||||
} else {
|
||||
receiverVariable = createVariable(readReceiver, receiverType);
|
||||
readReceiver = createVariableGet(receiverVariable);
|
||||
|
@ -3237,9 +3240,17 @@ class InferenceVisitor
|
|||
ExpressionInferenceResult indexResult = inferrer
|
||||
.inferExpression(node.index, readIndexType, true, isVoidAllowed: true);
|
||||
|
||||
VariableDeclaration indexVariable = createVariableForResult(indexResult);
|
||||
VariableDeclaration indexVariable;
|
||||
Expression readIndex = indexResult.expression;
|
||||
Expression writeIndex;
|
||||
if (isPureExpression(readIndex)) {
|
||||
writeIndex = clonePureExpression(readIndex);
|
||||
} else {
|
||||
indexVariable = createVariable(readIndex, indexResult.inferredType);
|
||||
readIndex = createVariableGet(indexVariable);
|
||||
writeIndex = createVariableGet(indexVariable);
|
||||
}
|
||||
|
||||
Expression readIndex = createVariableGet(indexVariable);
|
||||
readIndex = inferrer.ensureAssignable(
|
||||
readIndexType, indexResult.inferredType, readIndex);
|
||||
|
||||
|
@ -3261,7 +3272,6 @@ class InferenceVisitor
|
|||
.findInterfaceMember(readType, equalsName, node.testOffset)
|
||||
.member;
|
||||
|
||||
Expression writeIndex = createVariableGet(indexVariable);
|
||||
writeIndex = inferrer.ensureAssignable(
|
||||
writeIndexType, indexResult.inferredType, writeIndex);
|
||||
|
||||
|
@ -3276,11 +3286,15 @@ class InferenceVisitor
|
|||
inferrer.library.library);
|
||||
|
||||
VariableDeclaration valueVariable;
|
||||
Expression returnedValue;
|
||||
if (node.forEffect) {
|
||||
// No need for value variable.
|
||||
} else if (isPureExpression(value)) {
|
||||
returnedValue = clonePureExpression(value);
|
||||
} else {
|
||||
valueVariable = createVariable(value, valueResult.inferredType);
|
||||
value = createVariableGet(valueVariable);
|
||||
returnedValue = createVariableGet(valueVariable);
|
||||
}
|
||||
|
||||
Expression write = _computeIndexSet(
|
||||
|
@ -3313,7 +3327,7 @@ class InferenceVisitor
|
|||
ConditionalExpression conditional = new ConditionalExpression(equalsNull,
|
||||
write, new NullLiteral()..fileOffset = node.testOffset, inferredType)
|
||||
..fileOffset = node.testOffset;
|
||||
inner = createLet(indexVariable, conditional);
|
||||
inner = conditional;
|
||||
} else {
|
||||
// Encode `Extension(o)[a] ??= b` as, if `node.readOnlyReceiver` is false,
|
||||
// as:
|
||||
|
@ -3339,8 +3353,6 @@ class InferenceVisitor
|
|||
// : readVariable
|
||||
//
|
||||
//
|
||||
assert(valueVariable != null);
|
||||
|
||||
VariableDeclaration readVariable = createVariable(read, readType);
|
||||
Expression equalsNull = inferrer.createEqualsNull(
|
||||
node.testOffset, createVariableGet(readVariable), equalsMember);
|
||||
|
@ -3351,14 +3363,17 @@ class InferenceVisitor
|
|||
!identical(nonNullableReadType, readType)) {
|
||||
variableGet.promotedType = nonNullableReadType;
|
||||
}
|
||||
Expression result = createLet(writeVariable, returnedValue);
|
||||
if (valueVariable != null) {
|
||||
result = createLet(valueVariable, result);
|
||||
}
|
||||
ConditionalExpression conditional = new ConditionalExpression(
|
||||
equalsNull,
|
||||
createLet(valueVariable,
|
||||
createLet(writeVariable, createVariableGet(valueVariable))),
|
||||
variableGet,
|
||||
inferredType)
|
||||
equalsNull, result, variableGet, inferredType)
|
||||
..fileOffset = node.fileOffset;
|
||||
inner = createLet(indexVariable, createLet(readVariable, conditional));
|
||||
inner = createLet(readVariable, conditional);
|
||||
}
|
||||
if (indexVariable != null) {
|
||||
inner = createLet(indexVariable, inner);
|
||||
}
|
||||
|
||||
Expression replacement;
|
||||
|
@ -3402,13 +3417,20 @@ class InferenceVisitor
|
|||
ExpressionInferenceResult indexResult = inferrer
|
||||
.inferExpression(node.index, readIndexType, true, isVoidAllowed: true);
|
||||
|
||||
VariableDeclaration indexVariable = createVariableForResult(indexResult);
|
||||
VariableDeclaration indexVariable;
|
||||
Expression readIndex = indexResult.expression;
|
||||
Expression writeIndex;
|
||||
if (isPureExpression(readIndex)) {
|
||||
writeIndex = clonePureExpression(readIndex);
|
||||
} else {
|
||||
indexVariable = createVariable(readIndex, indexResult.inferredType);
|
||||
readIndex = createVariableGet(indexVariable);
|
||||
writeIndex = createVariableGet(indexVariable);
|
||||
}
|
||||
|
||||
Expression readIndex = createVariableGet(indexVariable);
|
||||
readIndex = inferrer.ensureAssignable(
|
||||
readIndexType, indexResult.inferredType, readIndex);
|
||||
|
||||
Expression writeIndex = createVariableGet(indexVariable);
|
||||
writeIndex = inferrer.ensureAssignable(
|
||||
writeIndexType, indexResult.inferredType, writeIndex);
|
||||
|
||||
|
@ -3445,11 +3467,15 @@ class InferenceVisitor
|
|||
inferrer.library.library);
|
||||
|
||||
VariableDeclaration valueVariable;
|
||||
Expression returnedValue;
|
||||
if (node.forEffect) {
|
||||
// No need for a value variable.
|
||||
} else if (isPureExpression(value)) {
|
||||
returnedValue = clonePureExpression(value);
|
||||
} else {
|
||||
valueVariable = createVariable(value, valueResult.inferredType);
|
||||
value = createVariableGet(valueVariable);
|
||||
returnedValue = createVariableGet(valueVariable);
|
||||
}
|
||||
|
||||
Expression write;
|
||||
|
@ -3479,12 +3505,12 @@ class InferenceVisitor
|
|||
// let v1 = a in
|
||||
// super[v1] == null ? super.[]=(v1, b) : null
|
||||
//
|
||||
assert(valueVariable == null);
|
||||
Expression equalsNull =
|
||||
inferrer.createEqualsNull(node.testOffset, read, equalsMember);
|
||||
ConditionalExpression conditional = new ConditionalExpression(equalsNull,
|
||||
write, new NullLiteral()..fileOffset = node.testOffset, inferredType)
|
||||
replacement = new ConditionalExpression(equalsNull, write,
|
||||
new NullLiteral()..fileOffset = node.testOffset, inferredType)
|
||||
..fileOffset = node.testOffset;
|
||||
replacement = createLet(indexVariable, conditional);
|
||||
} else {
|
||||
// Encode `o[a] ??= b` as:
|
||||
//
|
||||
|
@ -3496,29 +3522,29 @@ class InferenceVisitor
|
|||
// v3)
|
||||
// : v2
|
||||
//
|
||||
assert(valueVariable != null);
|
||||
|
||||
VariableDeclaration readVariable = createVariable(read, readType);
|
||||
Expression equalsNull = inferrer.createEqualsNull(
|
||||
node.testOffset, createVariableGet(readVariable), equalsMember);
|
||||
VariableDeclaration writeVariable =
|
||||
createVariable(write, const VoidType());
|
||||
VariableGet variableGet = createVariableGet(readVariable);
|
||||
VariableGet readVariableGet = createVariableGet(readVariable);
|
||||
if (inferrer.library.isNonNullableByDefault &&
|
||||
!identical(nonNullableReadType, readType)) {
|
||||
variableGet.promotedType = nonNullableReadType;
|
||||
readVariableGet.promotedType = nonNullableReadType;
|
||||
}
|
||||
Expression result = createLet(writeVariable, returnedValue);
|
||||
if (valueVariable != null) {
|
||||
result = createLet(valueVariable, result);
|
||||
}
|
||||
ConditionalExpression conditional = new ConditionalExpression(
|
||||
equalsNull,
|
||||
createLet(valueVariable,
|
||||
createLet(writeVariable, createVariableGet(valueVariable))),
|
||||
variableGet,
|
||||
inferredType)
|
||||
equalsNull, result, readVariableGet, inferredType)
|
||||
..fileOffset = node.fileOffset;
|
||||
replacement =
|
||||
createLet(indexVariable, createLet(readVariable, conditional));
|
||||
replacement = createLet(readVariable, conditional);
|
||||
}
|
||||
if (indexVariable != null) {
|
||||
replacement = createLet(indexVariable, replacement);
|
||||
}
|
||||
|
||||
return new ExpressionInferenceResult(inferredType, replacement);
|
||||
}
|
||||
|
||||
|
@ -3541,9 +3567,9 @@ class InferenceVisitor
|
|||
VariableDeclaration receiverVariable;
|
||||
Expression readReceiver;
|
||||
Expression writeReceiver;
|
||||
if (node.readOnlyReceiver && identical(receiver, node.receiver)) {
|
||||
if (isPureExpression(receiver)) {
|
||||
readReceiver = receiver;
|
||||
writeReceiver = _clone(receiver);
|
||||
writeReceiver = clonePureExpression(receiver);
|
||||
} else {
|
||||
receiverVariable = createVariable(receiver, receiverType);
|
||||
readReceiver = createVariableGet(receiverVariable);
|
||||
|
@ -3570,9 +3596,17 @@ class InferenceVisitor
|
|||
ExpressionInferenceResult indexResult = inferrer
|
||||
.inferExpression(node.index, readIndexType, true, isVoidAllowed: true);
|
||||
|
||||
VariableDeclaration indexVariable = createVariableForResult(indexResult);
|
||||
VariableDeclaration indexVariable;
|
||||
Expression readIndex = indexResult.expression;
|
||||
Expression writeIndex;
|
||||
if (isPureExpression(readIndex)) {
|
||||
writeIndex = clonePureExpression(readIndex);
|
||||
} else {
|
||||
indexVariable = createVariable(readIndex, indexResult.inferredType);
|
||||
readIndex = createVariableGet(indexVariable);
|
||||
writeIndex = createVariableGet(indexVariable);
|
||||
}
|
||||
|
||||
Expression readIndex = createVariableGet(indexVariable);
|
||||
readIndex = inferrer.ensureAssignable(
|
||||
readIndexType, indexResult.inferredType, readIndex);
|
||||
|
||||
|
@ -3594,7 +3628,6 @@ class InferenceVisitor
|
|||
.findInterfaceMember(readType, equalsName, node.testOffset)
|
||||
.member;
|
||||
|
||||
Expression writeIndex = createVariableGet(indexVariable);
|
||||
writeIndex = inferrer.ensureAssignable(
|
||||
writeIndexType, indexResult.inferredType, writeIndex);
|
||||
|
||||
|
@ -3609,11 +3642,15 @@ class InferenceVisitor
|
|||
inferrer.library.library);
|
||||
|
||||
VariableDeclaration valueVariable;
|
||||
Expression returnedValue;
|
||||
if (node.forEffect) {
|
||||
// No need for a value variable.
|
||||
} else if (isPureExpression(value)) {
|
||||
returnedValue = clonePureExpression(value);
|
||||
} else {
|
||||
valueVariable = createVariable(value, valueResult.inferredType);
|
||||
value = createVariableGet(valueVariable);
|
||||
returnedValue = createVariableGet(valueVariable);
|
||||
}
|
||||
|
||||
Expression write = _computeIndexSet(
|
||||
|
@ -3635,12 +3672,12 @@ class InferenceVisitor
|
|||
// receiverVariable[indexVariable] == null
|
||||
// ? receiverVariable.[]=(indexVariable, b) : null
|
||||
//
|
||||
assert(valueVariable == null);
|
||||
Expression equalsNull =
|
||||
inferrer.createEqualsNull(node.testOffset, read, equalsMember);
|
||||
ConditionalExpression conditional = new ConditionalExpression(equalsNull,
|
||||
write, new NullLiteral()..fileOffset = node.testOffset, inferredType)
|
||||
replacement = new ConditionalExpression(equalsNull, write,
|
||||
new NullLiteral()..fileOffset = node.testOffset, inferredType)
|
||||
..fileOffset = node.testOffset;
|
||||
replacement = createLet(indexVariable, conditional);
|
||||
} else {
|
||||
// Encode `Extension(o)[a] ??= b` as:
|
||||
//
|
||||
|
@ -3654,27 +3691,27 @@ class InferenceVisitor
|
|||
// valueVariable)
|
||||
// : readVariable
|
||||
//
|
||||
assert(valueVariable != null);
|
||||
|
||||
VariableDeclaration readVariable = createVariable(read, readType);
|
||||
Expression equalsNull = inferrer.createEqualsNull(
|
||||
node.testOffset, createVariableGet(readVariable), equalsMember);
|
||||
VariableDeclaration writeVariable =
|
||||
createVariable(write, const VoidType());
|
||||
VariableGet variableGet = createVariableGet(readVariable);
|
||||
VariableGet readVariableGet = createVariableGet(readVariable);
|
||||
if (inferrer.library.isNonNullableByDefault &&
|
||||
!identical(nonNullableReadType, readType)) {
|
||||
variableGet.promotedType = nonNullableReadType;
|
||||
readVariableGet.promotedType = nonNullableReadType;
|
||||
}
|
||||
Expression result = createLet(writeVariable, returnedValue);
|
||||
if (valueVariable != null) {
|
||||
result = createLet(valueVariable, result);
|
||||
}
|
||||
ConditionalExpression conditional = new ConditionalExpression(
|
||||
equalsNull,
|
||||
createLet(valueVariable,
|
||||
createLet(writeVariable, createVariableGet(valueVariable))),
|
||||
variableGet,
|
||||
inferredType)
|
||||
equalsNull, result, readVariableGet, inferredType)
|
||||
..fileOffset = node.fileOffset;
|
||||
replacement =
|
||||
createLet(indexVariable, createLet(readVariable, conditional));
|
||||
replacement = createLet(readVariable, conditional);
|
||||
}
|
||||
if (indexVariable != null) {
|
||||
replacement = createLet(indexVariable, replacement);
|
||||
}
|
||||
if (receiverVariable != null) {
|
||||
replacement = new Let(receiverVariable, replacement);
|
||||
|
@ -4384,14 +4421,12 @@ class InferenceVisitor
|
|||
case ObjectAccessTargetKind.missing:
|
||||
write = inferrer.createMissingIndexSet(
|
||||
fileOffset, receiver, receiverType, index, value,
|
||||
forEffect: true, readOnlyReceiver: true);
|
||||
forEffect: true);
|
||||
break;
|
||||
case ObjectAccessTargetKind.ambiguous:
|
||||
write = inferrer.createMissingIndexSet(
|
||||
fileOffset, receiver, receiverType, index, value,
|
||||
forEffect: true,
|
||||
readOnlyReceiver: true,
|
||||
extensionAccessCandidates: writeTarget.candidates);
|
||||
forEffect: true, extensionAccessCandidates: writeTarget.candidates);
|
||||
break;
|
||||
case ObjectAccessTargetKind.extensionMember:
|
||||
case ObjectAccessTargetKind.nullableExtensionMember:
|
||||
|
@ -4858,8 +4893,8 @@ class InferenceVisitor
|
|||
VariableDeclaration receiverVariable;
|
||||
Expression readReceiver = receiver;
|
||||
Expression writeReceiver;
|
||||
if (node.readOnlyReceiver) {
|
||||
writeReceiver = _clone(readReceiver);
|
||||
if (isPureExpression(readReceiver)) {
|
||||
writeReceiver = clonePureExpression(readReceiver);
|
||||
} else {
|
||||
receiverVariable = createVariable(readReceiver, receiverType);
|
||||
readReceiver = createVariableGet(receiverVariable);
|
||||
|
@ -4878,9 +4913,18 @@ class InferenceVisitor
|
|||
|
||||
ExpressionInferenceResult indexResult = inferrer
|
||||
.inferExpression(node.index, readIndexType, true, isVoidAllowed: true);
|
||||
VariableDeclaration indexVariable = createVariableForResult(indexResult);
|
||||
|
||||
Expression readIndex = createVariableGet(indexVariable);
|
||||
VariableDeclaration indexVariable;
|
||||
Expression readIndex = indexResult.expression;
|
||||
Expression writeIndex;
|
||||
if (isPureExpression(readIndex)) {
|
||||
writeIndex = clonePureExpression(readIndex);
|
||||
} else {
|
||||
indexVariable = createVariable(readIndex, indexResult.inferredType);
|
||||
readIndex = createVariableGet(indexVariable);
|
||||
writeIndex = createVariableGet(indexVariable);
|
||||
}
|
||||
|
||||
readIndex = inferrer.ensureAssignable(
|
||||
readIndexType, indexResult.inferredType, readIndex);
|
||||
|
||||
|
@ -4926,7 +4970,6 @@ class InferenceVisitor
|
|||
Expression binary = binaryResult.expression;
|
||||
DartType binaryType = binaryResult.inferredType;
|
||||
|
||||
Expression writeIndex = createVariableGet(indexVariable);
|
||||
writeIndex = inferrer.ensureAssignable(
|
||||
writeIndexType, indexResult.inferredType, writeIndex);
|
||||
|
||||
|
@ -4960,7 +5003,7 @@ class InferenceVisitor
|
|||
//
|
||||
// let v1 = o in let v2 = a in v1.[]=(v2, v1.[](v2) + b)
|
||||
//
|
||||
inner = createLet(indexVariable, write);
|
||||
inner = write;
|
||||
} else if (node.forPostIncDec) {
|
||||
// Encode `o[a]++` as:
|
||||
//
|
||||
|
@ -4974,10 +5017,8 @@ class InferenceVisitor
|
|||
|
||||
VariableDeclaration writeVariable =
|
||||
createVariable(write, const VoidType());
|
||||
inner = createLet(
|
||||
indexVariable,
|
||||
createLet(leftVariable,
|
||||
createLet(writeVariable, createVariableGet(leftVariable))));
|
||||
inner = createLet(leftVariable,
|
||||
createLet(writeVariable, createVariableGet(leftVariable)));
|
||||
} else {
|
||||
// Encode `o[a] += b` as:
|
||||
//
|
||||
|
@ -4991,10 +5032,11 @@ class InferenceVisitor
|
|||
|
||||
VariableDeclaration writeVariable =
|
||||
createVariable(write, const VoidType());
|
||||
inner = createLet(
|
||||
indexVariable,
|
||||
createLet(valueVariable,
|
||||
createLet(writeVariable, createVariableGet(valueVariable))));
|
||||
inner = createLet(valueVariable,
|
||||
createLet(writeVariable, createVariableGet(valueVariable)));
|
||||
}
|
||||
if (indexVariable != null) {
|
||||
inner = createLet(indexVariable, inner);
|
||||
}
|
||||
|
||||
Expression replacement;
|
||||
|
@ -5156,9 +5198,18 @@ class InferenceVisitor
|
|||
|
||||
ExpressionInferenceResult indexResult = inferrer
|
||||
.inferExpression(node.index, readIndexType, true, isVoidAllowed: true);
|
||||
VariableDeclaration indexVariable = createVariableForResult(indexResult);
|
||||
|
||||
Expression readIndex = createVariableGet(indexVariable);
|
||||
VariableDeclaration indexVariable;
|
||||
Expression readIndex = indexResult.expression;
|
||||
Expression writeIndex;
|
||||
if (isPureExpression(readIndex)) {
|
||||
writeIndex = clonePureExpression(readIndex);
|
||||
} else {
|
||||
indexVariable = createVariable(readIndex, indexResult.inferredType);
|
||||
readIndex = createVariableGet(indexVariable);
|
||||
writeIndex = createVariableGet(indexVariable);
|
||||
}
|
||||
|
||||
readIndex = inferrer.ensureAssignable(
|
||||
readIndexType, indexResult.inferredType, readIndex);
|
||||
|
||||
|
@ -5213,7 +5264,6 @@ class InferenceVisitor
|
|||
Expression binary = binaryResult.expression;
|
||||
DartType binaryType = binaryResult.inferredType;
|
||||
|
||||
Expression writeIndex = createVariableGet(indexVariable);
|
||||
writeIndex = inferrer.ensureAssignable(
|
||||
writeIndexType, indexResult.inferredType, writeIndex);
|
||||
|
||||
|
@ -5260,7 +5310,7 @@ class InferenceVisitor
|
|||
//
|
||||
// let v1 = a in super.[]=(v1, super.[](v1) + b)
|
||||
//
|
||||
replacement = createLet(indexVariable, write);
|
||||
replacement = write;
|
||||
} else if (node.forPostIncDec) {
|
||||
// Encode `super[a]++` as:
|
||||
//
|
||||
|
@ -5273,10 +5323,8 @@ class InferenceVisitor
|
|||
|
||||
VariableDeclaration writeVariable =
|
||||
createVariable(write, const VoidType());
|
||||
replacement = createLet(
|
||||
indexVariable,
|
||||
createLet(leftVariable,
|
||||
createLet(writeVariable, createVariableGet(leftVariable))));
|
||||
replacement = createLet(leftVariable,
|
||||
createLet(writeVariable, createVariableGet(leftVariable)));
|
||||
} else {
|
||||
// Encode `super[a] += b` as:
|
||||
//
|
||||
|
@ -5290,12 +5338,12 @@ class InferenceVisitor
|
|||
|
||||
VariableDeclaration writeVariable =
|
||||
createVariable(write, const VoidType());
|
||||
replacement = createLet(
|
||||
indexVariable,
|
||||
createLet(valueVariable,
|
||||
createLet(writeVariable, createVariableGet(valueVariable))));
|
||||
replacement = createLet(valueVariable,
|
||||
createLet(writeVariable, createVariableGet(valueVariable)));
|
||||
}
|
||||
if (indexVariable != null) {
|
||||
replacement = createLet(indexVariable, replacement);
|
||||
}
|
||||
|
||||
return new ExpressionInferenceResult(
|
||||
node.forPostIncDec ? readType : binaryType, replacement);
|
||||
}
|
||||
|
@ -5324,9 +5372,9 @@ class InferenceVisitor
|
|||
VariableDeclaration receiverVariable;
|
||||
Expression readReceiver;
|
||||
Expression writeReceiver;
|
||||
if (node.readOnlyReceiver && identical(receiver, node.receiver)) {
|
||||
if (isPureExpression(receiver)) {
|
||||
readReceiver = receiver;
|
||||
writeReceiver = _clone(receiver);
|
||||
writeReceiver = clonePureExpression(receiver);
|
||||
} else {
|
||||
receiverVariable = createVariable(receiver, receiverType);
|
||||
readReceiver = createVariableGet(receiverVariable);
|
||||
|
@ -5337,9 +5385,18 @@ class InferenceVisitor
|
|||
|
||||
ExpressionInferenceResult indexResult = inferrer
|
||||
.inferExpression(node.index, readIndexType, true, isVoidAllowed: true);
|
||||
VariableDeclaration indexVariable = createVariableForResult(indexResult);
|
||||
|
||||
Expression readIndex = createVariableGet(indexVariable);
|
||||
VariableDeclaration indexVariable;
|
||||
Expression readIndex = indexResult.expression;
|
||||
Expression writeIndex;
|
||||
if (isPureExpression(readIndex)) {
|
||||
writeIndex = clonePureExpression(readIndex);
|
||||
} else {
|
||||
indexVariable = createVariable(readIndex, indexResult.inferredType);
|
||||
readIndex = createVariableGet(indexVariable);
|
||||
writeIndex = createVariableGet(indexVariable);
|
||||
}
|
||||
|
||||
readIndex = inferrer.ensureAssignable(
|
||||
readIndexType, indexResult.inferredType, readIndex);
|
||||
|
||||
|
@ -5387,7 +5444,6 @@ class InferenceVisitor
|
|||
Expression binary = binaryResult.expression;
|
||||
DartType binaryType = binaryResult.inferredType;
|
||||
|
||||
Expression writeIndex = createVariableGet(indexVariable);
|
||||
writeIndex = inferrer.ensureAssignable(
|
||||
writeIndexType, indexResult.inferredType, writeIndex);
|
||||
binary = inferrer.ensureAssignable(valueType, binaryType, binary,
|
||||
|
@ -5422,7 +5478,7 @@ class InferenceVisitor
|
|||
// let indexVariable = a in
|
||||
// receiverVariable.[]=(receiverVariable, o.[](indexVariable) + b)
|
||||
//
|
||||
replacement = createLet(indexVariable, write);
|
||||
replacement = write;
|
||||
} else if (node.forPostIncDec) {
|
||||
// Encode `Extension(o)[a]++` as:
|
||||
//
|
||||
|
@ -5438,10 +5494,8 @@ class InferenceVisitor
|
|||
|
||||
VariableDeclaration writeVariable =
|
||||
createVariable(write, const VoidType());
|
||||
replacement = createLet(
|
||||
indexVariable,
|
||||
createLet(leftVariable,
|
||||
createLet(writeVariable, createVariableGet(leftVariable))));
|
||||
replacement = createLet(leftVariable,
|
||||
createLet(writeVariable, createVariableGet(leftVariable)));
|
||||
} else {
|
||||
// Encode `Extension(o)[a] += b` as:
|
||||
//
|
||||
|
@ -5457,12 +5511,12 @@ class InferenceVisitor
|
|||
|
||||
VariableDeclaration writeVariable =
|
||||
createVariable(write, const VoidType());
|
||||
replacement = createLet(
|
||||
indexVariable,
|
||||
createLet(valueVariable,
|
||||
createLet(writeVariable, createVariableGet(valueVariable))));
|
||||
replacement = createLet(valueVariable,
|
||||
createLet(writeVariable, createVariableGet(valueVariable)));
|
||||
}
|
||||
if (indexVariable != null) {
|
||||
replacement = createLet(indexVariable, replacement);
|
||||
}
|
||||
|
||||
if (receiverVariable != null) {
|
||||
replacement = new Let(receiverVariable, replacement);
|
||||
}
|
||||
|
|
|
@ -1785,10 +1785,6 @@ class CompoundExtensionSet extends InternalExpression {
|
|||
/// The member used for the write operation.
|
||||
final Member setter;
|
||||
|
||||
/// If `true`, the receiver is read-only and therefore doesn't need a
|
||||
/// temporary variable for its value.
|
||||
final bool readOnlyReceiver;
|
||||
|
||||
/// If `true`, the expression is only need for effect and not for its value.
|
||||
final bool forEffect;
|
||||
|
||||
|
@ -1810,13 +1806,11 @@ class CompoundExtensionSet extends InternalExpression {
|
|||
this.binaryName,
|
||||
this.rhs,
|
||||
this.setter,
|
||||
{this.readOnlyReceiver,
|
||||
this.forEffect,
|
||||
{this.forEffect,
|
||||
this.readOffset,
|
||||
this.binaryOffset,
|
||||
this.writeOffset})
|
||||
: assert(readOnlyReceiver != null),
|
||||
assert(forEffect != null),
|
||||
: assert(forEffect != null),
|
||||
assert(readOffset != null),
|
||||
assert(binaryOffset != null),
|
||||
assert(writeOffset != null) {
|
||||
|
@ -1885,10 +1879,6 @@ class CompoundPropertySet extends InternalExpression {
|
|||
/// If `true`, the expression is only need for effect and not for its value.
|
||||
final bool forEffect;
|
||||
|
||||
/// If `true`, the receiver is read-only and therefore doesn't need a
|
||||
/// temporary variable for its value.
|
||||
final bool readOnlyReceiver;
|
||||
|
||||
/// The file offset for the read operation.
|
||||
final int readOffset;
|
||||
|
||||
|
@ -1900,13 +1890,8 @@ class CompoundPropertySet extends InternalExpression {
|
|||
|
||||
CompoundPropertySet(
|
||||
this.receiver, this.propertyName, this.binaryName, this.rhs,
|
||||
{this.forEffect,
|
||||
this.readOnlyReceiver,
|
||||
this.readOffset,
|
||||
this.binaryOffset,
|
||||
this.writeOffset})
|
||||
{this.forEffect, this.readOffset, this.binaryOffset, this.writeOffset})
|
||||
: assert(forEffect != null),
|
||||
assert(readOnlyReceiver != null),
|
||||
assert(readOffset != null),
|
||||
assert(binaryOffset != null),
|
||||
assert(writeOffset != null) {
|
||||
|
@ -2253,12 +2238,8 @@ class IndexSet extends InternalExpression {
|
|||
|
||||
final bool forEffect;
|
||||
|
||||
final bool readOnlyReceiver;
|
||||
|
||||
IndexSet(this.receiver, this.index, this.value,
|
||||
{this.forEffect, this.readOnlyReceiver})
|
||||
: assert(forEffect != null),
|
||||
assert(readOnlyReceiver != null) {
|
||||
IndexSet(this.receiver, this.index, this.value, {this.forEffect})
|
||||
: assert(forEffect != null) {
|
||||
receiver?.parent = this;
|
||||
index?.parent = this;
|
||||
value?.parent = this;
|
||||
|
@ -2446,6 +2427,20 @@ class ExtensionIndexSet extends InternalExpression {
|
|||
String toString() {
|
||||
return "ExtensionIndexSet(${toStringInternal()})";
|
||||
}
|
||||
|
||||
@override
|
||||
void toTextInternal(AstPrinter printer) {
|
||||
printer.write(extension.name);
|
||||
if (explicitTypeArguments != null) {
|
||||
printer.writeTypeArguments(explicitTypeArguments);
|
||||
}
|
||||
printer.write('(');
|
||||
printer.writeExpression(receiver);
|
||||
printer.write(')[');
|
||||
printer.writeExpression(index);
|
||||
printer.write('] = ');
|
||||
printer.writeExpression(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// Internal expression representing an if-null index assignment.
|
||||
|
@ -2493,16 +2488,8 @@ class IfNullIndexSet extends InternalExpression {
|
|||
/// If `true`, the expression is only need for effect and not for its value.
|
||||
final bool forEffect;
|
||||
|
||||
/// If `true`, the receiver is read-only and therefore doesn't need a
|
||||
/// temporary variable for its value.
|
||||
final bool readOnlyReceiver;
|
||||
|
||||
IfNullIndexSet(this.receiver, this.index, this.value,
|
||||
{this.readOffset,
|
||||
this.testOffset,
|
||||
this.writeOffset,
|
||||
this.forEffect,
|
||||
this.readOnlyReceiver: false})
|
||||
{this.readOffset, this.testOffset, this.writeOffset, this.forEffect})
|
||||
: assert(readOffset != null),
|
||||
assert(testOffset != null),
|
||||
assert(writeOffset != null),
|
||||
|
@ -2688,24 +2675,15 @@ class IfNullExtensionIndexSet extends InternalExpression {
|
|||
/// If `true`, the expression is only need for effect and not for its value.
|
||||
final bool forEffect;
|
||||
|
||||
/// If `true`, the receiver is read-only and therefore doesn't need a
|
||||
/// temporary variable for its value.
|
||||
final bool readOnlyReceiver;
|
||||
|
||||
IfNullExtensionIndexSet(this.extension, this.explicitTypeArguments,
|
||||
this.receiver, this.getter, this.setter, this.index, this.value,
|
||||
{this.readOffset,
|
||||
this.testOffset,
|
||||
this.writeOffset,
|
||||
this.forEffect,
|
||||
this.readOnlyReceiver})
|
||||
{this.readOffset, this.testOffset, this.writeOffset, this.forEffect})
|
||||
: assert(explicitTypeArguments == null ||
|
||||
explicitTypeArguments.length == extension.typeParameters.length),
|
||||
assert(readOffset != null),
|
||||
assert(testOffset != null),
|
||||
assert(writeOffset != null),
|
||||
assert(forEffect != null),
|
||||
assert(readOnlyReceiver != null) {
|
||||
assert(forEffect != null) {
|
||||
receiver?.parent = this;
|
||||
index?.parent = this;
|
||||
value?.parent = this;
|
||||
|
@ -2792,17 +2770,12 @@ class CompoundIndexSet extends InternalExpression {
|
|||
/// If `true`, the expression is a post-fix inc/dec expression.
|
||||
final bool forPostIncDec;
|
||||
|
||||
/// If `true`, the receiver is read-only and therefore doesn't need a
|
||||
/// temporary variable for its value.
|
||||
final bool readOnlyReceiver;
|
||||
|
||||
CompoundIndexSet(this.receiver, this.index, this.binaryName, this.rhs,
|
||||
{this.readOffset,
|
||||
this.binaryOffset,
|
||||
this.writeOffset,
|
||||
this.forEffect,
|
||||
this.forPostIncDec,
|
||||
this.readOnlyReceiver: false})
|
||||
this.forPostIncDec})
|
||||
: assert(forEffect != null) {
|
||||
receiver?.parent = this;
|
||||
index?.parent = this;
|
||||
|
@ -3248,10 +3221,6 @@ class CompoundExtensionIndexSet extends InternalExpression {
|
|||
/// If `true`, the expression is a post-fix inc/dec expression.
|
||||
final bool forPostIncDec;
|
||||
|
||||
/// If `true` the receiver can be cloned instead of creating a temporary
|
||||
/// variable.
|
||||
final bool readOnlyReceiver;
|
||||
|
||||
CompoundExtensionIndexSet(
|
||||
this.extension,
|
||||
this.explicitTypeArguments,
|
||||
|
@ -3265,16 +3234,14 @@ class CompoundExtensionIndexSet extends InternalExpression {
|
|||
this.binaryOffset,
|
||||
this.writeOffset,
|
||||
this.forEffect,
|
||||
this.forPostIncDec,
|
||||
this.readOnlyReceiver})
|
||||
this.forPostIncDec})
|
||||
: assert(explicitTypeArguments == null ||
|
||||
explicitTypeArguments.length == extension.typeParameters.length),
|
||||
assert(readOffset != null),
|
||||
assert(binaryOffset != null),
|
||||
assert(writeOffset != null),
|
||||
assert(forEffect != null),
|
||||
assert(forPostIncDec != null),
|
||||
assert(readOnlyReceiver != null) {
|
||||
assert(forPostIncDec != null) {
|
||||
receiver?.parent = this;
|
||||
index?.parent = this;
|
||||
rhs?.parent = this;
|
||||
|
@ -3359,16 +3326,11 @@ class ExtensionSet extends InternalExpression {
|
|||
/// value.
|
||||
final bool forEffect;
|
||||
|
||||
/// If `true` the receiver can be cloned instead of creating a temporary
|
||||
/// variable.
|
||||
final bool readOnlyReceiver;
|
||||
|
||||
ExtensionSet(this.extension, this.explicitTypeArguments, this.receiver,
|
||||
this.target, this.value,
|
||||
{this.readOnlyReceiver, this.forEffect})
|
||||
{this.forEffect})
|
||||
: assert(explicitTypeArguments == null ||
|
||||
explicitTypeArguments.length == extension.typeParameters.length),
|
||||
assert(readOnlyReceiver != null),
|
||||
assert(forEffect != null) {
|
||||
receiver?.parent = this;
|
||||
value?.parent = this;
|
||||
|
@ -3776,3 +3738,33 @@ ExpressionStatement createExpressionStatement(Expression expression) {
|
|||
return new ExpressionStatement(expression)
|
||||
..fileOffset = expression.fileOffset;
|
||||
}
|
||||
|
||||
/// Returns `true` if [node] is a pure expression.
|
||||
///
|
||||
/// A pure expression is an expression that is deterministic and side effect
|
||||
/// free, such as `this` or a variable get of a final variable.
|
||||
bool isPureExpression(Expression node) {
|
||||
if (node is ThisExpression) {
|
||||
return true;
|
||||
} else if (node is VariableGet) {
|
||||
return node.variable.isFinal && !node.variable.isLate;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Returns a clone of [node].
|
||||
///
|
||||
/// This assumes that `isPureExpression(node)` is `true`.
|
||||
Expression clonePureExpression(Expression node) {
|
||||
if (node is ThisExpression) {
|
||||
return new ThisExpression()..fileOffset = node.fileOffset;
|
||||
} else if (node is VariableGet) {
|
||||
assert(
|
||||
node.variable.isFinal && !node.variable.isLate,
|
||||
"Trying to clone VariableGet of non-final variable"
|
||||
" ${node.variable}.");
|
||||
return new VariableGet(node.variable, node.promotedType)
|
||||
..fileOffset = node.fileOffset;
|
||||
}
|
||||
throw new UnsupportedError("Clone not supported for ${node.runtimeType}.");
|
||||
}
|
||||
|
|
|
@ -3949,13 +3949,11 @@ class TypeInferrerImpl implements TypeInferrer {
|
|||
Expression createMissingIndexSet(int fileOffset, Expression receiver,
|
||||
DartType receiverType, Expression index, Expression value,
|
||||
{bool forEffect,
|
||||
bool readOnlyReceiver,
|
||||
List<ExtensionAccessCandidate> extensionAccessCandidates}) {
|
||||
assert(forEffect != null);
|
||||
assert(readOnlyReceiver != null);
|
||||
if (isTopLevel) {
|
||||
return engine.forest.createIndexSet(fileOffset, receiver, index, value,
|
||||
forEffect: forEffect, readOnlyReceiver: readOnlyReceiver);
|
||||
forEffect: forEffect);
|
||||
} else {
|
||||
return _reportMissingOrAmbiguousMember(
|
||||
fileOffset,
|
||||
|
|
|
@ -588,7 +588,6 @@ void _testCompoundPropertySet() {
|
|||
readOffset: TreeNode.noOffset,
|
||||
binaryOffset: TreeNode.noOffset,
|
||||
writeOffset: TreeNode.noOffset,
|
||||
readOnlyReceiver: false,
|
||||
forEffect: false),
|
||||
'''
|
||||
0.foo += 1''');
|
||||
|
@ -608,7 +607,27 @@ void _testIndexSet() {}
|
|||
|
||||
void _testSuperIndexSet() {}
|
||||
|
||||
void _testExtensionIndexSet() {}
|
||||
void _testExtensionIndexSet() {
|
||||
Library library = new Library(dummyUri);
|
||||
Extension extension = new Extension(
|
||||
name: 'Extension', typeParameters: [new TypeParameter('T')]);
|
||||
library.addExtension(extension);
|
||||
Procedure setter =
|
||||
new Procedure(new Name(''), ProcedureKind.Method, new FunctionNode(null));
|
||||
library.addProcedure(setter);
|
||||
|
||||
testExpression(
|
||||
new ExtensionIndexSet(extension, null, new IntLiteral(0), setter,
|
||||
new IntLiteral(1), new IntLiteral(2)),
|
||||
'''
|
||||
Extension(0)[1] = 2''');
|
||||
|
||||
testExpression(
|
||||
new ExtensionIndexSet(extension, [const VoidType()], new IntLiteral(0),
|
||||
setter, new IntLiteral(1), new IntLiteral(2)),
|
||||
'''
|
||||
Extension<void>(0)[1] = 2''');
|
||||
}
|
||||
|
||||
void _testIfNullIndexSet() {}
|
||||
|
||||
|
|
|
@ -70,23 +70,23 @@ static method explicitWithTypeArguments() → dynamic {
|
|||
self::expect(null, self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
self::Extension|[]=<core::int*, core::String*>(map1, 1, "1");
|
||||
self::expect("1", self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
self::expect("2", let final self::MapLike<core::int*, core::String*>* #t43 = map1 in let final core::int* #t44 = 1 in let final core::String* #t45 = "2" in let final void #t46 = self::Extension|[]=<core::int*, core::String*>(#t43, #t44, #t45) in #t45);
|
||||
self::expect("2", let final self::MapLike<core::int*, core::String*>* #t43 = map1 in let final core::String* #t44 = "2" in let final void #t45 = self::Extension|[]=<core::int*, core::String*>(#t43, 1, #t44) in #t44);
|
||||
self::expect("2", self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
let final self::MapLike<core::int*, core::String*>* #t47 = map1 in let final core::int* #t48 = 1 in self::Extension|[]<core::int*, core::String*>(#t47, #t48).{core::String::==}(null) ?{core::String*} self::Extension|[]=<core::int*, core::String*>(#t47, #t48, "3") : null;
|
||||
let final self::MapLike<core::int*, core::String*>* #t46 = map1 in let final core::int* #t47 = 1 in self::Extension|[]<core::int*, core::String*>(#t46, #t47).{core::String::==}(null) ?{core::String*} self::Extension|[]=<core::int*, core::String*>(#t46, #t47, "3") : null;
|
||||
self::expect("2", self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
self::expect("2", let final self::MapLike<core::int*, core::String*>* #t49 = map1 in let final core::int* #t50 = 1 in let final core::String* #t51 = self::Extension|[]<core::int*, core::String*>(#t49, #t50) in #t51.{core::String::==}(null) ?{core::String*} let final core::String* #t52 = "4" in let final void #t53 = self::Extension|[]=<core::int*, core::String*>(#t49, #t50, #t52) in #t52 : #t51);
|
||||
self::expect("2", let final self::MapLike<core::int*, core::String*>* #t48 = map1 in let final core::int* #t49 = 1 in let final core::String* #t50 = self::Extension|[]<core::int*, core::String*>(#t48, #t49) in #t50.{core::String::==}(null) ?{core::String*} let final core::String* #t51 = "4" in let final void #t52 = self::Extension|[]=<core::int*, core::String*>(#t48, #t49, #t51) in #t51 : #t50);
|
||||
self::expect("2", self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
let final self::MapLike<core::int*, core::String*>* #t54 = map1 in let final core::int* #t55 = 2 in self::Extension|[]<core::int*, core::String*>(#t54, #t55).{core::String::==}(null) ?{core::String*} self::Extension|[]=<core::int*, core::String*>(#t54, #t55, "2") : null;
|
||||
let final self::MapLike<core::int*, core::String*>* #t53 = map1 in let final core::int* #t54 = 2 in self::Extension|[]<core::int*, core::String*>(#t53, #t54).{core::String::==}(null) ?{core::String*} self::Extension|[]=<core::int*, core::String*>(#t53, #t54, "2") : null;
|
||||
self::expect("2", self::Extension|[]<core::int*, core::String*>(map1, 2));
|
||||
self::expect("3", let final self::MapLike<core::int*, core::String*>* #t56 = map1 in let final core::int* #t57 = 3 in let final core::String* #t58 = self::Extension|[]<core::int*, core::String*>(#t56, #t57) in #t58.{core::String::==}(null) ?{core::String*} let final core::String* #t59 = "3" in let final void #t60 = self::Extension|[]=<core::int*, core::String*>(#t56, #t57, #t59) in #t59 : #t58);
|
||||
self::expect("3", let final self::MapLike<core::int*, core::String*>* #t55 = map1 in let final core::int* #t56 = 3 in let final core::String* #t57 = self::Extension|[]<core::int*, core::String*>(#t55, #t56) in #t57.{core::String::==}(null) ?{core::String*} let final core::String* #t58 = "3" in let final void #t59 = self::Extension|[]=<core::int*, core::String*>(#t55, #t56, #t58) in #t58 : #t57);
|
||||
self::expect("3", self::Extension|[]<core::int*, core::String*>(map1, 3));
|
||||
self::MapLike<core::int*, core::int*>* map2 = new self::MapLike::•<core::int*, core::int*>();
|
||||
self::expect(1, let final self::MapLike<core::int*, core::int*>* #t61 = map2 in let final core::int* #t62 = 0 in let final core::int* #t63 = 1 in let final void #t64 = self::Extension|[]=<core::int*, core::int*>(#t61, #t62, #t63) in #t63);
|
||||
self::expect(3, let final self::MapLike<core::int*, core::int*>* #t65 = map2 in let final core::int* #t66 = 0 in let final core::int* #t67 = self::Extension|[]<core::int*, core::int*>(#t65, #t66).{core::num::+}(2) in let final void #t68 = self::Extension|[]=<core::int*, core::int*>(#t65, #t66, #t67) in #t67);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t69 = map2 in let final core::int* #t70 = 0 in let final core::int* #t71 = self::Extension|[]<core::int*, core::int*>(#t69, #t70).{core::num::+}(2) in let final void #t72 = self::Extension|[]=<core::int*, core::int*>(#t69, #t70, #t71) in #t71);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t73 = map2 in let final core::int* #t74 = 0 in let final core::int* #t75 = self::Extension|[]<core::int*, core::int*>(#t73, #t74) in let final void #t76 = self::Extension|[]=<core::int*, core::int*>(#t73, #t74, #t75.{core::num::+}(1)) in #t75);
|
||||
self::expect(1, let final self::MapLike<core::int*, core::int*>* #t60 = map2 in let final core::int* #t61 = 1 in let final void #t62 = self::Extension|[]=<core::int*, core::int*>(#t60, 0, #t61) in #t61);
|
||||
self::expect(3, let final self::MapLike<core::int*, core::int*>* #t63 = map2 in let final core::int* #t64 = 0 in let final core::int* #t65 = self::Extension|[]<core::int*, core::int*>(#t63, #t64).{core::num::+}(2) in let final void #t66 = self::Extension|[]=<core::int*, core::int*>(#t63, #t64, #t65) in #t65);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t67 = map2 in let final core::int* #t68 = 0 in let final core::int* #t69 = self::Extension|[]<core::int*, core::int*>(#t67, #t68).{core::num::+}(2) in let final void #t70 = self::Extension|[]=<core::int*, core::int*>(#t67, #t68, #t69) in #t69);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t71 = map2 in let final core::int* #t72 = 0 in let final core::int* #t73 = self::Extension|[]<core::int*, core::int*>(#t71, #t72) in let final void #t74 = self::Extension|[]=<core::int*, core::int*>(#t71, #t72, #t73.{core::num::+}(1)) in #t73);
|
||||
self::expect(6, self::Extension|[]<core::int*, core::int*>(map2, 0));
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t77 = map2 in let final core::int* #t78 = 0 in let final core::int* #t79 = self::Extension|[]<core::int*, core::int*>(#t77, #t78).{core::num::-}(1) in let final void #t80 = self::Extension|[]=<core::int*, core::int*>(#t77, #t78, #t79) in #t79);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t75 = map2 in let final core::int* #t76 = 0 in let final core::int* #t77 = self::Extension|[]<core::int*, core::int*>(#t75, #t76).{core::num::-}(1) in let final void #t78 = self::Extension|[]=<core::int*, core::int*>(#t75, #t76, #t77) in #t77);
|
||||
self::expect(5, self::Extension|[]<core::int*, core::int*>(map2, 0));
|
||||
}
|
||||
static method explicitInferredTypeArguments() → dynamic {
|
||||
|
@ -97,23 +97,23 @@ static method explicitInferredTypeArguments() → dynamic {
|
|||
self::expect(null, self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
self::Extension|[]=<core::int*, core::String*>(map1, 1, "1");
|
||||
self::expect("1", self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
self::expect("2", let final self::MapLike<core::int*, core::String*>* #t81 = map1 in let final core::int* #t82 = 1 in let final core::String* #t83 = "2" in let final void #t84 = self::Extension|[]=<core::int*, core::String*>(#t81, #t82, #t83) in #t83);
|
||||
self::expect("2", let final self::MapLike<core::int*, core::String*>* #t79 = map1 in let final core::String* #t80 = "2" in let final void #t81 = self::Extension|[]=<core::int*, core::String*>(#t79, 1, #t80) in #t80);
|
||||
self::expect("2", self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
let final self::MapLike<core::int*, core::String*>* #t85 = map1 in let final core::int* #t86 = 1 in self::Extension|[]<core::int*, core::String*>(#t85, #t86).{core::String::==}(null) ?{core::String*} self::Extension|[]=<core::int*, core::String*>(#t85, #t86, "3") : null;
|
||||
let final self::MapLike<core::int*, core::String*>* #t82 = map1 in let final core::int* #t83 = 1 in self::Extension|[]<core::int*, core::String*>(#t82, #t83).{core::String::==}(null) ?{core::String*} self::Extension|[]=<core::int*, core::String*>(#t82, #t83, "3") : null;
|
||||
self::expect("2", self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
self::expect("2", let final self::MapLike<core::int*, core::String*>* #t87 = map1 in let final core::int* #t88 = 1 in let final core::String* #t89 = self::Extension|[]<core::int*, core::String*>(#t87, #t88) in #t89.{core::String::==}(null) ?{core::String*} let final core::String* #t90 = "4" in let final void #t91 = self::Extension|[]=<core::int*, core::String*>(#t87, #t88, #t90) in #t90 : #t89);
|
||||
self::expect("2", let final self::MapLike<core::int*, core::String*>* #t84 = map1 in let final core::int* #t85 = 1 in let final core::String* #t86 = self::Extension|[]<core::int*, core::String*>(#t84, #t85) in #t86.{core::String::==}(null) ?{core::String*} let final core::String* #t87 = "4" in let final void #t88 = self::Extension|[]=<core::int*, core::String*>(#t84, #t85, #t87) in #t87 : #t86);
|
||||
self::expect("2", self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
let final self::MapLike<core::int*, core::String*>* #t92 = map1 in let final core::int* #t93 = 2 in self::Extension|[]<core::int*, core::String*>(#t92, #t93).{core::String::==}(null) ?{core::String*} self::Extension|[]=<core::int*, core::String*>(#t92, #t93, "2") : null;
|
||||
let final self::MapLike<core::int*, core::String*>* #t89 = map1 in let final core::int* #t90 = 2 in self::Extension|[]<core::int*, core::String*>(#t89, #t90).{core::String::==}(null) ?{core::String*} self::Extension|[]=<core::int*, core::String*>(#t89, #t90, "2") : null;
|
||||
self::expect("2", self::Extension|[]<core::int*, core::String*>(map1, 2));
|
||||
self::expect("3", let final self::MapLike<core::int*, core::String*>* #t94 = map1 in let final core::int* #t95 = 3 in let final core::String* #t96 = self::Extension|[]<core::int*, core::String*>(#t94, #t95) in #t96.{core::String::==}(null) ?{core::String*} let final core::String* #t97 = "3" in let final void #t98 = self::Extension|[]=<core::int*, core::String*>(#t94, #t95, #t97) in #t97 : #t96);
|
||||
self::expect("3", let final self::MapLike<core::int*, core::String*>* #t91 = map1 in let final core::int* #t92 = 3 in let final core::String* #t93 = self::Extension|[]<core::int*, core::String*>(#t91, #t92) in #t93.{core::String::==}(null) ?{core::String*} let final core::String* #t94 = "3" in let final void #t95 = self::Extension|[]=<core::int*, core::String*>(#t91, #t92, #t94) in #t94 : #t93);
|
||||
self::expect("3", self::Extension|[]<core::int*, core::String*>(map1, 3));
|
||||
self::MapLike<core::int*, core::int*>* map2 = new self::MapLike::•<core::int*, core::int*>();
|
||||
self::expect(1, let final self::MapLike<core::int*, core::int*>* #t99 = map2 in let final core::int* #t100 = 0 in let final core::int* #t101 = 1 in let final void #t102 = self::Extension|[]=<core::int*, core::int*>(#t99, #t100, #t101) in #t101);
|
||||
self::expect(3, let final self::MapLike<core::int*, core::int*>* #t103 = map2 in let final core::int* #t104 = 0 in let final core::int* #t105 = self::Extension|[]<core::int*, core::int*>(#t103, #t104).{core::num::+}(2) in let final void #t106 = self::Extension|[]=<core::int*, core::int*>(#t103, #t104, #t105) in #t105);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t107 = map2 in let final core::int* #t108 = 0 in let final core::int* #t109 = self::Extension|[]<core::int*, core::int*>(#t107, #t108).{core::num::+}(2) in let final void #t110 = self::Extension|[]=<core::int*, core::int*>(#t107, #t108, #t109) in #t109);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t111 = map2 in let final core::int* #t112 = 0 in let final core::int* #t113 = self::Extension|[]<core::int*, core::int*>(#t111, #t112) in let final void #t114 = self::Extension|[]=<core::int*, core::int*>(#t111, #t112, #t113.{core::num::+}(1)) in #t113);
|
||||
self::expect(1, let final self::MapLike<core::int*, core::int*>* #t96 = map2 in let final core::int* #t97 = 1 in let final void #t98 = self::Extension|[]=<core::int*, core::int*>(#t96, 0, #t97) in #t97);
|
||||
self::expect(3, let final self::MapLike<core::int*, core::int*>* #t99 = map2 in let final core::int* #t100 = 0 in let final core::int* #t101 = self::Extension|[]<core::int*, core::int*>(#t99, #t100).{core::num::+}(2) in let final void #t102 = self::Extension|[]=<core::int*, core::int*>(#t99, #t100, #t101) in #t101);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t103 = map2 in let final core::int* #t104 = 0 in let final core::int* #t105 = self::Extension|[]<core::int*, core::int*>(#t103, #t104).{core::num::+}(2) in let final void #t106 = self::Extension|[]=<core::int*, core::int*>(#t103, #t104, #t105) in #t105);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t107 = map2 in let final core::int* #t108 = 0 in let final core::int* #t109 = self::Extension|[]<core::int*, core::int*>(#t107, #t108) in let final void #t110 = self::Extension|[]=<core::int*, core::int*>(#t107, #t108, #t109.{core::num::+}(1)) in #t109);
|
||||
self::expect(6, self::Extension|[]<core::int*, core::int*>(map2, 0));
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t115 = map2 in let final core::int* #t116 = 0 in let final core::int* #t117 = self::Extension|[]<core::int*, core::int*>(#t115, #t116).{core::num::-}(1) in let final void #t118 = self::Extension|[]=<core::int*, core::int*>(#t115, #t116, #t117) in #t117);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t111 = map2 in let final core::int* #t112 = 0 in let final core::int* #t113 = self::Extension|[]<core::int*, core::int*>(#t111, #t112).{core::num::-}(1) in let final void #t114 = self::Extension|[]=<core::int*, core::int*>(#t111, #t112, #t113) in #t113);
|
||||
self::expect(5, self::Extension|[]<core::int*, core::int*>(map2, 0));
|
||||
}
|
||||
static method expect(dynamic expected, dynamic actual) → dynamic {
|
||||
|
|
|
@ -70,23 +70,23 @@ static method explicitWithTypeArguments() → dynamic {
|
|||
self::expect(null, self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
self::Extension|[]=<core::int*, core::String*>(map1, 1, "1");
|
||||
self::expect("1", self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
self::expect("2", let final self::MapLike<core::int*, core::String*>* #t43 = map1 in let final core::int* #t44 = 1 in let final core::String* #t45 = "2" in let final void #t46 = self::Extension|[]=<core::int*, core::String*>(#t43, #t44, #t45) in #t45);
|
||||
self::expect("2", let final self::MapLike<core::int*, core::String*>* #t43 = map1 in let final core::String* #t44 = "2" in let final void #t45 = self::Extension|[]=<core::int*, core::String*>(#t43, 1, #t44) in #t44);
|
||||
self::expect("2", self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
let final self::MapLike<core::int*, core::String*>* #t47 = map1 in let final core::int* #t48 = 1 in self::Extension|[]<core::int*, core::String*>(#t47, #t48).{core::String::==}(null) ?{core::String*} self::Extension|[]=<core::int*, core::String*>(#t47, #t48, "3") : null;
|
||||
let final self::MapLike<core::int*, core::String*>* #t46 = map1 in let final core::int* #t47 = 1 in self::Extension|[]<core::int*, core::String*>(#t46, #t47).{core::String::==}(null) ?{core::String*} self::Extension|[]=<core::int*, core::String*>(#t46, #t47, "3") : null;
|
||||
self::expect("2", self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
self::expect("2", let final self::MapLike<core::int*, core::String*>* #t49 = map1 in let final core::int* #t50 = 1 in let final core::String* #t51 = self::Extension|[]<core::int*, core::String*>(#t49, #t50) in #t51.{core::String::==}(null) ?{core::String*} let final core::String* #t52 = "4" in let final void #t53 = self::Extension|[]=<core::int*, core::String*>(#t49, #t50, #t52) in #t52 : #t51);
|
||||
self::expect("2", let final self::MapLike<core::int*, core::String*>* #t48 = map1 in let final core::int* #t49 = 1 in let final core::String* #t50 = self::Extension|[]<core::int*, core::String*>(#t48, #t49) in #t50.{core::String::==}(null) ?{core::String*} let final core::String* #t51 = "4" in let final void #t52 = self::Extension|[]=<core::int*, core::String*>(#t48, #t49, #t51) in #t51 : #t50);
|
||||
self::expect("2", self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
let final self::MapLike<core::int*, core::String*>* #t54 = map1 in let final core::int* #t55 = 2 in self::Extension|[]<core::int*, core::String*>(#t54, #t55).{core::String::==}(null) ?{core::String*} self::Extension|[]=<core::int*, core::String*>(#t54, #t55, "2") : null;
|
||||
let final self::MapLike<core::int*, core::String*>* #t53 = map1 in let final core::int* #t54 = 2 in self::Extension|[]<core::int*, core::String*>(#t53, #t54).{core::String::==}(null) ?{core::String*} self::Extension|[]=<core::int*, core::String*>(#t53, #t54, "2") : null;
|
||||
self::expect("2", self::Extension|[]<core::int*, core::String*>(map1, 2));
|
||||
self::expect("3", let final self::MapLike<core::int*, core::String*>* #t56 = map1 in let final core::int* #t57 = 3 in let final core::String* #t58 = self::Extension|[]<core::int*, core::String*>(#t56, #t57) in #t58.{core::String::==}(null) ?{core::String*} let final core::String* #t59 = "3" in let final void #t60 = self::Extension|[]=<core::int*, core::String*>(#t56, #t57, #t59) in #t59 : #t58);
|
||||
self::expect("3", let final self::MapLike<core::int*, core::String*>* #t55 = map1 in let final core::int* #t56 = 3 in let final core::String* #t57 = self::Extension|[]<core::int*, core::String*>(#t55, #t56) in #t57.{core::String::==}(null) ?{core::String*} let final core::String* #t58 = "3" in let final void #t59 = self::Extension|[]=<core::int*, core::String*>(#t55, #t56, #t58) in #t58 : #t57);
|
||||
self::expect("3", self::Extension|[]<core::int*, core::String*>(map1, 3));
|
||||
self::MapLike<core::int*, core::int*>* map2 = new self::MapLike::•<core::int*, core::int*>();
|
||||
self::expect(1, let final self::MapLike<core::int*, core::int*>* #t61 = map2 in let final core::int* #t62 = 0 in let final core::int* #t63 = 1 in let final void #t64 = self::Extension|[]=<core::int*, core::int*>(#t61, #t62, #t63) in #t63);
|
||||
self::expect(3, let final self::MapLike<core::int*, core::int*>* #t65 = map2 in let final core::int* #t66 = 0 in let final core::int* #t67 = self::Extension|[]<core::int*, core::int*>(#t65, #t66).{core::num::+}(2) in let final void #t68 = self::Extension|[]=<core::int*, core::int*>(#t65, #t66, #t67) in #t67);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t69 = map2 in let final core::int* #t70 = 0 in let final core::int* #t71 = self::Extension|[]<core::int*, core::int*>(#t69, #t70).{core::num::+}(2) in let final void #t72 = self::Extension|[]=<core::int*, core::int*>(#t69, #t70, #t71) in #t71);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t73 = map2 in let final core::int* #t74 = 0 in let final core::int* #t75 = self::Extension|[]<core::int*, core::int*>(#t73, #t74) in let final void #t76 = self::Extension|[]=<core::int*, core::int*>(#t73, #t74, #t75.{core::num::+}(1)) in #t75);
|
||||
self::expect(1, let final self::MapLike<core::int*, core::int*>* #t60 = map2 in let final core::int* #t61 = 1 in let final void #t62 = self::Extension|[]=<core::int*, core::int*>(#t60, 0, #t61) in #t61);
|
||||
self::expect(3, let final self::MapLike<core::int*, core::int*>* #t63 = map2 in let final core::int* #t64 = 0 in let final core::int* #t65 = self::Extension|[]<core::int*, core::int*>(#t63, #t64).{core::num::+}(2) in let final void #t66 = self::Extension|[]=<core::int*, core::int*>(#t63, #t64, #t65) in #t65);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t67 = map2 in let final core::int* #t68 = 0 in let final core::int* #t69 = self::Extension|[]<core::int*, core::int*>(#t67, #t68).{core::num::+}(2) in let final void #t70 = self::Extension|[]=<core::int*, core::int*>(#t67, #t68, #t69) in #t69);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t71 = map2 in let final core::int* #t72 = 0 in let final core::int* #t73 = self::Extension|[]<core::int*, core::int*>(#t71, #t72) in let final void #t74 = self::Extension|[]=<core::int*, core::int*>(#t71, #t72, #t73.{core::num::+}(1)) in #t73);
|
||||
self::expect(6, self::Extension|[]<core::int*, core::int*>(map2, 0));
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t77 = map2 in let final core::int* #t78 = 0 in let final core::int* #t79 = self::Extension|[]<core::int*, core::int*>(#t77, #t78).{core::num::-}(1) in let final void #t80 = self::Extension|[]=<core::int*, core::int*>(#t77, #t78, #t79) in #t79);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t75 = map2 in let final core::int* #t76 = 0 in let final core::int* #t77 = self::Extension|[]<core::int*, core::int*>(#t75, #t76).{core::num::-}(1) in let final void #t78 = self::Extension|[]=<core::int*, core::int*>(#t75, #t76, #t77) in #t77);
|
||||
self::expect(5, self::Extension|[]<core::int*, core::int*>(map2, 0));
|
||||
}
|
||||
static method explicitInferredTypeArguments() → dynamic {
|
||||
|
@ -97,23 +97,23 @@ static method explicitInferredTypeArguments() → dynamic {
|
|||
self::expect(null, self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
self::Extension|[]=<core::int*, core::String*>(map1, 1, "1");
|
||||
self::expect("1", self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
self::expect("2", let final self::MapLike<core::int*, core::String*>* #t81 = map1 in let final core::int* #t82 = 1 in let final core::String* #t83 = "2" in let final void #t84 = self::Extension|[]=<core::int*, core::String*>(#t81, #t82, #t83) in #t83);
|
||||
self::expect("2", let final self::MapLike<core::int*, core::String*>* #t79 = map1 in let final core::String* #t80 = "2" in let final void #t81 = self::Extension|[]=<core::int*, core::String*>(#t79, 1, #t80) in #t80);
|
||||
self::expect("2", self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
let final self::MapLike<core::int*, core::String*>* #t85 = map1 in let final core::int* #t86 = 1 in self::Extension|[]<core::int*, core::String*>(#t85, #t86).{core::String::==}(null) ?{core::String*} self::Extension|[]=<core::int*, core::String*>(#t85, #t86, "3") : null;
|
||||
let final self::MapLike<core::int*, core::String*>* #t82 = map1 in let final core::int* #t83 = 1 in self::Extension|[]<core::int*, core::String*>(#t82, #t83).{core::String::==}(null) ?{core::String*} self::Extension|[]=<core::int*, core::String*>(#t82, #t83, "3") : null;
|
||||
self::expect("2", self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
self::expect("2", let final self::MapLike<core::int*, core::String*>* #t87 = map1 in let final core::int* #t88 = 1 in let final core::String* #t89 = self::Extension|[]<core::int*, core::String*>(#t87, #t88) in #t89.{core::String::==}(null) ?{core::String*} let final core::String* #t90 = "4" in let final void #t91 = self::Extension|[]=<core::int*, core::String*>(#t87, #t88, #t90) in #t90 : #t89);
|
||||
self::expect("2", let final self::MapLike<core::int*, core::String*>* #t84 = map1 in let final core::int* #t85 = 1 in let final core::String* #t86 = self::Extension|[]<core::int*, core::String*>(#t84, #t85) in #t86.{core::String::==}(null) ?{core::String*} let final core::String* #t87 = "4" in let final void #t88 = self::Extension|[]=<core::int*, core::String*>(#t84, #t85, #t87) in #t87 : #t86);
|
||||
self::expect("2", self::Extension|[]<core::int*, core::String*>(map1, 1));
|
||||
let final self::MapLike<core::int*, core::String*>* #t92 = map1 in let final core::int* #t93 = 2 in self::Extension|[]<core::int*, core::String*>(#t92, #t93).{core::String::==}(null) ?{core::String*} self::Extension|[]=<core::int*, core::String*>(#t92, #t93, "2") : null;
|
||||
let final self::MapLike<core::int*, core::String*>* #t89 = map1 in let final core::int* #t90 = 2 in self::Extension|[]<core::int*, core::String*>(#t89, #t90).{core::String::==}(null) ?{core::String*} self::Extension|[]=<core::int*, core::String*>(#t89, #t90, "2") : null;
|
||||
self::expect("2", self::Extension|[]<core::int*, core::String*>(map1, 2));
|
||||
self::expect("3", let final self::MapLike<core::int*, core::String*>* #t94 = map1 in let final core::int* #t95 = 3 in let final core::String* #t96 = self::Extension|[]<core::int*, core::String*>(#t94, #t95) in #t96.{core::String::==}(null) ?{core::String*} let final core::String* #t97 = "3" in let final void #t98 = self::Extension|[]=<core::int*, core::String*>(#t94, #t95, #t97) in #t97 : #t96);
|
||||
self::expect("3", let final self::MapLike<core::int*, core::String*>* #t91 = map1 in let final core::int* #t92 = 3 in let final core::String* #t93 = self::Extension|[]<core::int*, core::String*>(#t91, #t92) in #t93.{core::String::==}(null) ?{core::String*} let final core::String* #t94 = "3" in let final void #t95 = self::Extension|[]=<core::int*, core::String*>(#t91, #t92, #t94) in #t94 : #t93);
|
||||
self::expect("3", self::Extension|[]<core::int*, core::String*>(map1, 3));
|
||||
self::MapLike<core::int*, core::int*>* map2 = new self::MapLike::•<core::int*, core::int*>();
|
||||
self::expect(1, let final self::MapLike<core::int*, core::int*>* #t99 = map2 in let final core::int* #t100 = 0 in let final core::int* #t101 = 1 in let final void #t102 = self::Extension|[]=<core::int*, core::int*>(#t99, #t100, #t101) in #t101);
|
||||
self::expect(3, let final self::MapLike<core::int*, core::int*>* #t103 = map2 in let final core::int* #t104 = 0 in let final core::int* #t105 = self::Extension|[]<core::int*, core::int*>(#t103, #t104).{core::num::+}(2) in let final void #t106 = self::Extension|[]=<core::int*, core::int*>(#t103, #t104, #t105) in #t105);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t107 = map2 in let final core::int* #t108 = 0 in let final core::int* #t109 = self::Extension|[]<core::int*, core::int*>(#t107, #t108).{core::num::+}(2) in let final void #t110 = self::Extension|[]=<core::int*, core::int*>(#t107, #t108, #t109) in #t109);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t111 = map2 in let final core::int* #t112 = 0 in let final core::int* #t113 = self::Extension|[]<core::int*, core::int*>(#t111, #t112) in let final void #t114 = self::Extension|[]=<core::int*, core::int*>(#t111, #t112, #t113.{core::num::+}(1)) in #t113);
|
||||
self::expect(1, let final self::MapLike<core::int*, core::int*>* #t96 = map2 in let final core::int* #t97 = 1 in let final void #t98 = self::Extension|[]=<core::int*, core::int*>(#t96, 0, #t97) in #t97);
|
||||
self::expect(3, let final self::MapLike<core::int*, core::int*>* #t99 = map2 in let final core::int* #t100 = 0 in let final core::int* #t101 = self::Extension|[]<core::int*, core::int*>(#t99, #t100).{core::num::+}(2) in let final void #t102 = self::Extension|[]=<core::int*, core::int*>(#t99, #t100, #t101) in #t101);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t103 = map2 in let final core::int* #t104 = 0 in let final core::int* #t105 = self::Extension|[]<core::int*, core::int*>(#t103, #t104).{core::num::+}(2) in let final void #t106 = self::Extension|[]=<core::int*, core::int*>(#t103, #t104, #t105) in #t105);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t107 = map2 in let final core::int* #t108 = 0 in let final core::int* #t109 = self::Extension|[]<core::int*, core::int*>(#t107, #t108) in let final void #t110 = self::Extension|[]=<core::int*, core::int*>(#t107, #t108, #t109.{core::num::+}(1)) in #t109);
|
||||
self::expect(6, self::Extension|[]<core::int*, core::int*>(map2, 0));
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t115 = map2 in let final core::int* #t116 = 0 in let final core::int* #t117 = self::Extension|[]<core::int*, core::int*>(#t115, #t116).{core::num::-}(1) in let final void #t118 = self::Extension|[]=<core::int*, core::int*>(#t115, #t116, #t117) in #t117);
|
||||
self::expect(5, let final self::MapLike<core::int*, core::int*>* #t111 = map2 in let final core::int* #t112 = 0 in let final core::int* #t113 = self::Extension|[]<core::int*, core::int*>(#t111, #t112).{core::num::-}(1) in let final void #t114 = self::Extension|[]=<core::int*, core::int*>(#t111, #t112, #t113) in #t113);
|
||||
self::expect(5, self::Extension|[]<core::int*, core::int*>(map2, 0));
|
||||
}
|
||||
static method expect(dynamic expected, dynamic actual) → dynamic {
|
||||
|
@ -150,7 +150,6 @@ Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:46:18 -> IntConstan
|
|||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:46:18 -> IntConstant(0)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:48:20 -> IntConstant(0)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:48:20 -> IntConstant(0)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:60:44 -> IntConstant(1)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:60:49 -> StringConstant("2")
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:60:49 -> StringConstant("2")
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:62:32 -> IntConstant(1)
|
||||
|
@ -165,7 +164,6 @@ Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:68:44 -> IntConstan
|
|||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:68:44 -> IntConstant(3)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:68:51 -> StringConstant("3")
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:68:51 -> StringConstant("3")
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:72:39 -> IntConstant(0)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:72:44 -> IntConstant(1)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:72:44 -> IntConstant(1)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:73:39 -> IntConstant(0)
|
||||
|
@ -176,7 +174,6 @@ Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:75:39 -> IntConstan
|
|||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:75:39 -> IntConstant(0)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:77:41 -> IntConstant(0)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:77:41 -> IntConstant(0)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:89:31 -> IntConstant(1)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:89:36 -> StringConstant("2")
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:89:36 -> StringConstant("2")
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:91:19 -> IntConstant(1)
|
||||
|
@ -191,7 +188,6 @@ Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:97:31 -> IntConstan
|
|||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:97:31 -> IntConstant(3)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:97:38 -> StringConstant("3")
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:97:38 -> StringConstant("3")
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:101:29 -> IntConstant(0)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:101:34 -> IntConstant(1)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:101:34 -> IntConstant(1)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:102:29 -> IntConstant(0)
|
||||
|
@ -202,4 +198,4 @@ Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:104:29 -> IntConsta
|
|||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:104:29 -> IntConstant(0)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:106:31 -> IntConstant(0)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///index.dart:106:31 -> IntConstant(0)
|
||||
Extra constant evaluation: evaluated: 579, effectively constant: 78
|
||||
Extra constant evaluation: evaluated: 571, effectively constant: 74
|
||||
|
|
|
@ -25,15 +25,15 @@ extension Extension1 on self::C* {
|
|||
}
|
||||
static method Extension1|[](lowered final self::C* #this, core::int* index) → self::C*
|
||||
return let final self::C* #t1 = #this in block {
|
||||
let final self::C* #t2 = #t1 in #t2.{self::C::value} = #t2.{self::C::value}.{core::num::+}(index.{core::num::+}(1));
|
||||
#t1.{self::C::value} = #t1.{self::C::value}.{core::num::+}(index.{core::num::+}(1));
|
||||
} =>#t1;
|
||||
static method Extension1|[]=(lowered final self::C* #this, core::int* index, self::C* other) → void
|
||||
return let final self::C* #t3 = #this in #t3.{self::C::value} = #t3.{self::C::value}.{core::num::+}(other.{self::C::value}.{core::num::+}(index).{core::num::+}(1));
|
||||
return #this.{self::C::value} = #this.{self::C::value}.{core::num::+}(other.{self::C::value}.{core::num::+}(index).{core::num::+}(1));
|
||||
static method Extension1|-(lowered final self::C* #this, core::int* val) → self::C*
|
||||
return #this;
|
||||
static method main() → dynamic {
|
||||
self::C* c = new self::C::•();
|
||||
let final self::C* #t4 = c in let final core::int* #t5 = 42 in let final self::C* #t6 = self::Extension1|-(self::Extension1|[](#t4, #t5), 1) in let final void #t7 = self::Extension1|[]=(#t4, #t5, #t6) in #t6;
|
||||
let final self::C* #t8 = c in let final core::int* #t9 = 42 in self::Extension1|[]=(#t8, #t9, self::Extension1|-(self::Extension1|[](#t8, #t9), 1));
|
||||
let final self::C* #t2 = c in let final core::int* #t3 = 42 in let final self::C* #t4 = self::Extension1|-(self::Extension1|[](#t2, #t3), 1) in let final void #t5 = self::Extension1|[]=(#t2, #t3, #t4) in #t4;
|
||||
let final self::C* #t6 = c in let final core::int* #t7 = 42 in self::Extension1|[]=(#t6, #t7, self::Extension1|-(self::Extension1|[](#t6, #t7), 1));
|
||||
self::Extension1|[]=(c, 42, self::Extension1|-(self::Extension1|[](c, 42), 1));
|
||||
}
|
||||
|
|
|
@ -25,16 +25,16 @@ extension Extension1 on self::C* {
|
|||
}
|
||||
static method Extension1|[](lowered final self::C* #this, core::int* index) → self::C*
|
||||
return let final self::C* #t1 = #this in block {
|
||||
let final self::C* #t2 = #t1 in #t2.{self::C::value} = #t2.{self::C::value}.{core::num::+}(index.{core::num::+}(1));
|
||||
#t1.{self::C::value} = #t1.{self::C::value}.{core::num::+}(index.{core::num::+}(1));
|
||||
} =>#t1;
|
||||
static method Extension1|[]=(lowered final self::C* #this, core::int* index, self::C* other) → void
|
||||
return let final self::C* #t3 = #this in #t3.{self::C::value} = #t3.{self::C::value}.{core::num::+}(other.{self::C::value}.{core::num::+}(index).{core::num::+}(1));
|
||||
return #this.{self::C::value} = #this.{self::C::value}.{core::num::+}(other.{self::C::value}.{core::num::+}(index).{core::num::+}(1));
|
||||
static method Extension1|-(lowered final self::C* #this, core::int* val) → self::C*
|
||||
return #this;
|
||||
static method main() → dynamic {
|
||||
self::C* c = new self::C::•();
|
||||
let final self::C* #t4 = c in let final core::int* #t5 = 42 in let final self::C* #t6 = self::Extension1|-(self::Extension1|[](#t4, #t5), 1) in let final void #t7 = self::Extension1|[]=(#t4, #t5, #t6) in #t6;
|
||||
let final self::C* #t8 = c in let final core::int* #t9 = 42 in self::Extension1|[]=(#t8, #t9, self::Extension1|-(self::Extension1|[](#t8, #t9), 1));
|
||||
let final self::C* #t2 = c in let final core::int* #t3 = 42 in let final self::C* #t4 = self::Extension1|-(self::Extension1|[](#t2, #t3), 1) in let final void #t5 = self::Extension1|[]=(#t2, #t3, #t4) in #t4;
|
||||
let final self::C* #t6 = c in let final core::int* #t7 = 42 in self::Extension1|[]=(#t6, #t7, self::Extension1|-(self::Extension1|[](#t6, #t7), 1));
|
||||
self::Extension1|[]=(c, 42, self::Extension1|-(self::Extension1|[](c, 42), 1));
|
||||
}
|
||||
|
||||
|
@ -44,4 +44,4 @@ Evaluated: VariableGet @ org-dartlang-testcase:///issue39527.dart:19:19 -> IntCo
|
|||
Evaluated: VariableGet @ org-dartlang-testcase:///issue39527.dart:19:19 -> IntConstant(42)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///issue39527.dart:22:17 -> IntConstant(42)
|
||||
Evaluated: VariableGet @ org-dartlang-testcase:///issue39527.dart:22:17 -> IntConstant(42)
|
||||
Extra constant evaluation: evaluated: 56, effectively constant: 4
|
||||
Extra constant evaluation: evaluated: 52, effectively constant: 4
|
||||
|
|
215
pkg/front_end/testcases/general/pure_index_expressions.dart
Normal file
215
pkg/front_end/testcases/general/pure_index_expressions.dart
Normal file
|
@ -0,0 +1,215 @@
|
|||
// 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
|
||||
|
||||
extension Extension on int {
|
||||
Class operator [](Class cls) => new Class();
|
||||
void operator []=(Class cls, Class value) {}
|
||||
}
|
||||
|
||||
class Class {
|
||||
Class operator [](Class cls) => new Class();
|
||||
void operator []=(Class cls, Class value) {}
|
||||
Class operator +(Class cls) => cls;
|
||||
|
||||
void indexGetSetForEffect(Map<Class, Class> map) {
|
||||
final Class self = this;
|
||||
map[this] ??= this;
|
||||
map[self] ??= self;
|
||||
|
||||
map[this] = this;
|
||||
map[self] = self;
|
||||
|
||||
map[this];
|
||||
map[self];
|
||||
|
||||
map[this] += this;
|
||||
map[self] += self;
|
||||
}
|
||||
|
||||
void indexGetSetForValue(Map<Class, Class> map) {
|
||||
final Class self = this;
|
||||
var v;
|
||||
v = map[this] ??= this;
|
||||
v = map[self] ??= self;
|
||||
|
||||
v = map[this] = this;
|
||||
v = map[self] = self;
|
||||
|
||||
v = map[this];
|
||||
v = map[self];
|
||||
|
||||
v = map[this] += this;
|
||||
v = map[self] += self;
|
||||
}
|
||||
|
||||
void implicitExtensionGetSetForEffect(int i) {
|
||||
final Class self = this;
|
||||
i[this] ??= this;
|
||||
i[self] ??= self;
|
||||
|
||||
i[this] = this;
|
||||
i[self] = self;
|
||||
|
||||
i[this];
|
||||
i[self];
|
||||
|
||||
i[this] += this;
|
||||
i[self] += self;
|
||||
}
|
||||
|
||||
void implicitExtensionGetSetForValue(int i) {
|
||||
final Class self = this;
|
||||
var v;
|
||||
v = i[this] ??= this;
|
||||
v = i[self] ??= self;
|
||||
|
||||
v = i[this] = this;
|
||||
v = i[self] = self;
|
||||
|
||||
v = i[this];
|
||||
v = i[self];
|
||||
|
||||
v = i[this] += this;
|
||||
v = i[self] += self;
|
||||
}
|
||||
|
||||
void explicitExtensionGetSetForEffect(int i) {
|
||||
final Class self = this;
|
||||
Extension(i)[this] ??= this;
|
||||
Extension(i)[self] ??= self;
|
||||
|
||||
Extension(i)[this] = this;
|
||||
Extension(i)[self] = self;
|
||||
|
||||
Extension(i)[this];
|
||||
Extension(i)[self];
|
||||
|
||||
Extension(i)[this] += this;
|
||||
Extension(i)[self] += self;
|
||||
}
|
||||
|
||||
void explicitExtensionGetSetForValue(int i) {
|
||||
final Class self = this;
|
||||
var v;
|
||||
v = Extension(i)[this] ??= this;
|
||||
v = Extension(i)[self] ??= self;
|
||||
|
||||
v = Extension(i)[this] = this;
|
||||
v = Extension(i)[self] = self;
|
||||
|
||||
v = Extension(i)[this];
|
||||
v = Extension(i)[self];
|
||||
|
||||
v = Extension(i)[this] += this;
|
||||
v = Extension(i)[self] += self;
|
||||
}
|
||||
}
|
||||
|
||||
class Subclass extends Class {
|
||||
void superIndexGetSetForEffect() {
|
||||
final Class self = this;
|
||||
super[this] ??= this;
|
||||
super[self] ??= self;
|
||||
|
||||
super[this] = this;
|
||||
super[self] = self;
|
||||
|
||||
super[this];
|
||||
super[self];
|
||||
|
||||
super[this] += this;
|
||||
super[self] += self;
|
||||
}
|
||||
|
||||
void superIndexGetSetForValue() {
|
||||
final Class self = this;
|
||||
var v;
|
||||
v = super[this] ??= this;
|
||||
v = super[self] ??= self;
|
||||
|
||||
v = super[this] = this;
|
||||
v = super[self] = self;
|
||||
|
||||
v = super[this];
|
||||
v = super[self];
|
||||
|
||||
v = super[this] += this;
|
||||
v = super[self] += self;
|
||||
}
|
||||
}
|
||||
|
||||
extension Extension2 on Class2 {
|
||||
Class2 operator [](Class2 cls) => new Class2();
|
||||
void operator []=(Class2 cls, Class2 value) {}
|
||||
}
|
||||
|
||||
class Class2 {
|
||||
Class2 operator +(Class2 cls) => cls;
|
||||
|
||||
void implicitExtensionGetSetForEffect() {
|
||||
final Class2 self = this;
|
||||
this[this] ??= this;
|
||||
self[self] ??= self;
|
||||
|
||||
this[this] = this;
|
||||
self[self] = self;
|
||||
|
||||
this[this];
|
||||
self[self];
|
||||
|
||||
this[this] += this;
|
||||
self[self] += self;
|
||||
}
|
||||
|
||||
void implicitExtensionGetSetForValue() {
|
||||
final Class2 self = this;
|
||||
var v;
|
||||
v = this[this] ??= this;
|
||||
v = self[self] ??= self;
|
||||
|
||||
v = this[this] = this;
|
||||
v = self[self] = self;
|
||||
|
||||
v = this[this];
|
||||
v = self[self];
|
||||
|
||||
v = this[this] += this;
|
||||
v = self[self] += self;
|
||||
}
|
||||
|
||||
void explicitExtensionGetSetForEffect() {
|
||||
final Class2 self = this;
|
||||
Extension2(this)[this] ??= this;
|
||||
Extension2(self)[self] ??= self;
|
||||
|
||||
Extension2(this)[this] = this;
|
||||
Extension2(self)[self] = self;
|
||||
|
||||
Extension2(this)[this];
|
||||
Extension2(self)[self];
|
||||
|
||||
Extension2(this)[this] += this;
|
||||
Extension2(self)[self] += self;
|
||||
}
|
||||
|
||||
void explicitExtensionGetSetForValue() {
|
||||
final Class2 self = this;
|
||||
var v;
|
||||
v = Extension2(this)[this] ??= this;
|
||||
v = Extension2(self)[self] ??= self;
|
||||
|
||||
v = Extension2(this)[this] = this;
|
||||
v = Extension2(self)[self] = self;
|
||||
|
||||
v = Extension2(this)[this];
|
||||
v = Extension2(self)[self];
|
||||
|
||||
v = Extension2(this)[this] += this;
|
||||
v = Extension2(self)[self] += self;
|
||||
}
|
||||
}
|
||||
|
||||
main() {}
|
|
@ -0,0 +1,86 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class*
|
||||
;
|
||||
operator [](self::Class* cls) → self::Class*
|
||||
;
|
||||
operator []=(self::Class* cls, self::Class* value) → void
|
||||
;
|
||||
operator +(self::Class* cls) → self::Class*
|
||||
;
|
||||
method indexGetSetForEffect(core::Map<self::Class*, self::Class*>* map) → void
|
||||
;
|
||||
method indexGetSetForValue(core::Map<self::Class*, self::Class*>* map) → void
|
||||
;
|
||||
method implicitExtensionGetSetForEffect(core::int* i) → void
|
||||
;
|
||||
method implicitExtensionGetSetForValue(core::int* i) → void
|
||||
;
|
||||
method explicitExtensionGetSetForEffect(core::int* i) → void
|
||||
;
|
||||
method explicitExtensionGetSetForValue(core::int* i) → void
|
||||
;
|
||||
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 Subclass extends self::Class {
|
||||
synthetic constructor •() → self::Subclass*
|
||||
;
|
||||
method superIndexGetSetForEffect() → void
|
||||
;
|
||||
method superIndexGetSetForValue() → void
|
||||
;
|
||||
}
|
||||
class Class2 extends core::Object {
|
||||
synthetic constructor •() → self::Class2*
|
||||
;
|
||||
operator +(self::Class2* cls) → self::Class2*
|
||||
;
|
||||
method implicitExtensionGetSetForEffect() → void
|
||||
;
|
||||
method implicitExtensionGetSetForValue() → void
|
||||
;
|
||||
method explicitExtensionGetSetForEffect() → void
|
||||
;
|
||||
method explicitExtensionGetSetForValue() → void
|
||||
;
|
||||
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
|
||||
}
|
||||
extension Extension on core::int* {
|
||||
operator [] = self::Extension|[];
|
||||
operator []= = self::Extension|[]=;
|
||||
}
|
||||
extension Extension2 on self::Class2* {
|
||||
operator [] = self::Extension2|[];
|
||||
operator []= = self::Extension2|[]=;
|
||||
}
|
||||
static method Extension|[](lowered final core::int* #this, self::Class* cls) → self::Class*
|
||||
;
|
||||
static method Extension|[]=(lowered final core::int* #this, self::Class* cls, self::Class* value) → void
|
||||
;
|
||||
static method Extension2|[](lowered final self::Class2* #this, self::Class2* cls) → self::Class2*
|
||||
;
|
||||
static method Extension2|[]=(lowered final self::Class2* #this, self::Class2* cls, self::Class2* value) → void
|
||||
;
|
||||
static method main() → dynamic
|
||||
;
|
|
@ -0,0 +1,199 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class*
|
||||
: super core::Object::•()
|
||||
;
|
||||
operator [](self::Class* cls) → self::Class*
|
||||
return new self::Class::•();
|
||||
operator []=(self::Class* cls, self::Class* value) → void {}
|
||||
operator +(self::Class* cls) → self::Class*
|
||||
return cls;
|
||||
method indexGetSetForEffect(core::Map<self::Class*, self::Class*>* map) → void {
|
||||
final self::Class* self = this;
|
||||
let final core::Map<self::Class*, self::Class*>* #t1 = map in #t1.{core::Map::[]}(this).{self::Class::==}(null) ?{self::Class*} #t1.{core::Map::[]=}(this, this) : null;
|
||||
let final core::Map<self::Class*, self::Class*>* #t2 = map in #t2.{core::Map::[]}(self).{self::Class::==}(null) ?{self::Class*} #t2.{core::Map::[]=}(self, self) : null;
|
||||
map.{core::Map::[]=}(this, this);
|
||||
map.{core::Map::[]=}(self, self);
|
||||
map.{core::Map::[]}(this);
|
||||
map.{core::Map::[]}(self);
|
||||
let final core::Map<self::Class*, self::Class*>* #t3 = map in #t3.{core::Map::[]=}(this, #t3.{core::Map::[]}(this).{self::Class::+}(this));
|
||||
let final core::Map<self::Class*, self::Class*>* #t4 = map in #t4.{core::Map::[]=}(self, #t4.{core::Map::[]}(self).{self::Class::+}(self));
|
||||
}
|
||||
method indexGetSetForValue(core::Map<self::Class*, self::Class*>* map) → void {
|
||||
final self::Class* self = this;
|
||||
dynamic v;
|
||||
v = let final core::Map<self::Class*, self::Class*>* #t5 = map in let final self::Class* #t6 = #t5.{core::Map::[]}(this) in #t6.{self::Class::==}(null) ?{self::Class*} let final void #t7 = #t5.{core::Map::[]=}(this, this) in this : #t6;
|
||||
v = let final core::Map<self::Class*, self::Class*>* #t8 = map in let final self::Class* #t9 = #t8.{core::Map::[]}(self) in #t9.{self::Class::==}(null) ?{self::Class*} let final void #t10 = #t8.{core::Map::[]=}(self, self) in self : #t9;
|
||||
v = let final core::Map<self::Class*, self::Class*>* #t11 = map in let final void #t12 = #t11.{core::Map::[]=}(this, this) in this;
|
||||
v = let final core::Map<self::Class*, self::Class*>* #t13 = map in let final void #t14 = #t13.{core::Map::[]=}(self, self) in self;
|
||||
v = map.{core::Map::[]}(this);
|
||||
v = map.{core::Map::[]}(self);
|
||||
v = let final core::Map<self::Class*, self::Class*>* #t15 = map in let final self::Class* #t16 = #t15.{core::Map::[]}(this).{self::Class::+}(this) in let final void #t17 = #t15.{core::Map::[]=}(this, #t16) in #t16;
|
||||
v = let final core::Map<self::Class*, self::Class*>* #t18 = map in let final self::Class* #t19 = #t18.{core::Map::[]}(self).{self::Class::+}(self) in let final void #t20 = #t18.{core::Map::[]=}(self, #t19) in #t19;
|
||||
}
|
||||
method implicitExtensionGetSetForEffect(core::int* i) → void {
|
||||
final self::Class* self = this;
|
||||
let final core::int* #t21 = i in self::Extension|[](#t21, this).{self::Class::==}(null) ?{self::Class*} self::Extension|[]=(#t21, this, this) : null;
|
||||
let final core::int* #t22 = i in self::Extension|[](#t22, self).{self::Class::==}(null) ?{self::Class*} self::Extension|[]=(#t22, self, self) : null;
|
||||
self::Extension|[]=(i, this, this);
|
||||
self::Extension|[]=(i, self, self);
|
||||
self::Extension|[](i, this);
|
||||
self::Extension|[](i, self);
|
||||
let final core::int* #t23 = i in self::Extension|[]=(#t23, this, self::Extension|[](#t23, this).{self::Class::+}(this));
|
||||
let final core::int* #t24 = i in self::Extension|[]=(#t24, self, self::Extension|[](#t24, self).{self::Class::+}(self));
|
||||
}
|
||||
method implicitExtensionGetSetForValue(core::int* i) → void {
|
||||
final self::Class* self = this;
|
||||
dynamic v;
|
||||
v = let final core::int* #t25 = i in let final self::Class* #t26 = self::Extension|[](#t25, this) in #t26.{self::Class::==}(null) ?{self::Class*} let final void #t27 = self::Extension|[]=(#t25, this, this) in this : #t26;
|
||||
v = let final core::int* #t28 = i in let final self::Class* #t29 = self::Extension|[](#t28, self) in #t29.{self::Class::==}(null) ?{self::Class*} let final void #t30 = self::Extension|[]=(#t28, self, self) in self : #t29;
|
||||
v = let final core::int* #t31 = i in let final void #t32 = self::Extension|[]=(#t31, this, this) in this;
|
||||
v = let final core::int* #t33 = i in let final void #t34 = self::Extension|[]=(#t33, self, self) in self;
|
||||
v = self::Extension|[](i, this);
|
||||
v = self::Extension|[](i, self);
|
||||
v = let final core::int* #t35 = i in let final self::Class* #t36 = self::Extension|[](#t35, this).{self::Class::+}(this) in let final void #t37 = self::Extension|[]=(#t35, this, #t36) in #t36;
|
||||
v = let final core::int* #t38 = i in let final self::Class* #t39 = self::Extension|[](#t38, self).{self::Class::+}(self) in let final void #t40 = self::Extension|[]=(#t38, self, #t39) in #t39;
|
||||
}
|
||||
method explicitExtensionGetSetForEffect(core::int* i) → void {
|
||||
final self::Class* self = this;
|
||||
let final core::int* #t41 = i in self::Extension|[](#t41, this).{self::Class::==}(null) ?{self::Class*} self::Extension|[]=(#t41, this, this) : null;
|
||||
let final core::int* #t42 = i in self::Extension|[](#t42, self).{self::Class::==}(null) ?{self::Class*} self::Extension|[]=(#t42, self, self) : null;
|
||||
self::Extension|[]=(i, this, this);
|
||||
self::Extension|[]=(i, self, self);
|
||||
self::Extension|[](i, this);
|
||||
self::Extension|[](i, self);
|
||||
let final core::int* #t43 = i in self::Extension|[]=(#t43, this, self::Extension|[](#t43, this).{self::Class::+}(this));
|
||||
let final core::int* #t44 = i in self::Extension|[]=(#t44, self, self::Extension|[](#t44, self).{self::Class::+}(self));
|
||||
}
|
||||
method explicitExtensionGetSetForValue(core::int* i) → void {
|
||||
final self::Class* self = this;
|
||||
dynamic v;
|
||||
v = let final core::int* #t45 = i in let final self::Class* #t46 = self::Extension|[](#t45, this) in #t46.{self::Class::==}(null) ?{self::Class*} let final void #t47 = self::Extension|[]=(#t45, this, this) in this : #t46;
|
||||
v = let final core::int* #t48 = i in let final self::Class* #t49 = self::Extension|[](#t48, self) in #t49.{self::Class::==}(null) ?{self::Class*} let final void #t50 = self::Extension|[]=(#t48, self, self) in self : #t49;
|
||||
v = let final core::int* #t51 = i in let final void #t52 = self::Extension|[]=(#t51, this, this) in this;
|
||||
v = let final core::int* #t53 = i in let final void #t54 = self::Extension|[]=(#t53, self, self) in self;
|
||||
v = self::Extension|[](i, this);
|
||||
v = self::Extension|[](i, self);
|
||||
v = let final core::int* #t55 = i in let final self::Class* #t56 = self::Extension|[](#t55, this).{self::Class::+}(this) in let final void #t57 = self::Extension|[]=(#t55, this, #t56) in #t56;
|
||||
v = let final core::int* #t58 = i in let final self::Class* #t59 = self::Extension|[](#t58, self).{self::Class::+}(self) in let final void #t60 = self::Extension|[]=(#t58, self, #t59) in #t59;
|
||||
}
|
||||
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 Subclass extends self::Class {
|
||||
synthetic constructor •() → self::Subclass*
|
||||
: super self::Class::•()
|
||||
;
|
||||
method superIndexGetSetForEffect() → void {
|
||||
final self::Class* self = this;
|
||||
super.{self::Class::[]}(this).{self::Class::==}(null) ?{self::Class*} super.{self::Class::[]=}(this, this) : null;
|
||||
super.{self::Class::[]}(self).{self::Class::==}(null) ?{self::Class*} super.{self::Class::[]=}(self, self) : null;
|
||||
super.{self::Class::[]=}(this, this);
|
||||
super.{self::Class::[]=}(self, self);
|
||||
super.{self::Class::[]}(this);
|
||||
super.{self::Class::[]}(self);
|
||||
super.{self::Class::[]=}(this, super.{self::Class::[]}(this).{self::Class::+}(this));
|
||||
super.{self::Class::[]=}(self, super.{self::Class::[]}(self).{self::Class::+}(self));
|
||||
}
|
||||
method superIndexGetSetForValue() → void {
|
||||
final self::Class* self = this;
|
||||
dynamic v;
|
||||
v = let final self::Class* #t61 = super.{self::Class::[]}(this) in #t61.{self::Class::==}(null) ?{self::Class*} let final void #t62 = super.{self::Class::[]=}(this, this) in this : #t61;
|
||||
v = let final self::Class* #t63 = super.{self::Class::[]}(self) in #t63.{self::Class::==}(null) ?{self::Class*} let final void #t64 = super.{self::Class::[]=}(self, self) in self : #t63;
|
||||
v = let final void #t65 = super.{self::Class::[]=}(this, this) in this;
|
||||
v = let final void #t66 = super.{self::Class::[]=}(self, self) in self;
|
||||
v = super.{self::Class::[]}(this);
|
||||
v = super.{self::Class::[]}(self);
|
||||
v = let final self::Class* #t67 = super.{self::Class::[]}(this).{self::Class::+}(this) in let final void #t68 = super.{self::Class::[]=}(this, #t67) in #t67;
|
||||
v = let final self::Class* #t69 = super.{self::Class::[]}(self).{self::Class::+}(self) in let final void #t70 = super.{self::Class::[]=}(self, #t69) in #t69;
|
||||
}
|
||||
}
|
||||
class Class2 extends core::Object {
|
||||
synthetic constructor •() → self::Class2*
|
||||
: super core::Object::•()
|
||||
;
|
||||
operator +(self::Class2* cls) → self::Class2*
|
||||
return cls;
|
||||
method implicitExtensionGetSetForEffect() → void {
|
||||
final self::Class2* self = this;
|
||||
self::Extension2|[](this, this).{self::Class2::==}(null) ?{self::Class2*} self::Extension2|[]=(this, this, this) : null;
|
||||
self::Extension2|[](self, self).{self::Class2::==}(null) ?{self::Class2*} self::Extension2|[]=(self, self, self) : null;
|
||||
self::Extension2|[]=(this, this, this);
|
||||
self::Extension2|[]=(self, self, self);
|
||||
self::Extension2|[](this, this);
|
||||
self::Extension2|[](self, self);
|
||||
self::Extension2|[]=(this, this, self::Extension2|[](this, this).{self::Class2::+}(this));
|
||||
self::Extension2|[]=(self, self, self::Extension2|[](self, self).{self::Class2::+}(self));
|
||||
}
|
||||
method implicitExtensionGetSetForValue() → void {
|
||||
final self::Class2* self = this;
|
||||
dynamic v;
|
||||
v = let final self::Class2* #t71 = self::Extension2|[](this, this) in #t71.{self::Class2::==}(null) ?{self::Class2*} let final void #t72 = self::Extension2|[]=(this, this, this) in this : #t71;
|
||||
v = let final self::Class2* #t73 = self::Extension2|[](self, self) in #t73.{self::Class2::==}(null) ?{self::Class2*} let final void #t74 = self::Extension2|[]=(self, self, self) in self : #t73;
|
||||
v = let final void #t75 = self::Extension2|[]=(this, this, this) in this;
|
||||
v = let final void #t76 = self::Extension2|[]=(self, self, self) in self;
|
||||
v = self::Extension2|[](this, this);
|
||||
v = self::Extension2|[](self, self);
|
||||
v = let final self::Class2* #t77 = self::Extension2|[](this, this).{self::Class2::+}(this) in let final void #t78 = self::Extension2|[]=(this, this, #t77) in #t77;
|
||||
v = let final self::Class2* #t79 = self::Extension2|[](self, self).{self::Class2::+}(self) in let final void #t80 = self::Extension2|[]=(self, self, #t79) in #t79;
|
||||
}
|
||||
method explicitExtensionGetSetForEffect() → void {
|
||||
final self::Class2* self = this;
|
||||
self::Extension2|[](this, this).{self::Class2::==}(null) ?{self::Class2*} self::Extension2|[]=(this, this, this) : null;
|
||||
self::Extension2|[](self, self).{self::Class2::==}(null) ?{self::Class2*} self::Extension2|[]=(self, self, self) : null;
|
||||
self::Extension2|[]=(this, this, this);
|
||||
self::Extension2|[]=(self, self, self);
|
||||
self::Extension2|[](this, this);
|
||||
self::Extension2|[](self, self);
|
||||
self::Extension2|[]=(this, this, self::Extension2|[](this, this).{self::Class2::+}(this));
|
||||
self::Extension2|[]=(self, self, self::Extension2|[](self, self).{self::Class2::+}(self));
|
||||
}
|
||||
method explicitExtensionGetSetForValue() → void {
|
||||
final self::Class2* self = this;
|
||||
dynamic v;
|
||||
v = let final self::Class2* #t81 = self::Extension2|[](this, this) in #t81.{self::Class2::==}(null) ?{self::Class2*} let final void #t82 = self::Extension2|[]=(this, this, this) in this : #t81;
|
||||
v = let final self::Class2* #t83 = self::Extension2|[](self, self) in #t83.{self::Class2::==}(null) ?{self::Class2*} let final void #t84 = self::Extension2|[]=(self, self, self) in self : #t83;
|
||||
v = let final void #t85 = self::Extension2|[]=(this, this, this) in this;
|
||||
v = let final void #t86 = self::Extension2|[]=(self, self, self) in self;
|
||||
v = self::Extension2|[](this, this);
|
||||
v = self::Extension2|[](self, self);
|
||||
v = let final self::Class2* #t87 = self::Extension2|[](this, this).{self::Class2::+}(this) in let final void #t88 = self::Extension2|[]=(this, this, #t87) in #t87;
|
||||
v = let final self::Class2* #t89 = self::Extension2|[](self, self).{self::Class2::+}(self) in let final void #t90 = self::Extension2|[]=(self, self, #t89) in #t89;
|
||||
}
|
||||
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
|
||||
}
|
||||
extension Extension on core::int* {
|
||||
operator [] = self::Extension|[];
|
||||
operator []= = self::Extension|[]=;
|
||||
}
|
||||
extension Extension2 on self::Class2* {
|
||||
operator [] = self::Extension2|[];
|
||||
operator []= = self::Extension2|[]=;
|
||||
}
|
||||
static method Extension|[](lowered final core::int* #this, self::Class* cls) → self::Class*
|
||||
return new self::Class::•();
|
||||
static method Extension|[]=(lowered final core::int* #this, self::Class* cls, self::Class* value) → void {}
|
||||
static method Extension2|[](lowered final self::Class2* #this, self::Class2* cls) → self::Class2*
|
||||
return new self::Class2::•();
|
||||
static method Extension2|[]=(lowered final self::Class2* #this, self::Class2* cls, self::Class2* value) → void {}
|
||||
static method main() → dynamic {}
|
|
@ -0,0 +1,199 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class*
|
||||
: super core::Object::•()
|
||||
;
|
||||
operator [](self::Class* cls) → self::Class*
|
||||
return new self::Class::•();
|
||||
operator []=(self::Class* cls, self::Class* value) → void {}
|
||||
operator +(self::Class* cls) → self::Class*
|
||||
return cls;
|
||||
method indexGetSetForEffect(core::Map<self::Class*, self::Class*>* map) → void {
|
||||
final self::Class* self = this;
|
||||
let final core::Map<self::Class*, self::Class*>* #t1 = map in #t1.{core::Map::[]}(this).{self::Class::==}(null) ?{self::Class*} #t1.{core::Map::[]=}(this, this) : null;
|
||||
let final core::Map<self::Class*, self::Class*>* #t2 = map in #t2.{core::Map::[]}(self).{self::Class::==}(null) ?{self::Class*} #t2.{core::Map::[]=}(self, self) : null;
|
||||
map.{core::Map::[]=}(this, this);
|
||||
map.{core::Map::[]=}(self, self);
|
||||
map.{core::Map::[]}(this);
|
||||
map.{core::Map::[]}(self);
|
||||
let final core::Map<self::Class*, self::Class*>* #t3 = map in #t3.{core::Map::[]=}(this, #t3.{core::Map::[]}(this).{self::Class::+}(this));
|
||||
let final core::Map<self::Class*, self::Class*>* #t4 = map in #t4.{core::Map::[]=}(self, #t4.{core::Map::[]}(self).{self::Class::+}(self));
|
||||
}
|
||||
method indexGetSetForValue(core::Map<self::Class*, self::Class*>* map) → void {
|
||||
final self::Class* self = this;
|
||||
dynamic v;
|
||||
v = let final core::Map<self::Class*, self::Class*>* #t5 = map in let final self::Class* #t6 = #t5.{core::Map::[]}(this) in #t6.{self::Class::==}(null) ?{self::Class*} let final void #t7 = #t5.{core::Map::[]=}(this, this) in this : #t6;
|
||||
v = let final core::Map<self::Class*, self::Class*>* #t8 = map in let final self::Class* #t9 = #t8.{core::Map::[]}(self) in #t9.{self::Class::==}(null) ?{self::Class*} let final void #t10 = #t8.{core::Map::[]=}(self, self) in self : #t9;
|
||||
v = let final core::Map<self::Class*, self::Class*>* #t11 = map in let final void #t12 = #t11.{core::Map::[]=}(this, this) in this;
|
||||
v = let final core::Map<self::Class*, self::Class*>* #t13 = map in let final void #t14 = #t13.{core::Map::[]=}(self, self) in self;
|
||||
v = map.{core::Map::[]}(this);
|
||||
v = map.{core::Map::[]}(self);
|
||||
v = let final core::Map<self::Class*, self::Class*>* #t15 = map in let final self::Class* #t16 = #t15.{core::Map::[]}(this).{self::Class::+}(this) in let final void #t17 = #t15.{core::Map::[]=}(this, #t16) in #t16;
|
||||
v = let final core::Map<self::Class*, self::Class*>* #t18 = map in let final self::Class* #t19 = #t18.{core::Map::[]}(self).{self::Class::+}(self) in let final void #t20 = #t18.{core::Map::[]=}(self, #t19) in #t19;
|
||||
}
|
||||
method implicitExtensionGetSetForEffect(core::int* i) → void {
|
||||
final self::Class* self = this;
|
||||
let final core::int* #t21 = i in self::Extension|[](#t21, this).{self::Class::==}(null) ?{self::Class*} self::Extension|[]=(#t21, this, this) : null;
|
||||
let final core::int* #t22 = i in self::Extension|[](#t22, self).{self::Class::==}(null) ?{self::Class*} self::Extension|[]=(#t22, self, self) : null;
|
||||
self::Extension|[]=(i, this, this);
|
||||
self::Extension|[]=(i, self, self);
|
||||
self::Extension|[](i, this);
|
||||
self::Extension|[](i, self);
|
||||
let final core::int* #t23 = i in self::Extension|[]=(#t23, this, self::Extension|[](#t23, this).{self::Class::+}(this));
|
||||
let final core::int* #t24 = i in self::Extension|[]=(#t24, self, self::Extension|[](#t24, self).{self::Class::+}(self));
|
||||
}
|
||||
method implicitExtensionGetSetForValue(core::int* i) → void {
|
||||
final self::Class* self = this;
|
||||
dynamic v;
|
||||
v = let final core::int* #t25 = i in let final self::Class* #t26 = self::Extension|[](#t25, this) in #t26.{self::Class::==}(null) ?{self::Class*} let final void #t27 = self::Extension|[]=(#t25, this, this) in this : #t26;
|
||||
v = let final core::int* #t28 = i in let final self::Class* #t29 = self::Extension|[](#t28, self) in #t29.{self::Class::==}(null) ?{self::Class*} let final void #t30 = self::Extension|[]=(#t28, self, self) in self : #t29;
|
||||
v = let final core::int* #t31 = i in let final void #t32 = self::Extension|[]=(#t31, this, this) in this;
|
||||
v = let final core::int* #t33 = i in let final void #t34 = self::Extension|[]=(#t33, self, self) in self;
|
||||
v = self::Extension|[](i, this);
|
||||
v = self::Extension|[](i, self);
|
||||
v = let final core::int* #t35 = i in let final self::Class* #t36 = self::Extension|[](#t35, this).{self::Class::+}(this) in let final void #t37 = self::Extension|[]=(#t35, this, #t36) in #t36;
|
||||
v = let final core::int* #t38 = i in let final self::Class* #t39 = self::Extension|[](#t38, self).{self::Class::+}(self) in let final void #t40 = self::Extension|[]=(#t38, self, #t39) in #t39;
|
||||
}
|
||||
method explicitExtensionGetSetForEffect(core::int* i) → void {
|
||||
final self::Class* self = this;
|
||||
let final core::int* #t41 = i in self::Extension|[](#t41, this).{self::Class::==}(null) ?{self::Class*} self::Extension|[]=(#t41, this, this) : null;
|
||||
let final core::int* #t42 = i in self::Extension|[](#t42, self).{self::Class::==}(null) ?{self::Class*} self::Extension|[]=(#t42, self, self) : null;
|
||||
self::Extension|[]=(i, this, this);
|
||||
self::Extension|[]=(i, self, self);
|
||||
self::Extension|[](i, this);
|
||||
self::Extension|[](i, self);
|
||||
let final core::int* #t43 = i in self::Extension|[]=(#t43, this, self::Extension|[](#t43, this).{self::Class::+}(this));
|
||||
let final core::int* #t44 = i in self::Extension|[]=(#t44, self, self::Extension|[](#t44, self).{self::Class::+}(self));
|
||||
}
|
||||
method explicitExtensionGetSetForValue(core::int* i) → void {
|
||||
final self::Class* self = this;
|
||||
dynamic v;
|
||||
v = let final core::int* #t45 = i in let final self::Class* #t46 = self::Extension|[](#t45, this) in #t46.{self::Class::==}(null) ?{self::Class*} let final void #t47 = self::Extension|[]=(#t45, this, this) in this : #t46;
|
||||
v = let final core::int* #t48 = i in let final self::Class* #t49 = self::Extension|[](#t48, self) in #t49.{self::Class::==}(null) ?{self::Class*} let final void #t50 = self::Extension|[]=(#t48, self, self) in self : #t49;
|
||||
v = let final core::int* #t51 = i in let final void #t52 = self::Extension|[]=(#t51, this, this) in this;
|
||||
v = let final core::int* #t53 = i in let final void #t54 = self::Extension|[]=(#t53, self, self) in self;
|
||||
v = self::Extension|[](i, this);
|
||||
v = self::Extension|[](i, self);
|
||||
v = let final core::int* #t55 = i in let final self::Class* #t56 = self::Extension|[](#t55, this).{self::Class::+}(this) in let final void #t57 = self::Extension|[]=(#t55, this, #t56) in #t56;
|
||||
v = let final core::int* #t58 = i in let final self::Class* #t59 = self::Extension|[](#t58, self).{self::Class::+}(self) in let final void #t60 = self::Extension|[]=(#t58, self, #t59) in #t59;
|
||||
}
|
||||
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 Subclass extends self::Class {
|
||||
synthetic constructor •() → self::Subclass*
|
||||
: super self::Class::•()
|
||||
;
|
||||
method superIndexGetSetForEffect() → void {
|
||||
final self::Class* self = this;
|
||||
super.{self::Class::[]}(this).{self::Class::==}(null) ?{self::Class*} super.{self::Class::[]=}(this, this) : null;
|
||||
super.{self::Class::[]}(self).{self::Class::==}(null) ?{self::Class*} super.{self::Class::[]=}(self, self) : null;
|
||||
super.{self::Class::[]=}(this, this);
|
||||
super.{self::Class::[]=}(self, self);
|
||||
super.{self::Class::[]}(this);
|
||||
super.{self::Class::[]}(self);
|
||||
super.{self::Class::[]=}(this, super.{self::Class::[]}(this).{self::Class::+}(this));
|
||||
super.{self::Class::[]=}(self, super.{self::Class::[]}(self).{self::Class::+}(self));
|
||||
}
|
||||
method superIndexGetSetForValue() → void {
|
||||
final self::Class* self = this;
|
||||
dynamic v;
|
||||
v = let final self::Class* #t61 = super.{self::Class::[]}(this) in #t61.{self::Class::==}(null) ?{self::Class*} let final void #t62 = super.{self::Class::[]=}(this, this) in this : #t61;
|
||||
v = let final self::Class* #t63 = super.{self::Class::[]}(self) in #t63.{self::Class::==}(null) ?{self::Class*} let final void #t64 = super.{self::Class::[]=}(self, self) in self : #t63;
|
||||
v = let final void #t65 = super.{self::Class::[]=}(this, this) in this;
|
||||
v = let final void #t66 = super.{self::Class::[]=}(self, self) in self;
|
||||
v = super.{self::Class::[]}(this);
|
||||
v = super.{self::Class::[]}(self);
|
||||
v = let final self::Class* #t67 = super.{self::Class::[]}(this).{self::Class::+}(this) in let final void #t68 = super.{self::Class::[]=}(this, #t67) in #t67;
|
||||
v = let final self::Class* #t69 = super.{self::Class::[]}(self).{self::Class::+}(self) in let final void #t70 = super.{self::Class::[]=}(self, #t69) in #t69;
|
||||
}
|
||||
}
|
||||
class Class2 extends core::Object {
|
||||
synthetic constructor •() → self::Class2*
|
||||
: super core::Object::•()
|
||||
;
|
||||
operator +(self::Class2* cls) → self::Class2*
|
||||
return cls;
|
||||
method implicitExtensionGetSetForEffect() → void {
|
||||
final self::Class2* self = this;
|
||||
self::Extension2|[](this, this).{self::Class2::==}(null) ?{self::Class2*} self::Extension2|[]=(this, this, this) : null;
|
||||
self::Extension2|[](self, self).{self::Class2::==}(null) ?{self::Class2*} self::Extension2|[]=(self, self, self) : null;
|
||||
self::Extension2|[]=(this, this, this);
|
||||
self::Extension2|[]=(self, self, self);
|
||||
self::Extension2|[](this, this);
|
||||
self::Extension2|[](self, self);
|
||||
self::Extension2|[]=(this, this, self::Extension2|[](this, this).{self::Class2::+}(this));
|
||||
self::Extension2|[]=(self, self, self::Extension2|[](self, self).{self::Class2::+}(self));
|
||||
}
|
||||
method implicitExtensionGetSetForValue() → void {
|
||||
final self::Class2* self = this;
|
||||
dynamic v;
|
||||
v = let final self::Class2* #t71 = self::Extension2|[](this, this) in #t71.{self::Class2::==}(null) ?{self::Class2*} let final void #t72 = self::Extension2|[]=(this, this, this) in this : #t71;
|
||||
v = let final self::Class2* #t73 = self::Extension2|[](self, self) in #t73.{self::Class2::==}(null) ?{self::Class2*} let final void #t74 = self::Extension2|[]=(self, self, self) in self : #t73;
|
||||
v = let final void #t75 = self::Extension2|[]=(this, this, this) in this;
|
||||
v = let final void #t76 = self::Extension2|[]=(self, self, self) in self;
|
||||
v = self::Extension2|[](this, this);
|
||||
v = self::Extension2|[](self, self);
|
||||
v = let final self::Class2* #t77 = self::Extension2|[](this, this).{self::Class2::+}(this) in let final void #t78 = self::Extension2|[]=(this, this, #t77) in #t77;
|
||||
v = let final self::Class2* #t79 = self::Extension2|[](self, self).{self::Class2::+}(self) in let final void #t80 = self::Extension2|[]=(self, self, #t79) in #t79;
|
||||
}
|
||||
method explicitExtensionGetSetForEffect() → void {
|
||||
final self::Class2* self = this;
|
||||
self::Extension2|[](this, this).{self::Class2::==}(null) ?{self::Class2*} self::Extension2|[]=(this, this, this) : null;
|
||||
self::Extension2|[](self, self).{self::Class2::==}(null) ?{self::Class2*} self::Extension2|[]=(self, self, self) : null;
|
||||
self::Extension2|[]=(this, this, this);
|
||||
self::Extension2|[]=(self, self, self);
|
||||
self::Extension2|[](this, this);
|
||||
self::Extension2|[](self, self);
|
||||
self::Extension2|[]=(this, this, self::Extension2|[](this, this).{self::Class2::+}(this));
|
||||
self::Extension2|[]=(self, self, self::Extension2|[](self, self).{self::Class2::+}(self));
|
||||
}
|
||||
method explicitExtensionGetSetForValue() → void {
|
||||
final self::Class2* self = this;
|
||||
dynamic v;
|
||||
v = let final self::Class2* #t81 = self::Extension2|[](this, this) in #t81.{self::Class2::==}(null) ?{self::Class2*} let final void #t82 = self::Extension2|[]=(this, this, this) in this : #t81;
|
||||
v = let final self::Class2* #t83 = self::Extension2|[](self, self) in #t83.{self::Class2::==}(null) ?{self::Class2*} let final void #t84 = self::Extension2|[]=(self, self, self) in self : #t83;
|
||||
v = let final void #t85 = self::Extension2|[]=(this, this, this) in this;
|
||||
v = let final void #t86 = self::Extension2|[]=(self, self, self) in self;
|
||||
v = self::Extension2|[](this, this);
|
||||
v = self::Extension2|[](self, self);
|
||||
v = let final self::Class2* #t87 = self::Extension2|[](this, this).{self::Class2::+}(this) in let final void #t88 = self::Extension2|[]=(this, this, #t87) in #t87;
|
||||
v = let final self::Class2* #t89 = self::Extension2|[](self, self).{self::Class2::+}(self) in let final void #t90 = self::Extension2|[]=(self, self, #t89) in #t89;
|
||||
}
|
||||
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
|
||||
}
|
||||
extension Extension on core::int* {
|
||||
operator [] = self::Extension|[];
|
||||
operator []= = self::Extension|[]=;
|
||||
}
|
||||
extension Extension2 on self::Class2* {
|
||||
operator [] = self::Extension2|[];
|
||||
operator []= = self::Extension2|[]=;
|
||||
}
|
||||
static method Extension|[](lowered final core::int* #this, self::Class* cls) → self::Class*
|
||||
return new self::Class::•();
|
||||
static method Extension|[]=(lowered final core::int* #this, self::Class* cls, self::Class* value) → void {}
|
||||
static method Extension2|[](lowered final self::Class2* #this, self::Class2* cls) → self::Class2*
|
||||
return new self::Class2::•();
|
||||
static method Extension2|[]=(lowered final self::Class2* #this, self::Class2* cls, self::Class2* value) → void {}
|
||||
static method main() → dynamic {}
|
|
@ -0,0 +1,28 @@
|
|||
// @dart = 2.9
|
||||
extension Extension ;
|
||||
on int (){}
|
||||
class Class {
|
||||
Class operator [](Class cls) => new Class();
|
||||
void operator []=(Class cls, Class value) {}
|
||||
Class operator +(Class cls) => cls;
|
||||
void indexGetSetForEffect(Map<Class, Class> map) {}
|
||||
void indexGetSetForValue(Map<Class, Class> map) {}
|
||||
void implicitExtensionGetSetForEffect(int i) {}
|
||||
void implicitExtensionGetSetForValue(int i) {}
|
||||
void explicitExtensionGetSetForEffect(int i) {}
|
||||
void explicitExtensionGetSetForValue(int i) {}
|
||||
}
|
||||
class Subclass extends Class {
|
||||
void superIndexGetSetForEffect() {}
|
||||
void superIndexGetSetForValue() {}
|
||||
}
|
||||
extension Extension2 ;
|
||||
on Class2 (){}
|
||||
class Class2 {
|
||||
Class2 operator +(Class2 cls) => cls;
|
||||
void implicitExtensionGetSetForEffect() {}
|
||||
void implicitExtensionGetSetForValue() {}
|
||||
void explicitExtensionGetSetForEffect() {}
|
||||
void explicitExtensionGetSetForValue() {}
|
||||
}
|
||||
main() {}
|
232
pkg/front_end/testcases/nnbd/pure_index_expressions.dart
Normal file
232
pkg/front_end/testcases/nnbd/pure_index_expressions.dart
Normal file
|
@ -0,0 +1,232 @@
|
|||
// 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.
|
||||
|
||||
bool b = true;
|
||||
|
||||
abstract class Map<K, V> {
|
||||
V operator [](K index);
|
||||
void operator []=(K index, V value);
|
||||
}
|
||||
|
||||
extension Extension on int {
|
||||
Class operator [](Class cls) => new Class();
|
||||
void operator []=(Class cls, Class value) {}
|
||||
}
|
||||
|
||||
class Class {
|
||||
Class operator [](Class cls) => new Class();
|
||||
void operator []=(Class cls, Class value) {}
|
||||
Class operator +(Class cls) => cls;
|
||||
|
||||
void indexGetSetForEffect(Map<Class, Class> map) {
|
||||
late final Class self;
|
||||
if (b) self = this;
|
||||
map[this] ??= this;
|
||||
map[self] ??= self;
|
||||
|
||||
map[this] = this;
|
||||
map[self] = self;
|
||||
|
||||
map[this];
|
||||
map[self];
|
||||
|
||||
map[this] += this;
|
||||
map[self] += self;
|
||||
}
|
||||
|
||||
void indexGetSetForValue(Map<Class, Class> map) {
|
||||
late final Class self;
|
||||
if (b) self = this;
|
||||
var v;
|
||||
v = map[this] ??= this;
|
||||
v = map[self] ??= self;
|
||||
|
||||
v = map[this] = this;
|
||||
v = map[self] = self;
|
||||
|
||||
v = map[this];
|
||||
v = map[self];
|
||||
|
||||
v = map[this] += this;
|
||||
v = map[self] += self;
|
||||
}
|
||||
|
||||
void implicitExtensionGetSetForEffect(int i) {
|
||||
late final Class self;
|
||||
if (b) self = this;
|
||||
i[this] ??= this;
|
||||
i[self] ??= self;
|
||||
|
||||
i[this] = this;
|
||||
i[self] = self;
|
||||
|
||||
i[this];
|
||||
i[self];
|
||||
|
||||
i[this] += this;
|
||||
i[self] += self;
|
||||
}
|
||||
|
||||
void implicitExtensionGetSetForValue(int i) {
|
||||
late final Class self;
|
||||
if (b) self = this;
|
||||
var v;
|
||||
v = i[this] ??= this;
|
||||
v = i[self] ??= self;
|
||||
|
||||
v = i[this] = this;
|
||||
v = i[self] = self;
|
||||
|
||||
v = i[this];
|
||||
v = i[self];
|
||||
|
||||
v = i[this] += this;
|
||||
v = i[self] += self;
|
||||
}
|
||||
|
||||
void explicitExtensionGetSetForEffect(int i) {
|
||||
late final Class self;
|
||||
if (b) self = this;
|
||||
Extension(i)[this] ??= this;
|
||||
Extension(i)[self] ??= self;
|
||||
|
||||
Extension(i)[this] = this;
|
||||
Extension(i)[self] = self;
|
||||
|
||||
Extension(i)[this];
|
||||
Extension(i)[self];
|
||||
|
||||
Extension(i)[this] += this;
|
||||
Extension(i)[self] += self;
|
||||
}
|
||||
|
||||
void explicitExtensionGetSetForValue(int i) {
|
||||
late final Class self;
|
||||
if (b) self = this;
|
||||
var v;
|
||||
v = Extension(i)[this] ??= this;
|
||||
v = Extension(i)[self] ??= self;
|
||||
|
||||
v = Extension(i)[this] = this;
|
||||
v = Extension(i)[self] = self;
|
||||
|
||||
v = Extension(i)[this];
|
||||
v = Extension(i)[self];
|
||||
|
||||
v = Extension(i)[this] += this;
|
||||
v = Extension(i)[self] += self;
|
||||
}
|
||||
}
|
||||
|
||||
class Subclass extends Class {
|
||||
void superIndexGetSetForEffect() {
|
||||
late final Class self;
|
||||
if (b) self = this;
|
||||
super[this] ??= this;
|
||||
super[self] ??= self;
|
||||
|
||||
super[this] = this;
|
||||
super[self] = self;
|
||||
|
||||
super[this];
|
||||
super[self];
|
||||
|
||||
super[this] += this;
|
||||
super[self] += self;
|
||||
}
|
||||
|
||||
void superIndexGetSetForValue() {
|
||||
late final Class self;
|
||||
if (b) self = this;
|
||||
var v;
|
||||
v = super[this] ??= this;
|
||||
v = super[self] ??= self;
|
||||
|
||||
v = super[this] = this;
|
||||
v = super[self] = self;
|
||||
|
||||
v = super[this];
|
||||
v = super[self];
|
||||
|
||||
v = super[this] += this;
|
||||
v = super[self] += self;
|
||||
}
|
||||
}
|
||||
|
||||
extension Extension2 on Class2 {
|
||||
Class2 operator [](Class2 cls) => new Class2();
|
||||
void operator []=(Class2 cls, Class2 value) {}
|
||||
}
|
||||
|
||||
class Class2 {
|
||||
Class2 operator +(Class2 cls) => cls;
|
||||
|
||||
void implicitExtensionGetSetForEffect() {
|
||||
late final Class2 self;
|
||||
if (b) self = this;
|
||||
this[this] ??= this;
|
||||
self[self] ??= self;
|
||||
|
||||
this[this] = this;
|
||||
self[self] = self;
|
||||
|
||||
this[this];
|
||||
self[self];
|
||||
|
||||
this[this] += this;
|
||||
self[self] += self;
|
||||
}
|
||||
|
||||
void implicitExtensionGetSetForValue() {
|
||||
late final Class2 self;
|
||||
if (b) self = this;
|
||||
var v;
|
||||
v = this[this] ??= this;
|
||||
v = self[self] ??= self;
|
||||
|
||||
v = this[this] = this;
|
||||
v = self[self] = self;
|
||||
|
||||
v = this[this];
|
||||
v = self[self];
|
||||
|
||||
v = this[this] += this;
|
||||
v = self[self] += self;
|
||||
}
|
||||
|
||||
void explicitExtensionGetSetForEffect() {
|
||||
late final Class2 self;
|
||||
if (b) self = this;
|
||||
Extension2(this)[this] ??= this;
|
||||
Extension2(self)[self] ??= self;
|
||||
|
||||
Extension2(this)[this] = this;
|
||||
Extension2(self)[self] = self;
|
||||
|
||||
Extension2(this)[this];
|
||||
Extension2(self)[self];
|
||||
|
||||
Extension2(this)[this] += this;
|
||||
Extension2(self)[self] += self;
|
||||
}
|
||||
|
||||
void explicitExtensionGetSetForValue() {
|
||||
late final Class2 self;
|
||||
if (b) self = this;
|
||||
var v;
|
||||
v = Extension2(this)[this] ??= this;
|
||||
v = Extension2(self)[self] ??= self;
|
||||
|
||||
v = Extension2(this)[this] = this;
|
||||
v = Extension2(self)[self] = self;
|
||||
|
||||
v = Extension2(this)[this];
|
||||
v = Extension2(self)[self];
|
||||
|
||||
v = Extension2(this)[this] += this;
|
||||
v = Extension2(self)[self] += self;
|
||||
}
|
||||
}
|
||||
|
||||
main() {}
|
|
@ -0,0 +1,73 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
abstract class Map<K extends core::Object? = dynamic, V extends core::Object? = dynamic> extends core::Object {
|
||||
synthetic constructor •() → self::Map<self::Map::K%, self::Map::V%>
|
||||
;
|
||||
abstract operator [](generic-covariant-impl self::Map::K% index) → self::Map::V%;
|
||||
abstract operator []=(generic-covariant-impl self::Map::K% index, generic-covariant-impl self::Map::V% value) → void;
|
||||
}
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class
|
||||
;
|
||||
operator [](self::Class cls) → self::Class
|
||||
;
|
||||
operator []=(self::Class cls, self::Class value) → void
|
||||
;
|
||||
operator +(self::Class cls) → self::Class
|
||||
;
|
||||
method indexGetSetForEffect(self::Map<self::Class, self::Class> map) → void
|
||||
;
|
||||
method indexGetSetForValue(self::Map<self::Class, self::Class> map) → void
|
||||
;
|
||||
method implicitExtensionGetSetForEffect(core::int i) → void
|
||||
;
|
||||
method implicitExtensionGetSetForValue(core::int i) → void
|
||||
;
|
||||
method explicitExtensionGetSetForEffect(core::int i) → void
|
||||
;
|
||||
method explicitExtensionGetSetForValue(core::int i) → void
|
||||
;
|
||||
}
|
||||
class Subclass extends self::Class {
|
||||
synthetic constructor •() → self::Subclass
|
||||
;
|
||||
method superIndexGetSetForEffect() → void
|
||||
;
|
||||
method superIndexGetSetForValue() → void
|
||||
;
|
||||
}
|
||||
class Class2 extends core::Object {
|
||||
synthetic constructor •() → self::Class2
|
||||
;
|
||||
operator +(self::Class2 cls) → self::Class2
|
||||
;
|
||||
method implicitExtensionGetSetForEffect() → void
|
||||
;
|
||||
method implicitExtensionGetSetForValue() → void
|
||||
;
|
||||
method explicitExtensionGetSetForEffect() → void
|
||||
;
|
||||
method explicitExtensionGetSetForValue() → void
|
||||
;
|
||||
}
|
||||
extension Extension on core::int {
|
||||
operator [] = self::Extension|[];
|
||||
operator []= = self::Extension|[]=;
|
||||
}
|
||||
extension Extension2 on self::Class2 {
|
||||
operator [] = self::Extension2|[];
|
||||
operator []= = self::Extension2|[]=;
|
||||
}
|
||||
static field core::bool b;
|
||||
static method Extension|[](lowered final core::int #this, self::Class cls) → self::Class
|
||||
;
|
||||
static method Extension|[]=(lowered final core::int #this, self::Class cls, self::Class value) → void
|
||||
;
|
||||
static method Extension2|[](lowered final self::Class2 #this, self::Class2 cls) → self::Class2
|
||||
;
|
||||
static method Extension2|[]=(lowered final self::Class2 #this, self::Class2 cls, self::Class2 value) → void
|
||||
;
|
||||
static method main() → dynamic
|
||||
;
|
|
@ -0,0 +1,334 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:25:8: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// map[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:26:8: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// map[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:42:12: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = map[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:43:12: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = map[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:58:6: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// i[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:59:6: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// i[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:75:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = i[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:76:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = i[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:91:17: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// Extension(i)[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:92:17: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// Extension(i)[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:108:21: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = Extension(i)[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:109:21: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = Extension(i)[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:126:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// super[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:127:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// super[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:143:14: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = super[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:144:14: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = super[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:168:9: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// this[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:169:9: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// self[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:185:13: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = this[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:186:13: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = self[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:201:21: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// Extension2(this)[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:202:21: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// Extension2(self)[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:218:25: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = Extension2(this)[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:219:25: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = Extension2(self)[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
abstract class Map<K extends core::Object? = dynamic, V extends core::Object? = dynamic> extends core::Object {
|
||||
synthetic constructor •() → self::Map<self::Map::K%, self::Map::V%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
abstract operator [](generic-covariant-impl self::Map::K% index) → self::Map::V%;
|
||||
abstract operator []=(generic-covariant-impl self::Map::K% index, generic-covariant-impl self::Map::V% value) → void;
|
||||
}
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
operator [](self::Class cls) → self::Class
|
||||
return new self::Class::•();
|
||||
operator []=(self::Class cls, self::Class value) → void {}
|
||||
operator +(self::Class cls) → self::Class
|
||||
return cls;
|
||||
method indexGetSetForEffect(self::Map<self::Class, self::Class> map) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
let final self::Map<self::Class, self::Class> #t1 = map in #t1.{self::Map::[]}(this).{core::Object::==}(null) ?{self::Class} #t1.{self::Map::[]=}(this, this) : null;
|
||||
let final self::Map<self::Class, self::Class> #t2 = map in let final self::Class #t3 = self in #t2.{self::Map::[]}(#t3).{core::Object::==}(null) ?{self::Class} #t2.{self::Map::[]=}(#t3, self) : null;
|
||||
map.{self::Map::[]=}(this, this);
|
||||
map.{self::Map::[]=}(self, self);
|
||||
map.{self::Map::[]}(this);
|
||||
map.{self::Map::[]}(self);
|
||||
let final self::Map<self::Class, self::Class> #t4 = map in #t4.{self::Map::[]=}(this, #t4.{self::Map::[]}(this).{self::Class::+}(this));
|
||||
let final self::Map<self::Class, self::Class> #t5 = map in let final self::Class #t6 = self in #t5.{self::Map::[]=}(#t6, #t5.{self::Map::[]}(#t6).{self::Class::+}(self));
|
||||
}
|
||||
method indexGetSetForValue(self::Map<self::Class, self::Class> map) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final self::Map<self::Class, self::Class> #t7 = map in let final self::Class #t8 = #t7.{self::Map::[]}(this) in #t8.{core::Object::==}(null) ?{self::Class} let final void #t9 = #t7.{self::Map::[]=}(this, this) in this : #t8;
|
||||
v = let final self::Map<self::Class, self::Class> #t10 = map in let final self::Class #t11 = self in let final self::Class #t12 = #t10.{self::Map::[]}(#t11) in #t12.{core::Object::==}(null) ?{self::Class} let final self::Class #t13 = self in let final void #t14 = #t10.{self::Map::[]=}(#t11, #t13) in #t13 : #t12;
|
||||
v = let final self::Map<self::Class, self::Class> #t15 = map in let final void #t16 = #t15.{self::Map::[]=}(this, this) in this;
|
||||
v = let final self::Map<self::Class, self::Class> #t17 = map in let final self::Class #t18 = self in let final self::Class #t19 = self in let final void #t20 = #t17.{self::Map::[]=}(#t18, #t19) in #t19;
|
||||
v = map.{self::Map::[]}(this);
|
||||
v = map.{self::Map::[]}(self);
|
||||
v = let final self::Map<self::Class, self::Class> #t21 = map in let final self::Class #t22 = #t21.{self::Map::[]}(this).{self::Class::+}(this) in let final void #t23 = #t21.{self::Map::[]=}(this, #t22) in #t22;
|
||||
v = let final self::Map<self::Class, self::Class> #t24 = map in let final self::Class #t25 = self in let final self::Class #t26 = #t24.{self::Map::[]}(#t25).{self::Class::+}(self) in let final void #t27 = #t24.{self::Map::[]=}(#t25, #t26) in #t26;
|
||||
}
|
||||
method implicitExtensionGetSetForEffect(core::int i) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
let final core::int #t28 = i in self::Extension|[](#t28, this).{core::Object::==}(null) ?{self::Class} self::Extension|[]=(#t28, this, this) : null;
|
||||
let final core::int #t29 = i in let final self::Class #t30 = self in self::Extension|[](#t29, #t30).{core::Object::==}(null) ?{self::Class} self::Extension|[]=(#t29, #t30, self) : null;
|
||||
self::Extension|[]=(i, this, this);
|
||||
self::Extension|[]=(i, self, self);
|
||||
self::Extension|[](i, this);
|
||||
self::Extension|[](i, self);
|
||||
let final core::int #t31 = i in self::Extension|[]=(#t31, this, self::Extension|[](#t31, this).{self::Class::+}(this));
|
||||
let final core::int #t32 = i in let final self::Class #t33 = self in self::Extension|[]=(#t32, #t33, self::Extension|[](#t32, #t33).{self::Class::+}(self));
|
||||
}
|
||||
method implicitExtensionGetSetForValue(core::int i) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final core::int #t34 = i in let final self::Class #t35 = self::Extension|[](#t34, this) in #t35.{core::Object::==}(null) ?{self::Class} let final void #t36 = self::Extension|[]=(#t34, this, this) in this : #t35;
|
||||
v = let final core::int #t37 = i in let final self::Class #t38 = self in let final self::Class #t39 = self::Extension|[](#t37, #t38) in #t39.{core::Object::==}(null) ?{self::Class} let final self::Class #t40 = self in let final void #t41 = self::Extension|[]=(#t37, #t38, #t40) in #t40 : #t39;
|
||||
v = let final core::int #t42 = i in let final void #t43 = self::Extension|[]=(#t42, this, this) in this;
|
||||
v = let final core::int #t44 = i in let final self::Class #t45 = self in let final self::Class #t46 = self in let final void #t47 = self::Extension|[]=(#t44, #t45, #t46) in #t46;
|
||||
v = self::Extension|[](i, this);
|
||||
v = self::Extension|[](i, self);
|
||||
v = let final core::int #t48 = i in let final self::Class #t49 = self::Extension|[](#t48, this).{self::Class::+}(this) in let final void #t50 = self::Extension|[]=(#t48, this, #t49) in #t49;
|
||||
v = let final core::int #t51 = i in let final self::Class #t52 = self in let final self::Class #t53 = self::Extension|[](#t51, #t52).{self::Class::+}(self) in let final void #t54 = self::Extension|[]=(#t51, #t52, #t53) in #t53;
|
||||
}
|
||||
method explicitExtensionGetSetForEffect(core::int i) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
let final core::int #t55 = i in self::Extension|[](#t55, this).{core::Object::==}(null) ?{self::Class} self::Extension|[]=(#t55, this, this) : null;
|
||||
let final core::int #t56 = i in let final self::Class #t57 = self in self::Extension|[](#t56, #t57).{core::Object::==}(null) ?{self::Class} self::Extension|[]=(#t56, #t57, self) : null;
|
||||
self::Extension|[]=(i, this, this);
|
||||
self::Extension|[]=(i, self, self);
|
||||
self::Extension|[](i, this);
|
||||
self::Extension|[](i, self);
|
||||
let final core::int #t58 = i in self::Extension|[]=(#t58, this, self::Extension|[](#t58, this).{self::Class::+}(this));
|
||||
let final core::int #t59 = i in let final self::Class #t60 = self in self::Extension|[]=(#t59, #t60, self::Extension|[](#t59, #t60).{self::Class::+}(self));
|
||||
}
|
||||
method explicitExtensionGetSetForValue(core::int i) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final core::int #t61 = i in let final self::Class #t62 = self::Extension|[](#t61, this) in #t62.{core::Object::==}(null) ?{self::Class} let final void #t63 = self::Extension|[]=(#t61, this, this) in this : #t62;
|
||||
v = let final core::int #t64 = i in let final self::Class #t65 = self in let final self::Class #t66 = self::Extension|[](#t64, #t65) in #t66.{core::Object::==}(null) ?{self::Class} let final self::Class #t67 = self in let final void #t68 = self::Extension|[]=(#t64, #t65, #t67) in #t67 : #t66;
|
||||
v = let final core::int #t69 = i in let final void #t70 = self::Extension|[]=(#t69, this, this) in this;
|
||||
v = let final core::int #t71 = i in let final self::Class #t72 = self in let final void #t73 = self::Extension|[]=(#t71, self, #t72) in #t72;
|
||||
v = self::Extension|[](i, this);
|
||||
v = self::Extension|[](i, self);
|
||||
v = let final core::int #t74 = i in let final self::Class #t75 = self::Extension|[](#t74, this).{self::Class::+}(this) in let final void #t76 = self::Extension|[]=(#t74, this, #t75) in #t75;
|
||||
v = let final core::int #t77 = i in let final self::Class #t78 = self in let final self::Class #t79 = self::Extension|[](#t77, #t78).{self::Class::+}(self) in let final void #t80 = self::Extension|[]=(#t77, #t78, #t79) in #t79;
|
||||
}
|
||||
}
|
||||
class Subclass extends self::Class {
|
||||
synthetic constructor •() → self::Subclass
|
||||
: super self::Class::•()
|
||||
;
|
||||
method superIndexGetSetForEffect() → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
super.{self::Class::[]}(this).{core::Object::==}(null) ?{self::Class} super.{self::Class::[]=}(this, this) : null;
|
||||
let final self::Class #t81 = self in super.{self::Class::[]}(#t81).{core::Object::==}(null) ?{self::Class} super.{self::Class::[]=}(#t81, self) : null;
|
||||
super.{self::Class::[]=}(this, this);
|
||||
super.{self::Class::[]=}(self, self);
|
||||
super.{self::Class::[]}(this);
|
||||
super.{self::Class::[]}(self);
|
||||
super.{self::Class::[]=}(this, super.{self::Class::[]}(this).{self::Class::+}(this));
|
||||
let final self::Class #t82 = self in super.{self::Class::[]=}(#t82, super.{self::Class::[]}(#t82).{self::Class::+}(self));
|
||||
}
|
||||
method superIndexGetSetForValue() → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final self::Class #t83 = super.{self::Class::[]}(this) in #t83.{core::Object::==}(null) ?{self::Class} let final void #t84 = super.{self::Class::[]=}(this, this) in this : #t83;
|
||||
v = let final self::Class #t85 = self in let final self::Class #t86 = super.{self::Class::[]}(#t85) in #t86.{core::Object::==}(null) ?{self::Class} let final self::Class #t87 = self in let final void #t88 = super.{self::Class::[]=}(#t85, #t87) in #t87 : #t86;
|
||||
v = let final void #t89 = super.{self::Class::[]=}(this, this) in this;
|
||||
v = let final self::Class #t90 = self in let final self::Class #t91 = self in let final void #t92 = super.{self::Class::[]=}(#t90, #t91) in #t91;
|
||||
v = super.{self::Class::[]}(this);
|
||||
v = super.{self::Class::[]}(self);
|
||||
v = let final self::Class #t93 = super.{self::Class::[]}(this).{self::Class::+}(this) in let final void #t94 = super.{self::Class::[]=}(this, #t93) in #t93;
|
||||
v = let final self::Class #t95 = self in let final self::Class #t96 = super.{self::Class::[]}(#t95).{self::Class::+}(self) in let final void #t97 = super.{self::Class::[]=}(#t95, #t96) in #t96;
|
||||
}
|
||||
}
|
||||
class Class2 extends core::Object {
|
||||
synthetic constructor •() → self::Class2
|
||||
: super core::Object::•()
|
||||
;
|
||||
operator +(self::Class2 cls) → self::Class2
|
||||
return cls;
|
||||
method implicitExtensionGetSetForEffect() → void {
|
||||
late final self::Class2 self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
self::Extension2|[](this, this).{core::Object::==}(null) ?{self::Class2} self::Extension2|[]=(this, this, this) : null;
|
||||
let final self::Class2 #t98 = self in let final self::Class2 #t99 = self in self::Extension2|[](#t98, #t99).{core::Object::==}(null) ?{self::Class2} self::Extension2|[]=(#t98, #t99, self) : null;
|
||||
self::Extension2|[]=(this, this, this);
|
||||
self::Extension2|[]=(self, self, self);
|
||||
self::Extension2|[](this, this);
|
||||
self::Extension2|[](self, self);
|
||||
self::Extension2|[]=(this, this, self::Extension2|[](this, this).{self::Class2::+}(this));
|
||||
let final self::Class2 #t100 = self in let final self::Class2 #t101 = self in self::Extension2|[]=(#t100, #t101, self::Extension2|[](#t100, #t101).{self::Class2::+}(self));
|
||||
}
|
||||
method implicitExtensionGetSetForValue() → void {
|
||||
late final self::Class2 self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final self::Class2 #t102 = self::Extension2|[](this, this) in #t102.{core::Object::==}(null) ?{self::Class2} let final void #t103 = self::Extension2|[]=(this, this, this) in this : #t102;
|
||||
v = let final self::Class2 #t104 = self in let final self::Class2 #t105 = self in let final self::Class2 #t106 = self::Extension2|[](#t104, #t105) in #t106.{core::Object::==}(null) ?{self::Class2} let final self::Class2 #t107 = self in let final void #t108 = self::Extension2|[]=(#t104, #t105, #t107) in #t107 : #t106;
|
||||
v = let final void #t109 = self::Extension2|[]=(this, this, this) in this;
|
||||
v = let final self::Class2 #t110 = self in let final self::Class2 #t111 = self in let final self::Class2 #t112 = self in let final void #t113 = self::Extension2|[]=(#t110, #t111, #t112) in #t112;
|
||||
v = self::Extension2|[](this, this);
|
||||
v = self::Extension2|[](self, self);
|
||||
v = let final self::Class2 #t114 = self::Extension2|[](this, this).{self::Class2::+}(this) in let final void #t115 = self::Extension2|[]=(this, this, #t114) in #t114;
|
||||
v = let final self::Class2 #t116 = self in let final self::Class2 #t117 = self in let final self::Class2 #t118 = self::Extension2|[](#t116, #t117).{self::Class2::+}(self) in let final void #t119 = self::Extension2|[]=(#t116, #t117, #t118) in #t118;
|
||||
}
|
||||
method explicitExtensionGetSetForEffect() → void {
|
||||
late final self::Class2 self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
self::Extension2|[](this, this).{core::Object::==}(null) ?{self::Class2} self::Extension2|[]=(this, this, this) : null;
|
||||
let final self::Class2 #t120 = self in let final self::Class2 #t121 = self in self::Extension2|[](#t120, #t121).{core::Object::==}(null) ?{self::Class2} self::Extension2|[]=(#t120, #t121, self) : null;
|
||||
self::Extension2|[]=(this, this, this);
|
||||
self::Extension2|[]=(self, self, self);
|
||||
self::Extension2|[](this, this);
|
||||
self::Extension2|[](self, self);
|
||||
self::Extension2|[]=(this, this, self::Extension2|[](this, this).{self::Class2::+}(this));
|
||||
let final self::Class2 #t122 = self in let final self::Class2 #t123 = self in self::Extension2|[]=(#t122, #t123, self::Extension2|[](#t122, #t123).{self::Class2::+}(self));
|
||||
}
|
||||
method explicitExtensionGetSetForValue() → void {
|
||||
late final self::Class2 self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final self::Class2 #t124 = self::Extension2|[](this, this) in #t124.{core::Object::==}(null) ?{self::Class2} let final void #t125 = self::Extension2|[]=(this, this, this) in this : #t124;
|
||||
v = let final self::Class2 #t126 = self in let final self::Class2 #t127 = self in let final self::Class2 #t128 = self::Extension2|[](#t126, #t127) in #t128.{core::Object::==}(null) ?{self::Class2} let final self::Class2 #t129 = self in let final void #t130 = self::Extension2|[]=(#t126, #t127, #t129) in #t129 : #t128;
|
||||
v = let final void #t131 = self::Extension2|[]=(this, this, this) in this;
|
||||
v = let final self::Class2 #t132 = self in let final self::Class2 #t133 = self in let final void #t134 = self::Extension2|[]=(#t132, self, #t133) in #t133;
|
||||
v = self::Extension2|[](this, this);
|
||||
v = self::Extension2|[](self, self);
|
||||
v = let final self::Class2 #t135 = self::Extension2|[](this, this).{self::Class2::+}(this) in let final void #t136 = self::Extension2|[]=(this, this, #t135) in #t135;
|
||||
v = let final self::Class2 #t137 = self in let final self::Class2 #t138 = self in let final self::Class2 #t139 = self::Extension2|[](#t137, #t138).{self::Class2::+}(self) in let final void #t140 = self::Extension2|[]=(#t137, #t138, #t139) in #t139;
|
||||
}
|
||||
}
|
||||
extension Extension on core::int {
|
||||
operator [] = self::Extension|[];
|
||||
operator []= = self::Extension|[]=;
|
||||
}
|
||||
extension Extension2 on self::Class2 {
|
||||
operator [] = self::Extension2|[];
|
||||
operator []= = self::Extension2|[]=;
|
||||
}
|
||||
static field core::bool b = true;
|
||||
static method Extension|[](lowered final core::int #this, self::Class cls) → self::Class
|
||||
return new self::Class::•();
|
||||
static method Extension|[]=(lowered final core::int #this, self::Class cls, self::Class value) → void {}
|
||||
static method Extension2|[](lowered final self::Class2 #this, self::Class2 cls) → self::Class2
|
||||
return new self::Class2::•();
|
||||
static method Extension2|[]=(lowered final self::Class2 #this, self::Class2 cls, self::Class2 value) → void {}
|
||||
static method main() → dynamic {}
|
|
@ -0,0 +1,334 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:25:8: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// map[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:26:8: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// map[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:42:12: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = map[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:43:12: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = map[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:58:6: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// i[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:59:6: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// i[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:75:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = i[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:76:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = i[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:91:17: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// Extension(i)[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:92:17: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// Extension(i)[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:108:21: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = Extension(i)[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:109:21: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = Extension(i)[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:126:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// super[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:127:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// super[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:143:14: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = super[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:144:14: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = super[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:168:9: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// this[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:169:9: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// self[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:185:13: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = this[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:186:13: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = self[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:201:21: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// Extension2(this)[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:202:21: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// Extension2(self)[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:218:25: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = Extension2(this)[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:219:25: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = Extension2(self)[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
abstract class Map<K extends core::Object? = dynamic, V extends core::Object? = dynamic> extends core::Object {
|
||||
synthetic constructor •() → self::Map<self::Map::K%, self::Map::V%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
abstract operator [](generic-covariant-impl self::Map::K% index) → self::Map::V%;
|
||||
abstract operator []=(generic-covariant-impl self::Map::K% index, generic-covariant-impl self::Map::V% value) → void;
|
||||
}
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
operator [](self::Class cls) → self::Class
|
||||
return new self::Class::•();
|
||||
operator []=(self::Class cls, self::Class value) → void {}
|
||||
operator +(self::Class cls) → self::Class
|
||||
return cls;
|
||||
method indexGetSetForEffect(self::Map<self::Class, self::Class> map) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
let final self::Map<self::Class, self::Class> #t1 = map in #t1.{self::Map::[]}(this).{core::Object::==}(null) ?{self::Class} #t1.{self::Map::[]=}(this, this) : null;
|
||||
let final self::Map<self::Class, self::Class> #t2 = map in let final self::Class #t3 = self in #t2.{self::Map::[]}(#t3).{core::Object::==}(null) ?{self::Class} #t2.{self::Map::[]=}(#t3, self) : null;
|
||||
map.{self::Map::[]=}(this, this);
|
||||
map.{self::Map::[]=}(self, self);
|
||||
map.{self::Map::[]}(this);
|
||||
map.{self::Map::[]}(self);
|
||||
let final self::Map<self::Class, self::Class> #t4 = map in #t4.{self::Map::[]=}(this, #t4.{self::Map::[]}(this).{self::Class::+}(this));
|
||||
let final self::Map<self::Class, self::Class> #t5 = map in let final self::Class #t6 = self in #t5.{self::Map::[]=}(#t6, #t5.{self::Map::[]}(#t6).{self::Class::+}(self));
|
||||
}
|
||||
method indexGetSetForValue(self::Map<self::Class, self::Class> map) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final self::Map<self::Class, self::Class> #t7 = map in let final self::Class #t8 = #t7.{self::Map::[]}(this) in #t8.{core::Object::==}(null) ?{self::Class} let final void #t9 = #t7.{self::Map::[]=}(this, this) in this : #t8;
|
||||
v = let final self::Map<self::Class, self::Class> #t10 = map in let final self::Class #t11 = self in let final self::Class #t12 = #t10.{self::Map::[]}(#t11) in #t12.{core::Object::==}(null) ?{self::Class} let final self::Class #t13 = self in let final void #t14 = #t10.{self::Map::[]=}(#t11, #t13) in #t13 : #t12;
|
||||
v = let final self::Map<self::Class, self::Class> #t15 = map in let final void #t16 = #t15.{self::Map::[]=}(this, this) in this;
|
||||
v = let final self::Map<self::Class, self::Class> #t17 = map in let final self::Class #t18 = self in let final self::Class #t19 = self in let final void #t20 = #t17.{self::Map::[]=}(#t18, #t19) in #t19;
|
||||
v = map.{self::Map::[]}(this);
|
||||
v = map.{self::Map::[]}(self);
|
||||
v = let final self::Map<self::Class, self::Class> #t21 = map in let final self::Class #t22 = #t21.{self::Map::[]}(this).{self::Class::+}(this) in let final void #t23 = #t21.{self::Map::[]=}(this, #t22) in #t22;
|
||||
v = let final self::Map<self::Class, self::Class> #t24 = map in let final self::Class #t25 = self in let final self::Class #t26 = #t24.{self::Map::[]}(#t25).{self::Class::+}(self) in let final void #t27 = #t24.{self::Map::[]=}(#t25, #t26) in #t26;
|
||||
}
|
||||
method implicitExtensionGetSetForEffect(core::int i) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
let final core::int #t28 = i in self::Extension|[](#t28, this).{core::Object::==}(null) ?{self::Class} self::Extension|[]=(#t28, this, this) : null;
|
||||
let final core::int #t29 = i in let final self::Class #t30 = self in self::Extension|[](#t29, #t30).{core::Object::==}(null) ?{self::Class} self::Extension|[]=(#t29, #t30, self) : null;
|
||||
self::Extension|[]=(i, this, this);
|
||||
self::Extension|[]=(i, self, self);
|
||||
self::Extension|[](i, this);
|
||||
self::Extension|[](i, self);
|
||||
let final core::int #t31 = i in self::Extension|[]=(#t31, this, self::Extension|[](#t31, this).{self::Class::+}(this));
|
||||
let final core::int #t32 = i in let final self::Class #t33 = self in self::Extension|[]=(#t32, #t33, self::Extension|[](#t32, #t33).{self::Class::+}(self));
|
||||
}
|
||||
method implicitExtensionGetSetForValue(core::int i) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final core::int #t34 = i in let final self::Class #t35 = self::Extension|[](#t34, this) in #t35.{core::Object::==}(null) ?{self::Class} let final void #t36 = self::Extension|[]=(#t34, this, this) in this : #t35;
|
||||
v = let final core::int #t37 = i in let final self::Class #t38 = self in let final self::Class #t39 = self::Extension|[](#t37, #t38) in #t39.{core::Object::==}(null) ?{self::Class} let final self::Class #t40 = self in let final void #t41 = self::Extension|[]=(#t37, #t38, #t40) in #t40 : #t39;
|
||||
v = let final core::int #t42 = i in let final void #t43 = self::Extension|[]=(#t42, this, this) in this;
|
||||
v = let final core::int #t44 = i in let final self::Class #t45 = self in let final self::Class #t46 = self in let final void #t47 = self::Extension|[]=(#t44, #t45, #t46) in #t46;
|
||||
v = self::Extension|[](i, this);
|
||||
v = self::Extension|[](i, self);
|
||||
v = let final core::int #t48 = i in let final self::Class #t49 = self::Extension|[](#t48, this).{self::Class::+}(this) in let final void #t50 = self::Extension|[]=(#t48, this, #t49) in #t49;
|
||||
v = let final core::int #t51 = i in let final self::Class #t52 = self in let final self::Class #t53 = self::Extension|[](#t51, #t52).{self::Class::+}(self) in let final void #t54 = self::Extension|[]=(#t51, #t52, #t53) in #t53;
|
||||
}
|
||||
method explicitExtensionGetSetForEffect(core::int i) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
let final core::int #t55 = i in self::Extension|[](#t55, this).{core::Object::==}(null) ?{self::Class} self::Extension|[]=(#t55, this, this) : null;
|
||||
let final core::int #t56 = i in let final self::Class #t57 = self in self::Extension|[](#t56, #t57).{core::Object::==}(null) ?{self::Class} self::Extension|[]=(#t56, #t57, self) : null;
|
||||
self::Extension|[]=(i, this, this);
|
||||
self::Extension|[]=(i, self, self);
|
||||
self::Extension|[](i, this);
|
||||
self::Extension|[](i, self);
|
||||
let final core::int #t58 = i in self::Extension|[]=(#t58, this, self::Extension|[](#t58, this).{self::Class::+}(this));
|
||||
let final core::int #t59 = i in let final self::Class #t60 = self in self::Extension|[]=(#t59, #t60, self::Extension|[](#t59, #t60).{self::Class::+}(self));
|
||||
}
|
||||
method explicitExtensionGetSetForValue(core::int i) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final core::int #t61 = i in let final self::Class #t62 = self::Extension|[](#t61, this) in #t62.{core::Object::==}(null) ?{self::Class} let final void #t63 = self::Extension|[]=(#t61, this, this) in this : #t62;
|
||||
v = let final core::int #t64 = i in let final self::Class #t65 = self in let final self::Class #t66 = self::Extension|[](#t64, #t65) in #t66.{core::Object::==}(null) ?{self::Class} let final self::Class #t67 = self in let final void #t68 = self::Extension|[]=(#t64, #t65, #t67) in #t67 : #t66;
|
||||
v = let final core::int #t69 = i in let final void #t70 = self::Extension|[]=(#t69, this, this) in this;
|
||||
v = let final core::int #t71 = i in let final self::Class #t72 = self in let final void #t73 = self::Extension|[]=(#t71, self, #t72) in #t72;
|
||||
v = self::Extension|[](i, this);
|
||||
v = self::Extension|[](i, self);
|
||||
v = let final core::int #t74 = i in let final self::Class #t75 = self::Extension|[](#t74, this).{self::Class::+}(this) in let final void #t76 = self::Extension|[]=(#t74, this, #t75) in #t75;
|
||||
v = let final core::int #t77 = i in let final self::Class #t78 = self in let final self::Class #t79 = self::Extension|[](#t77, #t78).{self::Class::+}(self) in let final void #t80 = self::Extension|[]=(#t77, #t78, #t79) in #t79;
|
||||
}
|
||||
}
|
||||
class Subclass extends self::Class {
|
||||
synthetic constructor •() → self::Subclass
|
||||
: super self::Class::•()
|
||||
;
|
||||
method superIndexGetSetForEffect() → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
super.{self::Class::[]}(this).{core::Object::==}(null) ?{self::Class} super.{self::Class::[]=}(this, this) : null;
|
||||
let final self::Class #t81 = self in super.{self::Class::[]}(#t81).{core::Object::==}(null) ?{self::Class} super.{self::Class::[]=}(#t81, self) : null;
|
||||
super.{self::Class::[]=}(this, this);
|
||||
super.{self::Class::[]=}(self, self);
|
||||
super.{self::Class::[]}(this);
|
||||
super.{self::Class::[]}(self);
|
||||
super.{self::Class::[]=}(this, super.{self::Class::[]}(this).{self::Class::+}(this));
|
||||
let final self::Class #t82 = self in super.{self::Class::[]=}(#t82, super.{self::Class::[]}(#t82).{self::Class::+}(self));
|
||||
}
|
||||
method superIndexGetSetForValue() → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final self::Class #t83 = super.{self::Class::[]}(this) in #t83.{core::Object::==}(null) ?{self::Class} let final void #t84 = super.{self::Class::[]=}(this, this) in this : #t83;
|
||||
v = let final self::Class #t85 = self in let final self::Class #t86 = super.{self::Class::[]}(#t85) in #t86.{core::Object::==}(null) ?{self::Class} let final self::Class #t87 = self in let final void #t88 = super.{self::Class::[]=}(#t85, #t87) in #t87 : #t86;
|
||||
v = let final void #t89 = super.{self::Class::[]=}(this, this) in this;
|
||||
v = let final self::Class #t90 = self in let final self::Class #t91 = self in let final void #t92 = super.{self::Class::[]=}(#t90, #t91) in #t91;
|
||||
v = super.{self::Class::[]}(this);
|
||||
v = super.{self::Class::[]}(self);
|
||||
v = let final self::Class #t93 = super.{self::Class::[]}(this).{self::Class::+}(this) in let final void #t94 = super.{self::Class::[]=}(this, #t93) in #t93;
|
||||
v = let final self::Class #t95 = self in let final self::Class #t96 = super.{self::Class::[]}(#t95).{self::Class::+}(self) in let final void #t97 = super.{self::Class::[]=}(#t95, #t96) in #t96;
|
||||
}
|
||||
}
|
||||
class Class2 extends core::Object {
|
||||
synthetic constructor •() → self::Class2
|
||||
: super core::Object::•()
|
||||
;
|
||||
operator +(self::Class2 cls) → self::Class2
|
||||
return cls;
|
||||
method implicitExtensionGetSetForEffect() → void {
|
||||
late final self::Class2 self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
self::Extension2|[](this, this).{core::Object::==}(null) ?{self::Class2} self::Extension2|[]=(this, this, this) : null;
|
||||
let final self::Class2 #t98 = self in let final self::Class2 #t99 = self in self::Extension2|[](#t98, #t99).{core::Object::==}(null) ?{self::Class2} self::Extension2|[]=(#t98, #t99, self) : null;
|
||||
self::Extension2|[]=(this, this, this);
|
||||
self::Extension2|[]=(self, self, self);
|
||||
self::Extension2|[](this, this);
|
||||
self::Extension2|[](self, self);
|
||||
self::Extension2|[]=(this, this, self::Extension2|[](this, this).{self::Class2::+}(this));
|
||||
let final self::Class2 #t100 = self in let final self::Class2 #t101 = self in self::Extension2|[]=(#t100, #t101, self::Extension2|[](#t100, #t101).{self::Class2::+}(self));
|
||||
}
|
||||
method implicitExtensionGetSetForValue() → void {
|
||||
late final self::Class2 self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final self::Class2 #t102 = self::Extension2|[](this, this) in #t102.{core::Object::==}(null) ?{self::Class2} let final void #t103 = self::Extension2|[]=(this, this, this) in this : #t102;
|
||||
v = let final self::Class2 #t104 = self in let final self::Class2 #t105 = self in let final self::Class2 #t106 = self::Extension2|[](#t104, #t105) in #t106.{core::Object::==}(null) ?{self::Class2} let final self::Class2 #t107 = self in let final void #t108 = self::Extension2|[]=(#t104, #t105, #t107) in #t107 : #t106;
|
||||
v = let final void #t109 = self::Extension2|[]=(this, this, this) in this;
|
||||
v = let final self::Class2 #t110 = self in let final self::Class2 #t111 = self in let final self::Class2 #t112 = self in let final void #t113 = self::Extension2|[]=(#t110, #t111, #t112) in #t112;
|
||||
v = self::Extension2|[](this, this);
|
||||
v = self::Extension2|[](self, self);
|
||||
v = let final self::Class2 #t114 = self::Extension2|[](this, this).{self::Class2::+}(this) in let final void #t115 = self::Extension2|[]=(this, this, #t114) in #t114;
|
||||
v = let final self::Class2 #t116 = self in let final self::Class2 #t117 = self in let final self::Class2 #t118 = self::Extension2|[](#t116, #t117).{self::Class2::+}(self) in let final void #t119 = self::Extension2|[]=(#t116, #t117, #t118) in #t118;
|
||||
}
|
||||
method explicitExtensionGetSetForEffect() → void {
|
||||
late final self::Class2 self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
self::Extension2|[](this, this).{core::Object::==}(null) ?{self::Class2} self::Extension2|[]=(this, this, this) : null;
|
||||
let final self::Class2 #t120 = self in let final self::Class2 #t121 = self in self::Extension2|[](#t120, #t121).{core::Object::==}(null) ?{self::Class2} self::Extension2|[]=(#t120, #t121, self) : null;
|
||||
self::Extension2|[]=(this, this, this);
|
||||
self::Extension2|[]=(self, self, self);
|
||||
self::Extension2|[](this, this);
|
||||
self::Extension2|[](self, self);
|
||||
self::Extension2|[]=(this, this, self::Extension2|[](this, this).{self::Class2::+}(this));
|
||||
let final self::Class2 #t122 = self in let final self::Class2 #t123 = self in self::Extension2|[]=(#t122, #t123, self::Extension2|[](#t122, #t123).{self::Class2::+}(self));
|
||||
}
|
||||
method explicitExtensionGetSetForValue() → void {
|
||||
late final self::Class2 self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final self::Class2 #t124 = self::Extension2|[](this, this) in #t124.{core::Object::==}(null) ?{self::Class2} let final void #t125 = self::Extension2|[]=(this, this, this) in this : #t124;
|
||||
v = let final self::Class2 #t126 = self in let final self::Class2 #t127 = self in let final self::Class2 #t128 = self::Extension2|[](#t126, #t127) in #t128.{core::Object::==}(null) ?{self::Class2} let final self::Class2 #t129 = self in let final void #t130 = self::Extension2|[]=(#t126, #t127, #t129) in #t129 : #t128;
|
||||
v = let final void #t131 = self::Extension2|[]=(this, this, this) in this;
|
||||
v = let final self::Class2 #t132 = self in let final self::Class2 #t133 = self in let final void #t134 = self::Extension2|[]=(#t132, self, #t133) in #t133;
|
||||
v = self::Extension2|[](this, this);
|
||||
v = self::Extension2|[](self, self);
|
||||
v = let final self::Class2 #t135 = self::Extension2|[](this, this).{self::Class2::+}(this) in let final void #t136 = self::Extension2|[]=(this, this, #t135) in #t135;
|
||||
v = let final self::Class2 #t137 = self in let final self::Class2 #t138 = self in let final self::Class2 #t139 = self::Extension2|[](#t137, #t138).{self::Class2::+}(self) in let final void #t140 = self::Extension2|[]=(#t137, #t138, #t139) in #t139;
|
||||
}
|
||||
}
|
||||
extension Extension on core::int {
|
||||
operator [] = self::Extension|[];
|
||||
operator []= = self::Extension|[]=;
|
||||
}
|
||||
extension Extension2 on self::Class2 {
|
||||
operator [] = self::Extension2|[];
|
||||
operator []= = self::Extension2|[]=;
|
||||
}
|
||||
static field core::bool b = true;
|
||||
static method Extension|[](lowered final core::int #this, self::Class cls) → self::Class
|
||||
return new self::Class::•();
|
||||
static method Extension|[]=(lowered final core::int #this, self::Class cls, self::Class value) → void {}
|
||||
static method Extension2|[](lowered final self::Class2 #this, self::Class2 cls) → self::Class2
|
||||
return new self::Class2::•();
|
||||
static method Extension2|[]=(lowered final self::Class2 #this, self::Class2 cls, self::Class2 value) → void {}
|
||||
static method main() → dynamic {}
|
|
@ -0,0 +1,32 @@
|
|||
bool b = true;
|
||||
abstract class Map<K, V> {
|
||||
V operator [](K index);
|
||||
void operator []=(K index, V value);
|
||||
}
|
||||
extension Extension ;
|
||||
on int (){}
|
||||
class Class {
|
||||
Class operator [](Class cls) => new Class();
|
||||
void operator []=(Class cls, Class value) {}
|
||||
Class operator +(Class cls) => cls;
|
||||
void indexGetSetForEffect(Map<Class, Class> map) {}
|
||||
void indexGetSetForValue(Map<Class, Class> map) {}
|
||||
void implicitExtensionGetSetForEffect(int i) {}
|
||||
void implicitExtensionGetSetForValue(int i) {}
|
||||
void explicitExtensionGetSetForEffect(int i) {}
|
||||
void explicitExtensionGetSetForValue(int i) {}
|
||||
}
|
||||
class Subclass extends Class {
|
||||
void superIndexGetSetForEffect() {}
|
||||
void superIndexGetSetForValue() {}
|
||||
}
|
||||
extension Extension2 ;
|
||||
on Class2 (){}
|
||||
class Class2 {
|
||||
Class2 operator +(Class2 cls) => cls;
|
||||
void implicitExtensionGetSetForEffect() {}
|
||||
void implicitExtensionGetSetForValue() {}
|
||||
void explicitExtensionGetSetForEffect() {}
|
||||
void explicitExtensionGetSetForValue() {}
|
||||
}
|
||||
main() {}
|
|
@ -0,0 +1,334 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:25:8: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// map[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:26:8: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// map[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:42:12: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = map[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:43:12: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = map[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:58:6: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// i[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:59:6: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// i[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:75:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = i[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:76:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = i[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:91:17: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// Extension(i)[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:92:17: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// Extension(i)[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:108:21: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = Extension(i)[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:109:21: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = Extension(i)[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:126:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// super[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:127:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// super[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:143:14: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = super[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:144:14: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = super[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:168:9: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// this[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:169:9: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// self[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:185:13: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = this[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:186:13: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = self[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:201:21: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// Extension2(this)[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:202:21: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// Extension2(self)[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:218:25: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = Extension2(this)[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:219:25: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = Extension2(self)[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
abstract class Map<K extends core::Object? = dynamic, V extends core::Object? = dynamic> extends core::Object {
|
||||
synthetic constructor •() → self::Map<self::Map::K%, self::Map::V%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
abstract operator [](generic-covariant-impl self::Map::K% index) → self::Map::V%;
|
||||
abstract operator []=(generic-covariant-impl self::Map::K% index, generic-covariant-impl self::Map::V% value) → void;
|
||||
}
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
operator [](self::Class cls) → self::Class
|
||||
return new self::Class::•();
|
||||
operator []=(self::Class cls, self::Class value) → void {}
|
||||
operator +(self::Class cls) → self::Class
|
||||
return cls;
|
||||
method indexGetSetForEffect(self::Map<self::Class, self::Class> map) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
let final self::Map<self::Class, self::Class> #t1 = map in #t1.{self::Map::[]}(this).{core::Object::==}(null) ?{self::Class} #t1.{self::Map::[]=}(this, this) : null;
|
||||
let final self::Map<self::Class, self::Class> #t2 = map in let final self::Class #t3 = self in #t2.{self::Map::[]}(#t3).{core::Object::==}(null) ?{self::Class} #t2.{self::Map::[]=}(#t3, self) : null;
|
||||
map.{self::Map::[]=}(this, this);
|
||||
map.{self::Map::[]=}(self, self);
|
||||
map.{self::Map::[]}(this);
|
||||
map.{self::Map::[]}(self);
|
||||
let final self::Map<self::Class, self::Class> #t4 = map in #t4.{self::Map::[]=}(this, #t4.{self::Map::[]}(this).{self::Class::+}(this));
|
||||
let final self::Map<self::Class, self::Class> #t5 = map in let final self::Class #t6 = self in #t5.{self::Map::[]=}(#t6, #t5.{self::Map::[]}(#t6).{self::Class::+}(self));
|
||||
}
|
||||
method indexGetSetForValue(self::Map<self::Class, self::Class> map) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final self::Map<self::Class, self::Class> #t7 = map in let final self::Class #t8 = #t7.{self::Map::[]}(this) in #t8.{core::Object::==}(null) ?{self::Class} let final void #t9 = #t7.{self::Map::[]=}(this, this) in this : #t8;
|
||||
v = let final self::Map<self::Class, self::Class> #t10 = map in let final self::Class #t11 = self in let final self::Class #t12 = #t10.{self::Map::[]}(#t11) in #t12.{core::Object::==}(null) ?{self::Class} let final self::Class #t13 = self in let final void #t14 = #t10.{self::Map::[]=}(#t11, #t13) in #t13 : #t12;
|
||||
v = let final self::Map<self::Class, self::Class> #t15 = map in let final void #t16 = #t15.{self::Map::[]=}(this, this) in this;
|
||||
v = let final self::Map<self::Class, self::Class> #t17 = map in let final self::Class #t18 = self in let final self::Class #t19 = self in let final void #t20 = #t17.{self::Map::[]=}(#t18, #t19) in #t19;
|
||||
v = map.{self::Map::[]}(this);
|
||||
v = map.{self::Map::[]}(self);
|
||||
v = let final self::Map<self::Class, self::Class> #t21 = map in let final self::Class #t22 = #t21.{self::Map::[]}(this).{self::Class::+}(this) in let final void #t23 = #t21.{self::Map::[]=}(this, #t22) in #t22;
|
||||
v = let final self::Map<self::Class, self::Class> #t24 = map in let final self::Class #t25 = self in let final self::Class #t26 = #t24.{self::Map::[]}(#t25).{self::Class::+}(self) in let final void #t27 = #t24.{self::Map::[]=}(#t25, #t26) in #t26;
|
||||
}
|
||||
method implicitExtensionGetSetForEffect(core::int i) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
let final core::int #t28 = i in self::Extension|[](#t28, this).{core::Object::==}(null) ?{self::Class} self::Extension|[]=(#t28, this, this) : null;
|
||||
let final core::int #t29 = i in let final self::Class #t30 = self in self::Extension|[](#t29, #t30).{core::Object::==}(null) ?{self::Class} self::Extension|[]=(#t29, #t30, self) : null;
|
||||
self::Extension|[]=(i, this, this);
|
||||
self::Extension|[]=(i, self, self);
|
||||
self::Extension|[](i, this);
|
||||
self::Extension|[](i, self);
|
||||
let final core::int #t31 = i in self::Extension|[]=(#t31, this, self::Extension|[](#t31, this).{self::Class::+}(this));
|
||||
let final core::int #t32 = i in let final self::Class #t33 = self in self::Extension|[]=(#t32, #t33, self::Extension|[](#t32, #t33).{self::Class::+}(self));
|
||||
}
|
||||
method implicitExtensionGetSetForValue(core::int i) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final core::int #t34 = i in let final self::Class #t35 = self::Extension|[](#t34, this) in #t35.{core::Object::==}(null) ?{self::Class} let final void #t36 = self::Extension|[]=(#t34, this, this) in this : #t35;
|
||||
v = let final core::int #t37 = i in let final self::Class #t38 = self in let final self::Class #t39 = self::Extension|[](#t37, #t38) in #t39.{core::Object::==}(null) ?{self::Class} let final self::Class #t40 = self in let final void #t41 = self::Extension|[]=(#t37, #t38, #t40) in #t40 : #t39;
|
||||
v = let final core::int #t42 = i in let final void #t43 = self::Extension|[]=(#t42, this, this) in this;
|
||||
v = let final core::int #t44 = i in let final self::Class #t45 = self in let final self::Class #t46 = self in let final void #t47 = self::Extension|[]=(#t44, #t45, #t46) in #t46;
|
||||
v = self::Extension|[](i, this);
|
||||
v = self::Extension|[](i, self);
|
||||
v = let final core::int #t48 = i in let final self::Class #t49 = self::Extension|[](#t48, this).{self::Class::+}(this) in let final void #t50 = self::Extension|[]=(#t48, this, #t49) in #t49;
|
||||
v = let final core::int #t51 = i in let final self::Class #t52 = self in let final self::Class #t53 = self::Extension|[](#t51, #t52).{self::Class::+}(self) in let final void #t54 = self::Extension|[]=(#t51, #t52, #t53) in #t53;
|
||||
}
|
||||
method explicitExtensionGetSetForEffect(core::int i) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
let final core::int #t55 = i in self::Extension|[](#t55, this).{core::Object::==}(null) ?{self::Class} self::Extension|[]=(#t55, this, this) : null;
|
||||
let final core::int #t56 = i in let final self::Class #t57 = self in self::Extension|[](#t56, #t57).{core::Object::==}(null) ?{self::Class} self::Extension|[]=(#t56, #t57, self) : null;
|
||||
self::Extension|[]=(i, this, this);
|
||||
self::Extension|[]=(i, self, self);
|
||||
self::Extension|[](i, this);
|
||||
self::Extension|[](i, self);
|
||||
let final core::int #t58 = i in self::Extension|[]=(#t58, this, self::Extension|[](#t58, this).{self::Class::+}(this));
|
||||
let final core::int #t59 = i in let final self::Class #t60 = self in self::Extension|[]=(#t59, #t60, self::Extension|[](#t59, #t60).{self::Class::+}(self));
|
||||
}
|
||||
method explicitExtensionGetSetForValue(core::int i) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final core::int #t61 = i in let final self::Class #t62 = self::Extension|[](#t61, this) in #t62.{core::Object::==}(null) ?{self::Class} let final void #t63 = self::Extension|[]=(#t61, this, this) in this : #t62;
|
||||
v = let final core::int #t64 = i in let final self::Class #t65 = self in let final self::Class #t66 = self::Extension|[](#t64, #t65) in #t66.{core::Object::==}(null) ?{self::Class} let final self::Class #t67 = self in let final void #t68 = self::Extension|[]=(#t64, #t65, #t67) in #t67 : #t66;
|
||||
v = let final core::int #t69 = i in let final void #t70 = self::Extension|[]=(#t69, this, this) in this;
|
||||
v = let final core::int #t71 = i in let final self::Class #t72 = self in let final void #t73 = self::Extension|[]=(#t71, self, #t72) in #t72;
|
||||
v = self::Extension|[](i, this);
|
||||
v = self::Extension|[](i, self);
|
||||
v = let final core::int #t74 = i in let final self::Class #t75 = self::Extension|[](#t74, this).{self::Class::+}(this) in let final void #t76 = self::Extension|[]=(#t74, this, #t75) in #t75;
|
||||
v = let final core::int #t77 = i in let final self::Class #t78 = self in let final self::Class #t79 = self::Extension|[](#t77, #t78).{self::Class::+}(self) in let final void #t80 = self::Extension|[]=(#t77, #t78, #t79) in #t79;
|
||||
}
|
||||
}
|
||||
class Subclass extends self::Class {
|
||||
synthetic constructor •() → self::Subclass
|
||||
: super self::Class::•()
|
||||
;
|
||||
method superIndexGetSetForEffect() → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
super.{self::Class::[]}(this).{core::Object::==}(null) ?{self::Class} super.{self::Class::[]=}(this, this) : null;
|
||||
let final self::Class #t81 = self in super.{self::Class::[]}(#t81).{core::Object::==}(null) ?{self::Class} super.{self::Class::[]=}(#t81, self) : null;
|
||||
super.{self::Class::[]=}(this, this);
|
||||
super.{self::Class::[]=}(self, self);
|
||||
super.{self::Class::[]}(this);
|
||||
super.{self::Class::[]}(self);
|
||||
super.{self::Class::[]=}(this, super.{self::Class::[]}(this).{self::Class::+}(this));
|
||||
let final self::Class #t82 = self in super.{self::Class::[]=}(#t82, super.{self::Class::[]}(#t82).{self::Class::+}(self));
|
||||
}
|
||||
method superIndexGetSetForValue() → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final self::Class #t83 = super.{self::Class::[]}(this) in #t83.{core::Object::==}(null) ?{self::Class} let final void #t84 = super.{self::Class::[]=}(this, this) in this : #t83;
|
||||
v = let final self::Class #t85 = self in let final self::Class #t86 = super.{self::Class::[]}(#t85) in #t86.{core::Object::==}(null) ?{self::Class} let final self::Class #t87 = self in let final void #t88 = super.{self::Class::[]=}(#t85, #t87) in #t87 : #t86;
|
||||
v = let final void #t89 = super.{self::Class::[]=}(this, this) in this;
|
||||
v = let final self::Class #t90 = self in let final self::Class #t91 = self in let final void #t92 = super.{self::Class::[]=}(#t90, #t91) in #t91;
|
||||
v = super.{self::Class::[]}(this);
|
||||
v = super.{self::Class::[]}(self);
|
||||
v = let final self::Class #t93 = super.{self::Class::[]}(this).{self::Class::+}(this) in let final void #t94 = super.{self::Class::[]=}(this, #t93) in #t93;
|
||||
v = let final self::Class #t95 = self in let final self::Class #t96 = super.{self::Class::[]}(#t95).{self::Class::+}(self) in let final void #t97 = super.{self::Class::[]=}(#t95, #t96) in #t96;
|
||||
}
|
||||
}
|
||||
class Class2 extends core::Object {
|
||||
synthetic constructor •() → self::Class2
|
||||
: super core::Object::•()
|
||||
;
|
||||
operator +(self::Class2 cls) → self::Class2
|
||||
return cls;
|
||||
method implicitExtensionGetSetForEffect() → void {
|
||||
late final self::Class2 self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
self::Extension2|[](this, this).{core::Object::==}(null) ?{self::Class2} self::Extension2|[]=(this, this, this) : null;
|
||||
let final self::Class2 #t98 = self in let final self::Class2 #t99 = self in self::Extension2|[](#t98, #t99).{core::Object::==}(null) ?{self::Class2} self::Extension2|[]=(#t98, #t99, self) : null;
|
||||
self::Extension2|[]=(this, this, this);
|
||||
self::Extension2|[]=(self, self, self);
|
||||
self::Extension2|[](this, this);
|
||||
self::Extension2|[](self, self);
|
||||
self::Extension2|[]=(this, this, self::Extension2|[](this, this).{self::Class2::+}(this));
|
||||
let final self::Class2 #t100 = self in let final self::Class2 #t101 = self in self::Extension2|[]=(#t100, #t101, self::Extension2|[](#t100, #t101).{self::Class2::+}(self));
|
||||
}
|
||||
method implicitExtensionGetSetForValue() → void {
|
||||
late final self::Class2 self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final self::Class2 #t102 = self::Extension2|[](this, this) in #t102.{core::Object::==}(null) ?{self::Class2} let final void #t103 = self::Extension2|[]=(this, this, this) in this : #t102;
|
||||
v = let final self::Class2 #t104 = self in let final self::Class2 #t105 = self in let final self::Class2 #t106 = self::Extension2|[](#t104, #t105) in #t106.{core::Object::==}(null) ?{self::Class2} let final self::Class2 #t107 = self in let final void #t108 = self::Extension2|[]=(#t104, #t105, #t107) in #t107 : #t106;
|
||||
v = let final void #t109 = self::Extension2|[]=(this, this, this) in this;
|
||||
v = let final self::Class2 #t110 = self in let final self::Class2 #t111 = self in let final self::Class2 #t112 = self in let final void #t113 = self::Extension2|[]=(#t110, #t111, #t112) in #t112;
|
||||
v = self::Extension2|[](this, this);
|
||||
v = self::Extension2|[](self, self);
|
||||
v = let final self::Class2 #t114 = self::Extension2|[](this, this).{self::Class2::+}(this) in let final void #t115 = self::Extension2|[]=(this, this, #t114) in #t114;
|
||||
v = let final self::Class2 #t116 = self in let final self::Class2 #t117 = self in let final self::Class2 #t118 = self::Extension2|[](#t116, #t117).{self::Class2::+}(self) in let final void #t119 = self::Extension2|[]=(#t116, #t117, #t118) in #t118;
|
||||
}
|
||||
method explicitExtensionGetSetForEffect() → void {
|
||||
late final self::Class2 self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
self::Extension2|[](this, this).{core::Object::==}(null) ?{self::Class2} self::Extension2|[]=(this, this, this) : null;
|
||||
let final self::Class2 #t120 = self in let final self::Class2 #t121 = self in self::Extension2|[](#t120, #t121).{core::Object::==}(null) ?{self::Class2} self::Extension2|[]=(#t120, #t121, self) : null;
|
||||
self::Extension2|[]=(this, this, this);
|
||||
self::Extension2|[]=(self, self, self);
|
||||
self::Extension2|[](this, this);
|
||||
self::Extension2|[](self, self);
|
||||
self::Extension2|[]=(this, this, self::Extension2|[](this, this).{self::Class2::+}(this));
|
||||
let final self::Class2 #t122 = self in let final self::Class2 #t123 = self in self::Extension2|[]=(#t122, #t123, self::Extension2|[](#t122, #t123).{self::Class2::+}(self));
|
||||
}
|
||||
method explicitExtensionGetSetForValue() → void {
|
||||
late final self::Class2 self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final self::Class2 #t124 = self::Extension2|[](this, this) in #t124.{core::Object::==}(null) ?{self::Class2} let final void #t125 = self::Extension2|[]=(this, this, this) in this : #t124;
|
||||
v = let final self::Class2 #t126 = self in let final self::Class2 #t127 = self in let final self::Class2 #t128 = self::Extension2|[](#t126, #t127) in #t128.{core::Object::==}(null) ?{self::Class2} let final self::Class2 #t129 = self in let final void #t130 = self::Extension2|[]=(#t126, #t127, #t129) in #t129 : #t128;
|
||||
v = let final void #t131 = self::Extension2|[]=(this, this, this) in this;
|
||||
v = let final self::Class2 #t132 = self in let final self::Class2 #t133 = self in let final void #t134 = self::Extension2|[]=(#t132, self, #t133) in #t133;
|
||||
v = self::Extension2|[](this, this);
|
||||
v = self::Extension2|[](self, self);
|
||||
v = let final self::Class2 #t135 = self::Extension2|[](this, this).{self::Class2::+}(this) in let final void #t136 = self::Extension2|[]=(this, this, #t135) in #t135;
|
||||
v = let final self::Class2 #t137 = self in let final self::Class2 #t138 = self in let final self::Class2 #t139 = self::Extension2|[](#t137, #t138).{self::Class2::+}(self) in let final void #t140 = self::Extension2|[]=(#t137, #t138, #t139) in #t139;
|
||||
}
|
||||
}
|
||||
extension Extension on core::int {
|
||||
operator [] = self::Extension|[];
|
||||
operator []= = self::Extension|[]=;
|
||||
}
|
||||
extension Extension2 on self::Class2 {
|
||||
operator [] = self::Extension2|[];
|
||||
operator []= = self::Extension2|[]=;
|
||||
}
|
||||
static field core::bool b = true;
|
||||
static method Extension|[](lowered final core::int #this, self::Class cls) → self::Class
|
||||
return new self::Class::•();
|
||||
static method Extension|[]=(lowered final core::int #this, self::Class cls, self::Class value) → void {}
|
||||
static method Extension2|[](lowered final self::Class2 #this, self::Class2 cls) → self::Class2
|
||||
return new self::Class2::•();
|
||||
static method Extension2|[]=(lowered final self::Class2 #this, self::Class2 cls, self::Class2 value) → void {}
|
||||
static method main() → dynamic {}
|
|
@ -0,0 +1,334 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:25:8: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// map[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:26:8: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// map[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:42:12: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = map[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:43:12: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = map[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:58:6: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// i[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:59:6: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// i[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:75:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = i[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:76:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = i[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:91:17: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// Extension(i)[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:92:17: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// Extension(i)[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:108:21: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = Extension(i)[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:109:21: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = Extension(i)[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:126:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// super[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:127:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// super[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:143:14: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = super[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:144:14: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null.
|
||||
// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = super[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:168:9: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// this[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:169:9: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// self[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:185:13: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = this[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:186:13: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = self[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:201:21: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// Extension2(this)[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:202:21: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// Extension2(self)[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:218:25: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = Extension2(this)[this] ??= this;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:219:25: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null.
|
||||
// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'.
|
||||
// v = Extension2(self)[self] ??= self;
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
abstract class Map<K extends core::Object? = dynamic, V extends core::Object? = dynamic> extends core::Object {
|
||||
synthetic constructor •() → self::Map<self::Map::K%, self::Map::V%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
abstract operator [](generic-covariant-impl self::Map::K% index) → self::Map::V%;
|
||||
abstract operator []=(generic-covariant-impl self::Map::K% index, generic-covariant-impl self::Map::V% value) → void;
|
||||
}
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
operator [](self::Class cls) → self::Class
|
||||
return new self::Class::•();
|
||||
operator []=(self::Class cls, self::Class value) → void {}
|
||||
operator +(self::Class cls) → self::Class
|
||||
return cls;
|
||||
method indexGetSetForEffect(self::Map<self::Class, self::Class> map) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
let final self::Map<self::Class, self::Class> #t1 = map in #t1.{self::Map::[]}(this).{core::Object::==}(null) ?{self::Class} #t1.{self::Map::[]=}(this, this) : null;
|
||||
let final self::Map<self::Class, self::Class> #t2 = map in let final self::Class #t3 = self in #t2.{self::Map::[]}(#t3).{core::Object::==}(null) ?{self::Class} #t2.{self::Map::[]=}(#t3, self) : null;
|
||||
map.{self::Map::[]=}(this, this);
|
||||
map.{self::Map::[]=}(self, self);
|
||||
map.{self::Map::[]}(this);
|
||||
map.{self::Map::[]}(self);
|
||||
let final self::Map<self::Class, self::Class> #t4 = map in #t4.{self::Map::[]=}(this, #t4.{self::Map::[]}(this).{self::Class::+}(this));
|
||||
let final self::Map<self::Class, self::Class> #t5 = map in let final self::Class #t6 = self in #t5.{self::Map::[]=}(#t6, #t5.{self::Map::[]}(#t6).{self::Class::+}(self));
|
||||
}
|
||||
method indexGetSetForValue(self::Map<self::Class, self::Class> map) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final self::Map<self::Class, self::Class> #t7 = map in let final self::Class #t8 = #t7.{self::Map::[]}(this) in #t8.{core::Object::==}(null) ?{self::Class} let final void #t9 = #t7.{self::Map::[]=}(this, this) in this : #t8;
|
||||
v = let final self::Map<self::Class, self::Class> #t10 = map in let final self::Class #t11 = self in let final self::Class #t12 = #t10.{self::Map::[]}(#t11) in #t12.{core::Object::==}(null) ?{self::Class} let final self::Class #t13 = self in let final void #t14 = #t10.{self::Map::[]=}(#t11, #t13) in #t13 : #t12;
|
||||
v = let final self::Map<self::Class, self::Class> #t15 = map in let final void #t16 = #t15.{self::Map::[]=}(this, this) in this;
|
||||
v = let final self::Map<self::Class, self::Class> #t17 = map in let final self::Class #t18 = self in let final self::Class #t19 = self in let final void #t20 = #t17.{self::Map::[]=}(#t18, #t19) in #t19;
|
||||
v = map.{self::Map::[]}(this);
|
||||
v = map.{self::Map::[]}(self);
|
||||
v = let final self::Map<self::Class, self::Class> #t21 = map in let final self::Class #t22 = #t21.{self::Map::[]}(this).{self::Class::+}(this) in let final void #t23 = #t21.{self::Map::[]=}(this, #t22) in #t22;
|
||||
v = let final self::Map<self::Class, self::Class> #t24 = map in let final self::Class #t25 = self in let final self::Class #t26 = #t24.{self::Map::[]}(#t25).{self::Class::+}(self) in let final void #t27 = #t24.{self::Map::[]=}(#t25, #t26) in #t26;
|
||||
}
|
||||
method implicitExtensionGetSetForEffect(core::int i) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
let final core::int #t28 = i in self::Extension|[](#t28, this).{core::Object::==}(null) ?{self::Class} self::Extension|[]=(#t28, this, this) : null;
|
||||
let final core::int #t29 = i in let final self::Class #t30 = self in self::Extension|[](#t29, #t30).{core::Object::==}(null) ?{self::Class} self::Extension|[]=(#t29, #t30, self) : null;
|
||||
self::Extension|[]=(i, this, this);
|
||||
self::Extension|[]=(i, self, self);
|
||||
self::Extension|[](i, this);
|
||||
self::Extension|[](i, self);
|
||||
let final core::int #t31 = i in self::Extension|[]=(#t31, this, self::Extension|[](#t31, this).{self::Class::+}(this));
|
||||
let final core::int #t32 = i in let final self::Class #t33 = self in self::Extension|[]=(#t32, #t33, self::Extension|[](#t32, #t33).{self::Class::+}(self));
|
||||
}
|
||||
method implicitExtensionGetSetForValue(core::int i) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final core::int #t34 = i in let final self::Class #t35 = self::Extension|[](#t34, this) in #t35.{core::Object::==}(null) ?{self::Class} let final void #t36 = self::Extension|[]=(#t34, this, this) in this : #t35;
|
||||
v = let final core::int #t37 = i in let final self::Class #t38 = self in let final self::Class #t39 = self::Extension|[](#t37, #t38) in #t39.{core::Object::==}(null) ?{self::Class} let final self::Class #t40 = self in let final void #t41 = self::Extension|[]=(#t37, #t38, #t40) in #t40 : #t39;
|
||||
v = let final core::int #t42 = i in let final void #t43 = self::Extension|[]=(#t42, this, this) in this;
|
||||
v = let final core::int #t44 = i in let final self::Class #t45 = self in let final self::Class #t46 = self in let final void #t47 = self::Extension|[]=(#t44, #t45, #t46) in #t46;
|
||||
v = self::Extension|[](i, this);
|
||||
v = self::Extension|[](i, self);
|
||||
v = let final core::int #t48 = i in let final self::Class #t49 = self::Extension|[](#t48, this).{self::Class::+}(this) in let final void #t50 = self::Extension|[]=(#t48, this, #t49) in #t49;
|
||||
v = let final core::int #t51 = i in let final self::Class #t52 = self in let final self::Class #t53 = self::Extension|[](#t51, #t52).{self::Class::+}(self) in let final void #t54 = self::Extension|[]=(#t51, #t52, #t53) in #t53;
|
||||
}
|
||||
method explicitExtensionGetSetForEffect(core::int i) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
let final core::int #t55 = i in self::Extension|[](#t55, this).{core::Object::==}(null) ?{self::Class} self::Extension|[]=(#t55, this, this) : null;
|
||||
let final core::int #t56 = i in let final self::Class #t57 = self in self::Extension|[](#t56, #t57).{core::Object::==}(null) ?{self::Class} self::Extension|[]=(#t56, #t57, self) : null;
|
||||
self::Extension|[]=(i, this, this);
|
||||
self::Extension|[]=(i, self, self);
|
||||
self::Extension|[](i, this);
|
||||
self::Extension|[](i, self);
|
||||
let final core::int #t58 = i in self::Extension|[]=(#t58, this, self::Extension|[](#t58, this).{self::Class::+}(this));
|
||||
let final core::int #t59 = i in let final self::Class #t60 = self in self::Extension|[]=(#t59, #t60, self::Extension|[](#t59, #t60).{self::Class::+}(self));
|
||||
}
|
||||
method explicitExtensionGetSetForValue(core::int i) → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final core::int #t61 = i in let final self::Class #t62 = self::Extension|[](#t61, this) in #t62.{core::Object::==}(null) ?{self::Class} let final void #t63 = self::Extension|[]=(#t61, this, this) in this : #t62;
|
||||
v = let final core::int #t64 = i in let final self::Class #t65 = self in let final self::Class #t66 = self::Extension|[](#t64, #t65) in #t66.{core::Object::==}(null) ?{self::Class} let final self::Class #t67 = self in let final void #t68 = self::Extension|[]=(#t64, #t65, #t67) in #t67 : #t66;
|
||||
v = let final core::int #t69 = i in let final void #t70 = self::Extension|[]=(#t69, this, this) in this;
|
||||
v = let final core::int #t71 = i in let final self::Class #t72 = self in let final void #t73 = self::Extension|[]=(#t71, self, #t72) in #t72;
|
||||
v = self::Extension|[](i, this);
|
||||
v = self::Extension|[](i, self);
|
||||
v = let final core::int #t74 = i in let final self::Class #t75 = self::Extension|[](#t74, this).{self::Class::+}(this) in let final void #t76 = self::Extension|[]=(#t74, this, #t75) in #t75;
|
||||
v = let final core::int #t77 = i in let final self::Class #t78 = self in let final self::Class #t79 = self::Extension|[](#t77, #t78).{self::Class::+}(self) in let final void #t80 = self::Extension|[]=(#t77, #t78, #t79) in #t79;
|
||||
}
|
||||
}
|
||||
class Subclass extends self::Class {
|
||||
synthetic constructor •() → self::Subclass
|
||||
: super self::Class::•()
|
||||
;
|
||||
method superIndexGetSetForEffect() → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
super.{self::Class::[]}(this).{core::Object::==}(null) ?{self::Class} super.{self::Class::[]=}(this, this) : null;
|
||||
let final self::Class #t81 = self in super.{self::Class::[]}(#t81).{core::Object::==}(null) ?{self::Class} super.{self::Class::[]=}(#t81, self) : null;
|
||||
super.{self::Class::[]=}(this, this);
|
||||
super.{self::Class::[]=}(self, self);
|
||||
super.{self::Class::[]}(this);
|
||||
super.{self::Class::[]}(self);
|
||||
super.{self::Class::[]=}(this, super.{self::Class::[]}(this).{self::Class::+}(this));
|
||||
let final self::Class #t82 = self in super.{self::Class::[]=}(#t82, super.{self::Class::[]}(#t82).{self::Class::+}(self));
|
||||
}
|
||||
method superIndexGetSetForValue() → void {
|
||||
late final self::Class self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final self::Class #t83 = super.{self::Class::[]}(this) in #t83.{core::Object::==}(null) ?{self::Class} let final void #t84 = super.{self::Class::[]=}(this, this) in this : #t83;
|
||||
v = let final self::Class #t85 = self in let final self::Class #t86 = super.{self::Class::[]}(#t85) in #t86.{core::Object::==}(null) ?{self::Class} let final self::Class #t87 = self in let final void #t88 = super.{self::Class::[]=}(#t85, #t87) in #t87 : #t86;
|
||||
v = let final void #t89 = super.{self::Class::[]=}(this, this) in this;
|
||||
v = let final self::Class #t90 = self in let final self::Class #t91 = self in let final void #t92 = super.{self::Class::[]=}(#t90, #t91) in #t91;
|
||||
v = super.{self::Class::[]}(this);
|
||||
v = super.{self::Class::[]}(self);
|
||||
v = let final self::Class #t93 = super.{self::Class::[]}(this).{self::Class::+}(this) in let final void #t94 = super.{self::Class::[]=}(this, #t93) in #t93;
|
||||
v = let final self::Class #t95 = self in let final self::Class #t96 = super.{self::Class::[]}(#t95).{self::Class::+}(self) in let final void #t97 = super.{self::Class::[]=}(#t95, #t96) in #t96;
|
||||
}
|
||||
}
|
||||
class Class2 extends core::Object {
|
||||
synthetic constructor •() → self::Class2
|
||||
: super core::Object::•()
|
||||
;
|
||||
operator +(self::Class2 cls) → self::Class2
|
||||
return cls;
|
||||
method implicitExtensionGetSetForEffect() → void {
|
||||
late final self::Class2 self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
self::Extension2|[](this, this).{core::Object::==}(null) ?{self::Class2} self::Extension2|[]=(this, this, this) : null;
|
||||
let final self::Class2 #t98 = self in let final self::Class2 #t99 = self in self::Extension2|[](#t98, #t99).{core::Object::==}(null) ?{self::Class2} self::Extension2|[]=(#t98, #t99, self) : null;
|
||||
self::Extension2|[]=(this, this, this);
|
||||
self::Extension2|[]=(self, self, self);
|
||||
self::Extension2|[](this, this);
|
||||
self::Extension2|[](self, self);
|
||||
self::Extension2|[]=(this, this, self::Extension2|[](this, this).{self::Class2::+}(this));
|
||||
let final self::Class2 #t100 = self in let final self::Class2 #t101 = self in self::Extension2|[]=(#t100, #t101, self::Extension2|[](#t100, #t101).{self::Class2::+}(self));
|
||||
}
|
||||
method implicitExtensionGetSetForValue() → void {
|
||||
late final self::Class2 self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final self::Class2 #t102 = self::Extension2|[](this, this) in #t102.{core::Object::==}(null) ?{self::Class2} let final void #t103 = self::Extension2|[]=(this, this, this) in this : #t102;
|
||||
v = let final self::Class2 #t104 = self in let final self::Class2 #t105 = self in let final self::Class2 #t106 = self::Extension2|[](#t104, #t105) in #t106.{core::Object::==}(null) ?{self::Class2} let final self::Class2 #t107 = self in let final void #t108 = self::Extension2|[]=(#t104, #t105, #t107) in #t107 : #t106;
|
||||
v = let final void #t109 = self::Extension2|[]=(this, this, this) in this;
|
||||
v = let final self::Class2 #t110 = self in let final self::Class2 #t111 = self in let final self::Class2 #t112 = self in let final void #t113 = self::Extension2|[]=(#t110, #t111, #t112) in #t112;
|
||||
v = self::Extension2|[](this, this);
|
||||
v = self::Extension2|[](self, self);
|
||||
v = let final self::Class2 #t114 = self::Extension2|[](this, this).{self::Class2::+}(this) in let final void #t115 = self::Extension2|[]=(this, this, #t114) in #t114;
|
||||
v = let final self::Class2 #t116 = self in let final self::Class2 #t117 = self in let final self::Class2 #t118 = self::Extension2|[](#t116, #t117).{self::Class2::+}(self) in let final void #t119 = self::Extension2|[]=(#t116, #t117, #t118) in #t118;
|
||||
}
|
||||
method explicitExtensionGetSetForEffect() → void {
|
||||
late final self::Class2 self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
self::Extension2|[](this, this).{core::Object::==}(null) ?{self::Class2} self::Extension2|[]=(this, this, this) : null;
|
||||
let final self::Class2 #t120 = self in let final self::Class2 #t121 = self in self::Extension2|[](#t120, #t121).{core::Object::==}(null) ?{self::Class2} self::Extension2|[]=(#t120, #t121, self) : null;
|
||||
self::Extension2|[]=(this, this, this);
|
||||
self::Extension2|[]=(self, self, self);
|
||||
self::Extension2|[](this, this);
|
||||
self::Extension2|[](self, self);
|
||||
self::Extension2|[]=(this, this, self::Extension2|[](this, this).{self::Class2::+}(this));
|
||||
let final self::Class2 #t122 = self in let final self::Class2 #t123 = self in self::Extension2|[]=(#t122, #t123, self::Extension2|[](#t122, #t123).{self::Class2::+}(self));
|
||||
}
|
||||
method explicitExtensionGetSetForValue() → void {
|
||||
late final self::Class2 self;
|
||||
if(self::b)
|
||||
self = this;
|
||||
dynamic v;
|
||||
v = let final self::Class2 #t124 = self::Extension2|[](this, this) in #t124.{core::Object::==}(null) ?{self::Class2} let final void #t125 = self::Extension2|[]=(this, this, this) in this : #t124;
|
||||
v = let final self::Class2 #t126 = self in let final self::Class2 #t127 = self in let final self::Class2 #t128 = self::Extension2|[](#t126, #t127) in #t128.{core::Object::==}(null) ?{self::Class2} let final self::Class2 #t129 = self in let final void #t130 = self::Extension2|[]=(#t126, #t127, #t129) in #t129 : #t128;
|
||||
v = let final void #t131 = self::Extension2|[]=(this, this, this) in this;
|
||||
v = let final self::Class2 #t132 = self in let final self::Class2 #t133 = self in let final void #t134 = self::Extension2|[]=(#t132, self, #t133) in #t133;
|
||||
v = self::Extension2|[](this, this);
|
||||
v = self::Extension2|[](self, self);
|
||||
v = let final self::Class2 #t135 = self::Extension2|[](this, this).{self::Class2::+}(this) in let final void #t136 = self::Extension2|[]=(this, this, #t135) in #t135;
|
||||
v = let final self::Class2 #t137 = self in let final self::Class2 #t138 = self in let final self::Class2 #t139 = self::Extension2|[](#t137, #t138).{self::Class2::+}(self) in let final void #t140 = self::Extension2|[]=(#t137, #t138, #t139) in #t139;
|
||||
}
|
||||
}
|
||||
extension Extension on core::int {
|
||||
operator [] = self::Extension|[];
|
||||
operator []= = self::Extension|[]=;
|
||||
}
|
||||
extension Extension2 on self::Class2 {
|
||||
operator [] = self::Extension2|[];
|
||||
operator []= = self::Extension2|[]=;
|
||||
}
|
||||
static field core::bool b = true;
|
||||
static method Extension|[](lowered final core::int #this, self::Class cls) → self::Class
|
||||
return new self::Class::•();
|
||||
static method Extension|[]=(lowered final core::int #this, self::Class cls, self::Class value) → void {}
|
||||
static method Extension2|[](lowered final self::Class2 #this, self::Class2 cls) → self::Class2
|
||||
return new self::Class2::•();
|
||||
static method Extension2|[]=(lowered final self::Class2 #this, self::Class2 cls, self::Class2 value) → void {}
|
||||
static method main() → dynamic {}
|
|
@ -121,6 +121,7 @@ general/issue42997: FormatterCrash
|
|||
general/issue43363: FormatterCrash
|
||||
general/many_errors: FormatterCrash
|
||||
general/null_safety_invalid_experiment_and_language_version: FormatterCrash
|
||||
general/pure_index_expressions: FormatterCrash
|
||||
general/type_parameter_usage_in_static_method_in_extension: FormatterCrash
|
||||
general/type_parameters_on_void: FormatterCrash
|
||||
general/var_as_type_name: FormatterCrash
|
||||
|
@ -207,6 +208,7 @@ nnbd/nullable_setter: FormatterCrash
|
|||
nnbd/opt_out: FormatterCrash
|
||||
nnbd/potentially_non_nullable_field: FormatterCrash
|
||||
nnbd/potentially_nullable_access: FormatterCrash
|
||||
nnbd/pure_index_expressions: FormatterCrash
|
||||
nnbd/strictly_non_nullable_warnings: FormatterCrash
|
||||
nnbd/uninitialized_non_nullable_late_fields: FormatterCrash
|
||||
nnbd_mixed/inheritance_from_opt_in: FormatterCrash
|
||||
|
|
Loading…
Reference in a new issue