[cfe] Add flags to MethodInvocation and fileEndOffset to Block

The CL add a 'flags' to MethodInvocation with the properties isInvariant
and isBoundsSafe. The former is used for to marks safe calls in unified
collection encoding. Both can be used further by backends.

The CL also adds a 'fileEndOffset' to Block. This is current set for
block declared in used code.

In response to https://github.com/dart-lang/sdk/issues/43994
and https://github.com/dart-lang/sdk/issues/43965

Change-Id: I579fc2928331465dfc2c152ccfd21297b12cfdd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170695
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
Johnni Winther 2020-11-09 07:36:44 +00:00 committed by commit-bot@chromium.org
parent 5871cfb23c
commit 1930c07cd7
102 changed files with 3329 additions and 3005 deletions

View file

@ -507,7 +507,9 @@ class BodyBuilder extends ScopeListener<JumpTarget>
}
Statement popBlock(int count, Token openBrace, Token closeBrace) {
return forest.createBlock(offsetForToken(openBrace),
return forest.createBlock(
offsetForToken(openBrace),
offsetForToken(closeBrace),
const GrowableList<Statement>().pop(stack, count) ?? <Statement>[]);
}
@ -1015,9 +1017,9 @@ class BodyBuilder extends ScopeListener<JumpTarget>
statements.add(parameter.variable);
}
statements.add(body);
body = forest.createBlock(charOffset, statements);
body = forest.createBlock(charOffset, noLocation, statements);
}
body = forest.createBlock(charOffset, <Statement>[
body = forest.createBlock(charOffset, noLocation, <Statement>[
forest.createExpressionStatement(
noLocation,
// This error is added after type inference is done, so we
@ -3777,7 +3779,7 @@ class BodyBuilder extends ScopeListener<JumpTarget>
if (compileTimeErrors == null) {
push(NullValue.Block);
} else {
push(forest.createBlock(noLocation, compileTimeErrors));
push(forest.createBlock(noLocation, noLocation, compileTimeErrors));
}
}
@ -3824,7 +3826,7 @@ class BodyBuilder extends ScopeListener<JumpTarget>
if (compileTimeErrors != null) {
compileTimeErrors.add(result);
push(forest.createBlock(noLocation, compileTimeErrors));
push(forest.createBlock(noLocation, noLocation, compileTimeErrors));
} else {
push(result);
}
@ -4919,7 +4921,8 @@ class BodyBuilder extends ScopeListener<JumpTarget>
// This must have been a compile-time error.
assert(isErroneousNode(variable.initializer));
push(forest.createBlock(declaration.fileOffset, <Statement>[
push(forest
.createBlock(declaration.fileOffset, noLocation, <Statement>[
forest.createExpressionStatement(
offsetForToken(token), variable.initializer),
declaration
@ -5156,6 +5159,7 @@ class BodyBuilder extends ScopeListener<JumpTarget>
Statement effects;
if (forest.isVariablesDeclaration(lvalue)) {
effects = forest.createBlock(
noLocation,
noLocation,
// New list because the declarations are not a growable list.
new List<Statement>.from(
@ -6083,7 +6087,7 @@ class BodyBuilder extends ScopeListener<JumpTarget>
if (member.isNative) {
push(NullValue.FunctionBody);
} else {
push(forest.createBlock(offsetForToken(token), <Statement>[
push(forest.createBlock(offsetForToken(token), noLocation, <Statement>[
buildProblemStatement(
fasta.templateExpectedFunctionBody.withArguments(token),
token.charOffset,

View file

@ -1770,7 +1770,9 @@ class ConstantEvaluator extends RecursiveVisitor<Constant> {
return unevaluated(
node,
new MethodInvocation(extract(receiver), node.name,
unevaluatedArguments(arguments, {}, node.arguments.types)));
unevaluatedArguments(arguments, {}, node.arguments.types))
..fileOffset = node.fileOffset
..flags = node.flags);
}
final String op = node.name.text;

View file

@ -311,7 +311,8 @@ class Forest {
/// Return a representation of a block of [statements] at the given
/// [fileOffset].
Statement createBlock(int fileOffset, List<Statement> statements) {
Statement createBlock(
int fileOffset, int fileEndOffset, List<Statement> statements) {
assert(fileOffset != null);
List<Statement> copy;
for (int i = 0; i < statements.length; i++) {
@ -323,7 +324,9 @@ class Forest {
copy.add(statement);
}
}
return new Block(copy ?? statements)..fileOffset = fileOffset;
return new Block(copy ?? statements)
..fileOffset = fileOffset
..fileEndOffset = fileEndOffset;
}
/// Return a representation of a break statement.

View file

@ -754,7 +754,8 @@ class CollectionTransformer extends Transformer {
"No fileOffset on ${argument}.");
return new MethodInvocation(receiver, new Name('add'),
new Arguments([argument]), isSet ? setAdd : listAdd)
..fileOffset = argument.fileOffset;
..fileOffset = argument.fileOffset
..isInvariant = true;
}
Expression _createEqualsNull(Expression expression, {bool notEquals: false}) {
@ -778,7 +779,8 @@ class CollectionTransformer extends Transformer {
assert(fileOffset != TreeNode.noOffset);
return new MethodInvocation(
receiver, new Name('[]='), new Arguments([key, value]), mapPut)
..fileOffset = fileOffset;
..fileOffset = fileOffset
..isInvariant = true;
}
AsExpression _createImplicitAs(

View file

@ -79,7 +79,8 @@ class SetLiteralTransformer extends Transformer {
new Name("add"),
new Arguments([entry]),
addMethod)
..fileOffset = entry.fileOffset;
..fileOffset = entry.fileOffset
..isInvariant = true;
statements.add(new ExpressionStatement(methodInvocation)
..fileOffset = methodInvocation.fileOffset);
}

View file

@ -801,6 +801,7 @@ parenteses
particularly
patchup
path
patterns
paulberry
pay
payload

View file

@ -3,5 +3,5 @@ Errors: {
method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
return block {
final dart.core::Set<dart.core::String*>* #t1 = dart.collection::LinkedHashSet::•<dart.core::String*>();
#t1.{dart.core::Set::add}("a");
#t1.{dart.core::Set::add}{Invariant}("a");
} =>#t1;

View file

@ -7,7 +7,7 @@ method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() →
dart.core::Iterator<dart.core::String*>* :sync-for-iterator = main::listOfStrings.{dart.core::Iterable::iterator};
for (; :sync-for-iterator.{dart.core::Iterator::moveNext}(); ) {
final dart.core::String* #t2 = :sync-for-iterator.{dart.core::Iterator::current};
#t1.{dart.core::List::add}(#t2);
#t1.{dart.core::List::add}{Invariant}(#t2);
}
}
} =>#t1;

View file

@ -407,8 +407,8 @@ static const field core::List<core::String*>* bar = #C10;
static field core::List<core::String*>* barAsVar = block {
final core::List<core::String*>* #t1 = <core::String*>[];
for (final core::String* #t2 in #C8)
#t1.{core::List::add}(#t2);
#t1.{core::List::add}("!");
#t1.{core::List::add}{Invariant}(#t2);
#t1.{core::List::add}{Invariant}("!");
} =>#t1;
static const field core::List<core::String*>* barWithNullSpread = invalid-expression "Null value during constant evaluation.";
static const field core::List<core::String*>* barWithIntSpread = invalid-expression "pkg/front_end/testcases/general/constants/const_collections.dart:23:51: Error: Unexpected type 'int' of a spread. Expected 'dynamic' or an Iterable.
@ -482,7 +482,7 @@ static method main() → dynamic {
core::print(#C22);
core::print( block {
final core::Set<core::String*>* #t3 = col::LinkedHashSet::•<core::String*>();
#t3.{core::Set::add}("hello");
#t3.{core::Set::add}{Invariant}("hello");
} =>#t3);
core::print(#C26);
}

View file

@ -410,10 +410,10 @@ static field core::List<core::String*>* barAsVar = block {
core::Iterator<core::String*>* :sync-for-iterator = (#C8).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::String* #t2 = :sync-for-iterator.{core::Iterator::current};
#t1.{core::List::add}(#t2);
#t1.{core::List::add}{Invariant}(#t2);
}
}
#t1.{core::List::add}("!");
#t1.{core::List::add}{Invariant}("!");
} =>#t1;
static const field core::List<core::String*>* barWithNullSpread = invalid-expression "Null value during constant evaluation.";
static const field core::List<core::String*>* barWithIntSpread = invalid-expression "pkg/front_end/testcases/general/constants/const_collections.dart:23:51: Error: Unexpected type 'int' of a spread. Expected 'dynamic' or an Iterable.
@ -487,7 +487,7 @@ static method main() → dynamic {
core::print(#C22);
core::print( block {
final core::Set<core::String*>* #t3 = new col::_CompactLinkedHashSet::•<core::String*>();
#t3.{core::Set::add}("hello");
#t3.{core::Set::add}{Invariant}("hello");
} =>#t3);
core::print(#C26);
}

View file

@ -6,63 +6,63 @@ import "dart:collection" as col;
static method main() → dynamic {
final core::List<core::int*>* aList = block {
final core::List<core::int*>* #t1 = <core::int*>[];
#t1.{core::List::add}(1);
#t1.{core::List::add}{Invariant}(1);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t1.{core::List::add}(2);
#t1.{core::List::add}{Invariant}(2);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t1.{core::List::add}(3);
#t1.{core::List::add}{Invariant}(3);
else
#t1.{core::List::add}(1.{core::int::unary-}());
#t1.{core::List::add}{Invariant}(1.{core::int::unary-}());
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t1.{core::List::add}(4);
#t1.{core::List::add}{Invariant}(4);
for (core::int* i in <core::int*>[5, 6, 7])
#t1.{core::List::add}(i);
#t1.{core::List::add}{Invariant}(i);
for (core::int* i in <core::int*>[8, 9, 10])
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t1.{core::List::add}(i);
#t1.{core::List::add}{Invariant}(i);
for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
#t1.{core::List::add}(i);
#t1.{core::List::add}{Invariant}(i);
} =>#t1;
final core::Set<core::int*>* aSet = block {
final core::Set<core::int*>* #t2 = col::LinkedHashSet::•<core::int*>();
#t2.{core::Set::add}(1);
#t2.{core::Set::add}{Invariant}(1);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t2.{core::Set::add}(2);
#t2.{core::Set::add}{Invariant}(2);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t2.{core::Set::add}(3);
#t2.{core::Set::add}{Invariant}(3);
else
#t2.{core::Set::add}(1.{core::int::unary-}());
#t2.{core::Set::add}{Invariant}(1.{core::int::unary-}());
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t2.{core::Set::add}(4);
#t2.{core::Set::add}{Invariant}(4);
for (core::int* i in <core::int*>[5, 6, 7])
#t2.{core::Set::add}(i);
#t2.{core::Set::add}{Invariant}(i);
for (core::int* i in <core::int*>[8, 9, 10])
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t2.{core::Set::add}(i);
#t2.{core::Set::add}{Invariant}(i);
for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
#t2.{core::Set::add}(i);
#t2.{core::Set::add}{Invariant}(i);
} =>#t2;
final core::Map<core::int*, core::int*>* aMap = block {
final core::Map<core::int*, core::int*>* #t3 = <core::int*, core::int*>{};
#t3.{core::Map::[]=}(1, 1);
#t3.{core::Map::[]=}{Invariant}(1, 1);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t3.{core::Map::[]=}(2, 2);
#t3.{core::Map::[]=}{Invariant}(2, 2);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t3.{core::Map::[]=}(3, 3);
#t3.{core::Map::[]=}{Invariant}(3, 3);
else
#t3.{core::Map::[]=}(1.{core::int::unary-}(), 1.{core::int::unary-}());
#t3.{core::Map::[]=}{Invariant}(1.{core::int::unary-}(), 1.{core::int::unary-}());
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t3.{core::Map::[]=}(4, 4);
#t3.{core::Map::[]=}{Invariant}(4, 4);
for (core::int* i in <core::int*>[5, 6, 7])
#t3.{core::Map::[]=}(i, i);
#t3.{core::Map::[]=}{Invariant}(i, i);
for (core::int* i in <core::int*>[8, 9, 10])
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t3.{core::Map::[]=}(i, i);
#t3.{core::Map::[]=}{Invariant}(i, i);
for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
#t3.{core::Map::[]=}(i, i);
#t3.{core::Map::[]=}{Invariant}(i, i);
} =>#t3;
core::print(aList);
core::print(aSet);

View file

@ -6,21 +6,21 @@ import "dart:collection" as col;
static method main() → dynamic {
final core::List<core::int*>* aList = block {
final core::List<core::int*>* #t1 = <core::int*>[];
#t1.{core::List::add}(1);
#t1.{core::List::add}{Invariant}(1);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t1.{core::List::add}(2);
#t1.{core::List::add}{Invariant}(2);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t1.{core::List::add}(3);
#t1.{core::List::add}{Invariant}(3);
else
#t1.{core::List::add}(1.{core::int::unary-}());
#t1.{core::List::add}{Invariant}(1.{core::int::unary-}());
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t1.{core::List::add}(4);
#t1.{core::List::add}{Invariant}(4);
{
core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[5, 6, 7].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int* i = :sync-for-iterator.{core::Iterator::current};
#t1.{core::List::add}(i);
#t1.{core::List::add}{Invariant}(i);
}
}
{
@ -28,29 +28,29 @@ static method main() → dynamic {
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int* i = :sync-for-iterator.{core::Iterator::current};
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t1.{core::List::add}(i);
#t1.{core::List::add}{Invariant}(i);
}
}
for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
#t1.{core::List::add}(i);
#t1.{core::List::add}{Invariant}(i);
} =>#t1;
final core::Set<core::int*>* aSet = block {
final core::Set<core::int*>* #t2 = new col::_CompactLinkedHashSet::•<core::int*>();
#t2.{core::Set::add}(1);
#t2.{core::Set::add}{Invariant}(1);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t2.{core::Set::add}(2);
#t2.{core::Set::add}{Invariant}(2);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t2.{core::Set::add}(3);
#t2.{core::Set::add}{Invariant}(3);
else
#t2.{core::Set::add}(1.{core::int::unary-}());
#t2.{core::Set::add}{Invariant}(1.{core::int::unary-}());
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t2.{core::Set::add}(4);
#t2.{core::Set::add}{Invariant}(4);
{
core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[5, 6, 7].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int* i = :sync-for-iterator.{core::Iterator::current};
#t2.{core::Set::add}(i);
#t2.{core::Set::add}{Invariant}(i);
}
}
{
@ -58,29 +58,29 @@ static method main() → dynamic {
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int* i = :sync-for-iterator.{core::Iterator::current};
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t2.{core::Set::add}(i);
#t2.{core::Set::add}{Invariant}(i);
}
}
for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
#t2.{core::Set::add}(i);
#t2.{core::Set::add}{Invariant}(i);
} =>#t2;
final core::Map<core::int*, core::int*>* aMap = block {
final core::Map<core::int*, core::int*>* #t3 = <core::int*, core::int*>{};
#t3.{core::Map::[]=}(1, 1);
#t3.{core::Map::[]=}{Invariant}(1, 1);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t3.{core::Map::[]=}(2, 2);
#t3.{core::Map::[]=}{Invariant}(2, 2);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t3.{core::Map::[]=}(3, 3);
#t3.{core::Map::[]=}{Invariant}(3, 3);
else
#t3.{core::Map::[]=}(1.{core::int::unary-}(), 1.{core::int::unary-}());
#t3.{core::Map::[]=}{Invariant}(1.{core::int::unary-}(), 1.{core::int::unary-}());
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t3.{core::Map::[]=}(4, 4);
#t3.{core::Map::[]=}{Invariant}(4, 4);
{
core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[5, 6, 7].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int* i = :sync-for-iterator.{core::Iterator::current};
#t3.{core::Map::[]=}(i, i);
#t3.{core::Map::[]=}{Invariant}(i, i);
}
}
{
@ -88,11 +88,11 @@ static method main() → dynamic {
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int* i = :sync-for-iterator.{core::Iterator::current};
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t3.{core::Map::[]=}(i, i);
#t3.{core::Map::[]=}{Invariant}(i, i);
}
}
for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
#t3.{core::Map::[]=}(i, i);
#t3.{core::Map::[]=}{Invariant}(i, i);
} =>#t3;
core::print(aList);
core::print(aSet);

View file

@ -8,6 +8,6 @@ static method main() → dynamic {
core::Object* b;
return block {
final core::Set<core::Object*>* #t1 = col::LinkedHashSet::•<core::Object*>();
#t1.{core::Set::add}(let final core::Object* #t2 = a in #t2.{core::Object::==}(null) ?{core::Object*} b : #t2);
#t1.{core::Set::add}{Invariant}(let final core::Object* #t2 = a in #t2.{core::Object::==}(null) ?{core::Object*} b : #t2);
} =>#t1;
}

View file

@ -8,6 +8,6 @@ static method main() → dynamic {
core::Object* b;
return block {
final core::Set<core::Object*>* #t1 = new col::_CompactLinkedHashSet::•<core::Object*>();
#t1.{core::Set::add}(let final core::Object* #t2 = a in #t2.{core::Object::==}(null) ?{core::Object*} b : #t2);
#t1.{core::Set::add}{Invariant}(let final core::Object* #t2 = a in #t2.{core::Object::==}(null) ?{core::Object*} b : #t2);
} =>#t1;
}

View file

@ -10,7 +10,7 @@ class C extends core::Object {
final core::Set<core::int*>* #t1 = col::LinkedHashSet::•<core::int*>();
for (core::int* e in ell)
if(e.{core::int::isOdd})
#t1.{core::Set::add}(2.{core::num::*}(e));
#t1.{core::Set::add}{Invariant}(2.{core::num::*}(e));
} =>#t1, super core::Object::•()
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode

View file

@ -13,7 +13,7 @@ class C extends core::Object {
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int* e = :sync-for-iterator.{core::Iterator::current};
if(e.{core::int::isOdd})
#t1.{core::Set::add}(2.{core::num::*}(e));
#t1.{core::Set::add}{Invariant}(2.{core::num::*}(e));
}
}
} =>#t1, super core::Object::•()

View file

@ -6,31 +6,31 @@ import "dart:collection" as col;
static method nullAwareListSpread(core::List<core::String*>* list) → dynamic {
list = block {
final core::List<core::String*>* #t1 = <core::String*>[];
#t1.{core::List::add}("foo");
#t1.{core::List::add}{Invariant}("foo");
final core::Iterable<core::String*>* #t2 = list;
if(!#t2.{core::Object::==}(null))
for (final core::String* #t3 in #t2)
#t1.{core::List::add}(#t3);
#t1.{core::List::add}{Invariant}(#t3);
} =>#t1;
}
static method nullAwareSetSpread(core::Set<core::String*>* set) → dynamic {
set = block {
final core::Set<core::String*>* #t4 = col::LinkedHashSet::•<core::String*>();
#t4.{core::Set::add}("foo");
#t4.{core::Set::add}{Invariant}("foo");
final core::Iterable<core::String*>* #t5 = set;
if(!#t5.{core::Object::==}(null))
for (final core::String* #t6 in #t5)
#t4.{core::Set::add}(#t6);
#t4.{core::Set::add}{Invariant}(#t6);
} =>#t4;
}
static method nullAwareMapSpread(core::Map<core::int*, core::String*>* map) → dynamic {
map = block {
final core::Map<core::int*, core::String*>* #t7 = <core::int*, core::String*>{};
#t7.{core::Map::[]=}(0, "foo");
#t7.{core::Map::[]=}{Invariant}(0, "foo");
final core::Map<core::int*, core::String*>* #t8 = map;
if(!#t8.{core::Object::==}(null))
for (final core::MapEntry<core::int*, core::String*>* #t9 in #t8.{core::Map::entries})
#t7.{core::Map::[]=}(#t9.{core::MapEntry::key}, #t9.{core::MapEntry::value});
#t7.{core::Map::[]=}{Invariant}(#t9.{core::MapEntry::key}, #t9.{core::MapEntry::value});
} =>#t7;
}
static method main() → dynamic {

View file

@ -6,13 +6,13 @@ import "dart:collection" as col;
static method nullAwareListSpread(core::List<core::String*>* list) → dynamic {
list = block {
final core::List<core::String*>* #t1 = <core::String*>[];
#t1.{core::List::add}("foo");
#t1.{core::List::add}{Invariant}("foo");
final core::Iterable<core::String*>* #t2 = list;
if(!#t2.{core::Object::==}(null)) {
core::Iterator<core::String*>* :sync-for-iterator = #t2.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::String* #t3 = :sync-for-iterator.{core::Iterator::current};
#t1.{core::List::add}(#t3);
#t1.{core::List::add}{Invariant}(#t3);
}
}
} =>#t1;
@ -20,13 +20,13 @@ static method nullAwareListSpread(core::List<core::String*>* list) → dynamic {
static method nullAwareSetSpread(core::Set<core::String*>* set) → dynamic {
set = block {
final core::Set<core::String*>* #t4 = new col::_CompactLinkedHashSet::•<core::String*>();
#t4.{core::Set::add}("foo");
#t4.{core::Set::add}{Invariant}("foo");
final core::Iterable<core::String*>* #t5 = set;
if(!#t5.{core::Object::==}(null)) {
core::Iterator<core::String*>* :sync-for-iterator = #t5.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::String* #t6 = :sync-for-iterator.{core::Iterator::current};
#t4.{core::Set::add}(#t6);
#t4.{core::Set::add}{Invariant}(#t6);
}
}
} =>#t4;
@ -34,13 +34,13 @@ static method nullAwareSetSpread(core::Set<core::String*>* set) → dynamic {
static method nullAwareMapSpread(core::Map<core::int*, core::String*>* map) → dynamic {
map = block {
final core::Map<core::int*, core::String*>* #t7 = <core::int*, core::String*>{};
#t7.{core::Map::[]=}(0, "foo");
#t7.{core::Map::[]=}{Invariant}(0, "foo");
final core::Map<core::int*, core::String*>* #t8 = map;
if(!#t8.{core::Object::==}(null)) {
core::Iterator<core::MapEntry<core::int*, core::String*>>* :sync-for-iterator = #t8.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int*, core::String*>* #t9 = :sync-for-iterator.{core::Iterator::current};
#t7.{core::Map::[]=}(#t9.{core::MapEntry::key}, #t9.{core::MapEntry::value});
#t7.{core::Map::[]=}{Invariant}(#t9.{core::MapEntry::key}, #t9.{core::MapEntry::value});
}
}
} =>#t7;

View file

@ -14,33 +14,33 @@ import "dart:collection" as col;
static method main() → dynamic {
final core::List<core::int*>* aList = block {
final core::List<core::int*>* #t1 = <core::int*>[];
#t1.{core::List::add}(1);
#t1.{core::List::add}{Invariant}(1);
for (final core::int* #t2 in <core::int*>[2])
#t1.{core::List::add}(#t2);
#t1.{core::List::add}{Invariant}(#t2);
final core::Iterable<core::int*>* #t3 = <core::int*>[3];
if(!#t3.{core::Object::==}(null))
for (final core::int* #t4 in #t3)
#t1.{core::List::add}(#t4);
#t1.{core::List::add}{Invariant}(#t4);
} =>#t1;
final core::Map<core::int*, core::int*>* aMap = block {
final core::Map<core::int*, core::int*>* #t5 = <core::int*, core::int*>{};
#t5.{core::Map::[]=}(1, 1);
#t5.{core::Map::[]=}{Invariant}(1, 1);
for (final core::MapEntry<core::int*, core::int*>* #t6 in <core::int*, core::int*>{2: 2}.{core::Map::entries})
#t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
#t5.{core::Map::[]=}{Invariant}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
final core::Map<core::int*, core::int*>* #t7 = <core::int*, core::int*>{3: 3};
if(!#t7.{core::Object::==}(null))
for (final core::MapEntry<core::int*, core::int*>* #t8 in #t7.{core::Map::entries})
#t5.{core::Map::[]=}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
#t5.{core::Map::[]=}{Invariant}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
} =>#t5;
final core::Set<core::int*>* aSet = block {
final core::Set<core::int*>* #t9 = col::LinkedHashSet::•<core::int*>();
#t9.{core::Set::add}(1);
#t9.{core::Set::add}{Invariant}(1);
for (final core::int* #t10 in <core::int*>[2])
#t9.{core::Set::add}(#t10);
#t9.{core::Set::add}{Invariant}(#t10);
final core::Iterable<core::int*>* #t11 = <core::int*>[3];
if(!#t11.{core::Object::==}(null))
for (final core::int* #t12 in #t11)
#t9.{core::Set::add}(#t12);
#t9.{core::Set::add}{Invariant}(#t12);
} =>#t9;
final dynamic aSetOrMap = invalid-expression "pkg/front_end/testcases/general/spread_collection.dart:21:21: Error: Not enough type information to disambiguate between literal set and literal map.
Try providing type arguments for the literal explicitly to disambiguate it.

View file

@ -14,12 +14,12 @@ import "dart:collection" as col;
static method main() → dynamic {
final core::List<core::int*>* aList = block {
final core::List<core::int*>* #t1 = <core::int*>[];
#t1.{core::List::add}(1);
#t1.{core::List::add}{Invariant}(1);
{
core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[2].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t2 = :sync-for-iterator.{core::Iterator::current};
#t1.{core::List::add}(#t2);
#t1.{core::List::add}{Invariant}(#t2);
}
}
final core::Iterable<core::int*>* #t3 = <core::int*>[3];
@ -27,18 +27,18 @@ static method main() → dynamic {
core::Iterator<core::int*>* :sync-for-iterator = #t3.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t4 = :sync-for-iterator.{core::Iterator::current};
#t1.{core::List::add}(#t4);
#t1.{core::List::add}{Invariant}(#t4);
}
}
} =>#t1;
final core::Map<core::int*, core::int*>* aMap = block {
final core::Map<core::int*, core::int*>* #t5 = <core::int*, core::int*>{};
#t5.{core::Map::[]=}(1, 1);
#t5.{core::Map::[]=}{Invariant}(1, 1);
{
core::Iterator<core::MapEntry<core::int*, core::int*>>* :sync-for-iterator = <core::int*, core::int*>{2: 2}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int*, core::int*>* #t6 = :sync-for-iterator.{core::Iterator::current};
#t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
#t5.{core::Map::[]=}{Invariant}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
}
}
final core::Map<core::int*, core::int*>* #t7 = <core::int*, core::int*>{3: 3};
@ -46,18 +46,18 @@ static method main() → dynamic {
core::Iterator<core::MapEntry<core::int*, core::int*>>* :sync-for-iterator = #t7.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int*, core::int*>* #t8 = :sync-for-iterator.{core::Iterator::current};
#t5.{core::Map::[]=}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
#t5.{core::Map::[]=}{Invariant}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
}
}
} =>#t5;
final core::Set<core::int*>* aSet = block {
final core::Set<core::int*>* #t9 = new col::_CompactLinkedHashSet::•<core::int*>();
#t9.{core::Set::add}(1);
#t9.{core::Set::add}{Invariant}(1);
{
core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[2].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t10 = :sync-for-iterator.{core::Iterator::current};
#t9.{core::Set::add}(#t10);
#t9.{core::Set::add}{Invariant}(#t10);
}
}
final core::Iterable<core::int*>* #t11 = <core::int*>[3];
@ -65,7 +65,7 @@ static method main() → dynamic {
core::Iterator<core::int*>* :sync-for-iterator = #t11.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t12 = :sync-for-iterator.{core::Iterator::current};
#t9.{core::Set::add}(#t12);
#t9.{core::Set::add}{Invariant}(#t12);
}
}
} =>#t9;

View file

@ -112,68 +112,68 @@ static method foo(dynamic dynVar) → dynamic {
core::List<dynamic>* lhs10 = block {
final core::List<dynamic>* #t1 = <dynamic>[];
for (final dynamic #t2 in <dynamic>[])
#t1.{core::List::add}(#t2);
#t1.{core::List::add}{Invariant}(#t2);
} =>#t1;
core::Set<dynamic>* set10 = block {
final core::Set<dynamic>* #t3 = col::LinkedHashSet::•<dynamic>();
for (final dynamic #t4 in <dynamic>[])
#t3.{core::Set::add}(#t4);
#t3.{core::Set::add}{Invariant}(#t4);
} =>#t3;
core::Map<dynamic, dynamic>* map10 = block {
final core::Map<dynamic, dynamic>* #t5 = <dynamic, dynamic>{};
for (final core::MapEntry<dynamic, dynamic>* #t6 in <dynamic, dynamic>{}.{core::Map::entries})
#t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
#t5.{core::Map::[]=}{Invariant}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
} =>#t5;
core::Map<dynamic, dynamic>* map10ambiguous = block {
final core::Map<dynamic, dynamic>* #t7 = <dynamic, dynamic>{};
for (final core::MapEntry<dynamic, dynamic>* #t8 in <dynamic, dynamic>{}.{core::Map::entries})
#t7.{core::Map::[]=}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
#t7.{core::Map::[]=}{Invariant}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
} =>#t7;
core::List<core::int*>* lhs20 = block {
final core::List<core::int*>* #t9 = <core::int*>[];
for (final core::int* #t10 in spread)
#t9.{core::List::add}(#t10);
#t9.{core::List::add}{Invariant}(#t10);
} =>#t9;
core::Set<core::int*>* set20 = block {
final core::Set<core::int*>* #t11 = col::LinkedHashSet::•<core::int*>();
for (final core::int* #t12 in spread)
#t11.{core::Set::add}(#t12);
#t11.{core::Set::add}(42);
#t11.{core::Set::add}{Invariant}(#t12);
#t11.{core::Set::add}{Invariant}(42);
} =>#t11;
core::Set<core::int*>* set20ambiguous = block {
final core::Set<core::int*>* #t13 = col::LinkedHashSet::•<core::int*>();
for (final dynamic #t14 in spread) {
final core::int* #t15 = #t14 as{TypeError} core::int*;
#t13.{core::Set::add}(#t15);
#t13.{core::Set::add}{Invariant}(#t15);
}
} =>#t13;
core::Map<core::String*, core::int*>* map20 = block {
final core::Map<core::String*, core::int*>* #t16 = <core::String*, core::int*>{};
for (final core::MapEntry<core::String*, core::int*>* #t17 in mapSpread.{core::Map::entries})
#t16.{core::Map::[]=}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
#t16.{core::Map::[]=}("baz", 42);
#t16.{core::Map::[]=}{Invariant}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
#t16.{core::Map::[]=}{Invariant}("baz", 42);
} =>#t16;
core::Map<core::String*, core::int*>* map20ambiguous = block {
final core::Map<core::String*, core::int*>* #t18 = <core::String*, core::int*>{};
for (final core::MapEntry<core::String*, core::int*>* #t19 in mapSpread.{core::Map::entries})
#t18.{core::Map::[]=}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
#t18.{core::Map::[]=}{Invariant}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
} =>#t18;
core::List<dynamic>* lhs21 = block {
final core::List<dynamic>* #t20 = <dynamic>[];
for (final dynamic #t21 in (spread as dynamic) as{TypeError,ForDynamic} core::Iterable<dynamic>*)
#t20.{core::List::add}(#t21);
#t20.{core::List::add}{Invariant}(#t21);
} =>#t20;
core::Set<dynamic>* set21 = block {
final core::Set<dynamic>* #t22 = col::LinkedHashSet::•<dynamic>();
for (final dynamic #t23 in (spread as dynamic) as{TypeError,ForDynamic} core::Iterable<dynamic>*)
#t22.{core::Set::add}(#t23);
#t22.{core::Set::add}(42);
#t22.{core::Set::add}{Invariant}(#t23);
#t22.{core::Set::add}{Invariant}(42);
} =>#t22;
core::Map<dynamic, dynamic>* map21 = block {
final core::Map<dynamic, dynamic>* #t24 = <dynamic, dynamic>{};
for (final core::MapEntry<dynamic, dynamic>* #t25 in ((mapSpread as dynamic) as{TypeError,ForDynamic} core::Map<dynamic, dynamic>*).{core::Map::entries})
#t24.{core::Map::[]=}(#t25.{core::MapEntry::key}, #t25.{core::MapEntry::value});
#t24.{core::Map::[]=}("baz", 42);
#t24.{core::Map::[]=}{Invariant}(#t25.{core::MapEntry::key}, #t25.{core::MapEntry::value});
#t24.{core::Map::[]=}{Invariant}("baz", 42);
} =>#t24;
dynamic map21ambiguous = invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:64:28: Error: Not enough type information to disambiguate between literal set and literal map.
Try providing type arguments for the literal explicitly to disambiguate it.
@ -182,48 +182,48 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::List<core::int*>* lhs22 = block {
final core::List<core::int*>* #t26 = <core::int*>[];
for (final core::int* #t27 in <core::int*>[])
#t26.{core::List::add}(#t27);
#t26.{core::List::add}{Invariant}(#t27);
} =>#t26;
core::Set<core::int*>* set22 = block {
final core::Set<core::int*>* #t28 = col::LinkedHashSet::•<core::int*>();
for (final core::int* #t29 in <core::int*>[])
#t28.{core::Set::add}(#t29);
#t28.{core::Set::add}(42);
#t28.{core::Set::add}{Invariant}(#t29);
#t28.{core::Set::add}{Invariant}(42);
} =>#t28;
core::Set<core::int*>* set22ambiguous = block {
final core::Set<core::int*>* #t30 = col::LinkedHashSet::•<core::int*>();
for (final dynamic #t31 in <core::int*>[]) {
final core::int* #t32 = #t31 as{TypeError} core::int*;
#t30.{core::Set::add}(#t32);
#t30.{core::Set::add}{Invariant}(#t32);
}
} =>#t30;
core::Map<core::String*, core::int*>* map22 = block {
final core::Map<core::String*, core::int*>* #t33 = <core::String*, core::int*>{};
for (final core::MapEntry<core::String*, core::int*>* #t34 in <core::String*, core::int*>{}.{core::Map::entries})
#t33.{core::Map::[]=}(#t34.{core::MapEntry::key}, #t34.{core::MapEntry::value});
#t33.{core::Map::[]=}{Invariant}(#t34.{core::MapEntry::key}, #t34.{core::MapEntry::value});
} =>#t33;
core::List<core::List<core::int*>*>* lhs23 = block {
final core::List<core::List<core::int*>*>* #t35 = <core::List<core::int*>*>[];
for (final core::List<core::int*>* #t36 in <core::List<core::int*>*>[<core::int*>[]])
#t35.{core::List::add}(#t36);
#t35.{core::List::add}{Invariant}(#t36);
} =>#t35;
core::Set<core::List<core::int*>*>* set23 = block {
final core::Set<core::List<core::int*>*>* #t37 = col::LinkedHashSet::•<core::List<core::int*>*>();
for (final core::List<core::int*>* #t38 in <core::List<core::int*>*>[<core::int*>[]])
#t37.{core::Set::add}(#t38);
#t37.{core::Set::add}(<core::int*>[42]);
#t37.{core::Set::add}{Invariant}(#t38);
#t37.{core::Set::add}{Invariant}(<core::int*>[42]);
} =>#t37;
core::Set<core::List<core::int*>*>* set23ambiguous = block {
final core::Set<core::List<core::int*>*>* #t39 = col::LinkedHashSet::•<core::List<core::int*>*>();
for (final dynamic #t40 in <core::List<core::int*>*>[<core::int*>[]]) {
final core::List<core::int*>* #t41 = #t40 as{TypeError} core::List<core::int*>*;
#t39.{core::Set::add}(#t41);
#t39.{core::Set::add}{Invariant}(#t41);
}
} =>#t39;
core::Map<core::String*, core::List<core::int*>*>* map23 = block {
final core::Map<core::String*, core::List<core::int*>*>* #t42 = <core::String*, core::List<core::int*>*>{};
for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t43 in <core::String*, core::List<core::int*>*>{"baz": <core::int*>[]}.{core::Map::entries})
#t42.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
#t42.{core::Map::[]=}{Invariant}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
} =>#t42;
dynamic map24ambiguous = invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:96:28: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
dynamic map24ambiguous = {...spread, ...mapSpread};
@ -234,7 +234,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^" in ( block {
final core::List<core::int*>* #t45 = <core::int*>[];
for (final core::int* #t46 in spread)
#t45.{core::List::add}(#t46);
#t45.{core::List::add}{Invariant}(#t46);
} =>#t45) as{TypeError} core::int*;
core::int* set30 = let final<BottomType> #t47 = invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:100:36: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
- 'Set' is from 'dart:core'.
@ -242,8 +242,8 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^" in ( block {
final core::Set<core::int*>* #t48 = col::LinkedHashSet::•<core::int*>();
for (final core::int* #t49 in spread)
#t48.{core::Set::add}(#t49);
#t48.{core::Set::add}(42);
#t48.{core::Set::add}{Invariant}(#t49);
#t48.{core::Set::add}{Invariant}(42);
} =>#t48) as{TypeError} core::int*;
core::int* set30ambiguous = let final<BottomType> #t50 = invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:103:7: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
- 'Set' is from 'dart:core'.
@ -252,7 +252,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final core::Set<core::int*>* #t51 = col::LinkedHashSet::•<core::int*>();
for (final dynamic #t52 in spread) {
final core::int* #t53 = #t52 as{TypeError} core::int*;
#t51.{core::Set::add}(#t53);
#t51.{core::Set::add}{Invariant}(#t53);
}
} =>#t51) as{TypeError} core::int*;
core::int* map30 = let final<BottomType> #t54 = invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:106:7: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
@ -261,8 +261,8 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^" in ( block {
final core::Map<core::String*, core::int*>* #t55 = <core::String*, core::int*>{};
for (final core::MapEntry<core::String*, core::int*>* #t56 in mapSpread.{core::Map::entries})
#t55.{core::Map::[]=}(#t56.{core::MapEntry::key}, #t56.{core::MapEntry::value});
#t55.{core::Map::[]=}("baz", 42);
#t55.{core::Map::[]=}{Invariant}(#t56.{core::MapEntry::key}, #t56.{core::MapEntry::value});
#t55.{core::Map::[]=}{Invariant}("baz", 42);
} =>#t55) as{TypeError} core::int*;
core::int* map30ambiguous = let final<BottomType> #t57 = invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:109:7: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
- 'Map' is from 'dart:core'.
@ -270,14 +270,14 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^" in ( block {
final core::Map<core::String*, core::int*>* #t58 = <core::String*, core::int*>{};
for (final core::MapEntry<core::String*, core::int*>* #t59 in mapSpread.{core::Map::entries})
#t58.{core::Map::[]=}(#t59.{core::MapEntry::key}, #t59.{core::MapEntry::value});
#t58.{core::Map::[]=}{Invariant}(#t59.{core::MapEntry::key}, #t59.{core::MapEntry::value});
} =>#t58) as{TypeError} core::int*;
core::List<dynamic>* lhs40 = <dynamic>[invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:111:38: Error: Unexpected type 'int' of a spread. Expected 'dynamic' or an Iterable.
List<dynamic> lhs40 = <dynamic>[...notSpreadInt];
^"];
core::Set<dynamic>* set40 = block {
final core::Set<dynamic>* #t60 = col::LinkedHashSet::•<dynamic>();
#t60.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:113:37: Error: Unexpected type 'int' of a spread. Expected 'dynamic' or an Iterable.
#t60.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:113:37: Error: Unexpected type 'int' of a spread. Expected 'dynamic' or an Iterable.
Set<dynamic> set40 = <dynamic>{...notSpreadInt};
^");
} =>#t60;
@ -289,7 +289,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^"];
core::Set<dynamic>* set50 = block {
final core::Set<dynamic>* #t61 = col::LinkedHashSet::•<dynamic>();
#t61.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:119:37: Error: Unexpected type 'int Function()' of a spread. Expected 'dynamic' or an Iterable.
#t61.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:119:37: Error: Unexpected type 'int Function()' of a spread. Expected 'dynamic' or an Iterable.
Set<dynamic> set50 = <dynamic>{...notSpreadFunction};
^");
} =>#t61;
@ -301,7 +301,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^"];
core::Set<core::String*>* set60 = block {
final core::Set<core::String*>* #t62 = col::LinkedHashSet::•<core::String*>();
#t62.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:125:35: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
#t62.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:125:35: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
Set<String> set60 = <String>{...spread};
^");
} =>#t62;
@ -316,18 +316,18 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^"];
core::Set<core::int*>* set70 = block {
final core::Set<core::int*>* #t63 = col::LinkedHashSet::•<core::int*>();
#t63.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:133:29: Error: Can't spread a value with static type 'Null'.
#t63.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:133:29: Error: Can't spread a value with static type 'Null'.
Set<int> set70 = <int>{...null};
^");
} =>#t63;
core::Set<dynamic>* set71ambiguous = block {
final core::Set<dynamic>* #t64 = col::LinkedHashSet::•<dynamic>();
#t64.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:137:8: Error: Expected ',' before this.
#t64.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:137:8: Error: Expected ',' before this.
...null,
^");
for (final dynamic #t65 in <dynamic>[]) {
final dynamic #t66 = #t65 as{TypeError} dynamic;
#t64.{core::Set::add}(#t66);
#t64.{core::Set::add}{Invariant}(#t66);
}
} =>#t64;
core::Map<core::String*, core::int*>* map70 = <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:142:45: Error: Can't spread a value with static type 'Null'.
@ -338,14 +338,14 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final core::Iterable<core::int*>* #t68 = null;
if(!#t68.{core::Object::==}(null))
for (final core::int* #t69 in #t68)
#t67.{core::List::add}(#t69);
#t67.{core::List::add}{Invariant}(#t69);
} =>#t67;
core::Set<core::int*>* set80 = block {
final core::Set<core::int*>* #t70 = col::LinkedHashSet::•<core::int*>();
final core::Iterable<core::int*>* #t71 = null;
if(!#t71.{core::Object::==}(null))
for (final core::int* #t72 in #t71)
#t70.{core::Set::add}(#t72);
#t70.{core::Set::add}{Invariant}(#t72);
} =>#t70;
core::Set<dynamic>* set81ambiguous = block {
final core::Set<dynamic>* #t73 = col::LinkedHashSet::•<dynamic>();
@ -353,11 +353,11 @@ Try providing type arguments for the literal explicitly to disambiguate it.
if(!#t74.{core::Object::==}(null))
for (final dynamic #t75 in #t74) {
final dynamic #t76 = #t75 as{TypeError} dynamic;
#t73.{core::Set::add}(#t76);
#t73.{core::Set::add}{Invariant}(#t76);
}
for (final dynamic #t77 in <dynamic>[]) {
final dynamic #t78 = #t77 as{TypeError} dynamic;
#t73.{core::Set::add}(#t78);
#t73.{core::Set::add}{Invariant}(#t78);
}
} =>#t73;
core::Map<core::String*, core::int*>* map80 = block {
@ -365,18 +365,18 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final core::Map<core::String*, core::int*>* #t80 = null;
if(!#t80.{core::Object::==}(null))
for (final core::MapEntry<core::String*, core::int*>* #t81 in #t80.{core::Map::entries})
#t79.{core::Map::[]=}(#t81.{core::MapEntry::key}, #t81.{core::MapEntry::value});
#t79.{core::Map::[]=}{Invariant}(#t81.{core::MapEntry::key}, #t81.{core::MapEntry::value});
} =>#t79;
core::Map<core::String*, core::int*>* map90 = block {
final core::Map<core::String*, core::int*>* #t82 = <core::String*, core::int*>{};
for (final core::MapEntry<core::String*, core::int*>* #t83 in self::bar<core::String*, core::int*>().{core::Map::entries})
#t82.{core::Map::[]=}(#t83.{core::MapEntry::key}, #t83.{core::MapEntry::value});
#t82.{core::Map::[]=}{Invariant}(#t83.{core::MapEntry::key}, #t83.{core::MapEntry::value});
} =>#t82;
core::List<core::int*>* list100 = block {
final core::List<core::int*>* #t84 = <core::int*>[];
for (final dynamic #t85 in listNum) {
final core::int* #t86 = #t85 as{TypeError} core::int*;
#t84.{core::List::add}(#t86);
#t84.{core::List::add}{Invariant}(#t86);
}
} =>#t84;
core::Map<core::num*, core::int*>* map100 = block {
@ -384,14 +384,14 @@ Try providing type arguments for the literal explicitly to disambiguate it.
for (final core::MapEntry<dynamic, dynamic>* #t88 in mapIntNum.{core::Map::entries}) {
final core::num* #t89 = #t88.{core::MapEntry::key} as{TypeError} core::num*;
final core::int* #t90 = #t88.{core::MapEntry::value} as{TypeError} core::int*;
#t87.{core::Map::[]=}(#t89, #t90);
#t87.{core::Map::[]=}{Invariant}(#t89, #t90);
}
} =>#t87;
core::List<core::int*>* list110 = block {
final core::List<core::int*>* #t91 = <core::int*>[];
for (final dynamic #t92 in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*) {
final core::int* #t93 = #t92 as{TypeError} core::int*;
#t91.{core::List::add}(#t93);
#t91.{core::List::add}{Invariant}(#t93);
}
} =>#t91;
core::Map<core::num*, core::int*>* map110 = block {
@ -399,7 +399,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
for (final core::MapEntry<dynamic, dynamic>* #t95 in (dynVar as{TypeError,ForDynamic} core::Map<dynamic, dynamic>*).{core::Map::entries}) {
final core::num* #t96 = #t95.{core::MapEntry::key} as{TypeError} core::num*;
final core::int* #t97 = #t95.{core::MapEntry::value} as{TypeError} core::int*;
#t94.{core::Map::[]=}(#t96, #t97);
#t94.{core::Map::[]=}{Invariant}(#t96, #t97);
}
} =>#t94;
}

View file

@ -115,7 +115,7 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<dynamic>* :sync-for-iterator = <dynamic>[].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t2 = :sync-for-iterator.{core::Iterator::current};
#t1.{core::List::add}(#t2);
#t1.{core::List::add}{Invariant}(#t2);
}
}
} =>#t1;
@ -125,7 +125,7 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<dynamic>* :sync-for-iterator = <dynamic>[].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t4 = :sync-for-iterator.{core::Iterator::current};
#t3.{core::Set::add}(#t4);
#t3.{core::Set::add}{Invariant}(#t4);
}
}
} =>#t3;
@ -135,7 +135,7 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<core::MapEntry<dynamic, dynamic>>* :sync-for-iterator = <dynamic, dynamic>{}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic>* #t6 = :sync-for-iterator.{core::Iterator::current};
#t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
#t5.{core::Map::[]=}{Invariant}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
}
}
} =>#t5;
@ -145,7 +145,7 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<core::MapEntry<dynamic, dynamic>>* :sync-for-iterator = <dynamic, dynamic>{}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic>* #t8 = :sync-for-iterator.{core::Iterator::current};
#t7.{core::Map::[]=}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
#t7.{core::Map::[]=}{Invariant}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
}
}
} =>#t7;
@ -155,7 +155,7 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<core::int*>* :sync-for-iterator = spread.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t10 = :sync-for-iterator.{core::Iterator::current};
#t9.{core::List::add}(#t10);
#t9.{core::List::add}{Invariant}(#t10);
}
}
} =>#t9;
@ -165,10 +165,10 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<core::int*>* :sync-for-iterator = spread.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t12 = :sync-for-iterator.{core::Iterator::current};
#t11.{core::Set::add}(#t12);
#t11.{core::Set::add}{Invariant}(#t12);
}
}
#t11.{core::Set::add}(42);
#t11.{core::Set::add}{Invariant}(42);
} =>#t11;
core::Set<core::int*>* set20ambiguous = block {
final core::Set<core::int*>* #t13 = new col::_CompactLinkedHashSet::•<core::int*>();
@ -178,7 +178,7 @@ static method foo(dynamic dynVar) → dynamic {
final dynamic #t14 = :sync-for-iterator.{core::Iterator::current};
{
final core::int* #t15 = #t14 as{TypeError} core::int*;
#t13.{core::Set::add}(#t15);
#t13.{core::Set::add}{Invariant}(#t15);
}
}
}
@ -189,10 +189,10 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = mapSpread.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String*, core::int*>* #t17 = :sync-for-iterator.{core::Iterator::current};
#t16.{core::Map::[]=}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
#t16.{core::Map::[]=}{Invariant}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
}
}
#t16.{core::Map::[]=}("baz", 42);
#t16.{core::Map::[]=}{Invariant}("baz", 42);
} =>#t16;
core::Map<core::String*, core::int*>* map20ambiguous = block {
final core::Map<core::String*, core::int*>* #t18 = <core::String*, core::int*>{};
@ -200,7 +200,7 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = mapSpread.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String*, core::int*>* #t19 = :sync-for-iterator.{core::Iterator::current};
#t18.{core::Map::[]=}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
#t18.{core::Map::[]=}{Invariant}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
}
}
} =>#t18;
@ -210,7 +210,7 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<dynamic>* :sync-for-iterator = ((spread as dynamic) as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t21 = :sync-for-iterator.{core::Iterator::current};
#t20.{core::List::add}(#t21);
#t20.{core::List::add}{Invariant}(#t21);
}
}
} =>#t20;
@ -220,10 +220,10 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<dynamic>* :sync-for-iterator = ((spread as dynamic) as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t23 = :sync-for-iterator.{core::Iterator::current};
#t22.{core::Set::add}(#t23);
#t22.{core::Set::add}{Invariant}(#t23);
}
}
#t22.{core::Set::add}(42);
#t22.{core::Set::add}{Invariant}(42);
} =>#t22;
core::Map<dynamic, dynamic>* map21 = block {
final core::Map<dynamic, dynamic>* #t24 = <dynamic, dynamic>{};
@ -231,10 +231,10 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<core::MapEntry<dynamic, dynamic>>* :sync-for-iterator = ((mapSpread as dynamic) as{TypeError,ForDynamic} core::Map<dynamic, dynamic>*).{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic>* #t25 = :sync-for-iterator.{core::Iterator::current};
#t24.{core::Map::[]=}(#t25.{core::MapEntry::key}, #t25.{core::MapEntry::value});
#t24.{core::Map::[]=}{Invariant}(#t25.{core::MapEntry::key}, #t25.{core::MapEntry::value});
}
}
#t24.{core::Map::[]=}("baz", 42);
#t24.{core::Map::[]=}{Invariant}("baz", 42);
} =>#t24;
dynamic map21ambiguous = invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:64:28: Error: Not enough type information to disambiguate between literal set and literal map.
Try providing type arguments for the literal explicitly to disambiguate it.
@ -246,7 +246,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t27 = :sync-for-iterator.{core::Iterator::current};
#t26.{core::List::add}(#t27);
#t26.{core::List::add}{Invariant}(#t27);
}
}
} =>#t26;
@ -256,10 +256,10 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t29 = :sync-for-iterator.{core::Iterator::current};
#t28.{core::Set::add}(#t29);
#t28.{core::Set::add}{Invariant}(#t29);
}
}
#t28.{core::Set::add}(42);
#t28.{core::Set::add}{Invariant}(42);
} =>#t28;
core::Set<core::int*>* set22ambiguous = block {
final core::Set<core::int*>* #t30 = new col::_CompactLinkedHashSet::•<core::int*>();
@ -269,7 +269,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final dynamic #t31 = :sync-for-iterator.{core::Iterator::current};
{
final core::int* #t32 = #t31 as{TypeError} core::int*;
#t30.{core::Set::add}(#t32);
#t30.{core::Set::add}{Invariant}(#t32);
}
}
}
@ -280,7 +280,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = <core::String*, core::int*>{}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String*, core::int*>* #t34 = :sync-for-iterator.{core::Iterator::current};
#t33.{core::Map::[]=}(#t34.{core::MapEntry::key}, #t34.{core::MapEntry::value});
#t33.{core::Map::[]=}{Invariant}(#t34.{core::MapEntry::key}, #t34.{core::MapEntry::value});
}
}
} =>#t33;
@ -290,7 +290,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::List<core::int*>* #t36 = :sync-for-iterator.{core::Iterator::current};
#t35.{core::List::add}(#t36);
#t35.{core::List::add}{Invariant}(#t36);
}
}
} =>#t35;
@ -300,10 +300,10 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::List<core::int*>* #t38 = :sync-for-iterator.{core::Iterator::current};
#t37.{core::Set::add}(#t38);
#t37.{core::Set::add}{Invariant}(#t38);
}
}
#t37.{core::Set::add}(<core::int*>[42]);
#t37.{core::Set::add}{Invariant}(<core::int*>[42]);
} =>#t37;
core::Set<core::List<core::int*>*>* set23ambiguous = block {
final core::Set<core::List<core::int*>*>* #t39 = new col::_CompactLinkedHashSet::•<core::List<core::int*>*>();
@ -313,7 +313,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final dynamic #t40 = :sync-for-iterator.{core::Iterator::current};
{
final core::List<core::int*>* #t41 = #t40 as{TypeError} core::List<core::int*>*;
#t39.{core::Set::add}(#t41);
#t39.{core::Set::add}{Invariant}(#t41);
}
}
}
@ -324,7 +324,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::MapEntry<core::String*, core::List<core::int*>*>>* :sync-for-iterator = <core::String*, core::List<core::int*>*>{"baz": <core::int*>[]}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String*, core::List<core::int*>*>* #t43 = :sync-for-iterator.{core::Iterator::current};
#t42.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
#t42.{core::Map::[]=}{Invariant}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
}
}
} =>#t42;
@ -340,7 +340,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::int*>* :sync-for-iterator = spread.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t46 = :sync-for-iterator.{core::Iterator::current};
#t45.{core::List::add}(#t46);
#t45.{core::List::add}{Invariant}(#t46);
}
}
} =>#t45) as{TypeError} core::int*;
@ -353,10 +353,10 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::int*>* :sync-for-iterator = spread.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t49 = :sync-for-iterator.{core::Iterator::current};
#t48.{core::Set::add}(#t49);
#t48.{core::Set::add}{Invariant}(#t49);
}
}
#t48.{core::Set::add}(42);
#t48.{core::Set::add}{Invariant}(42);
} =>#t48) as{TypeError} core::int*;
core::int* set30ambiguous = let final<BottomType> #t50 = invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:103:7: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
- 'Set' is from 'dart:core'.
@ -369,7 +369,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final dynamic #t52 = :sync-for-iterator.{core::Iterator::current};
{
final core::int* #t53 = #t52 as{TypeError} core::int*;
#t51.{core::Set::add}(#t53);
#t51.{core::Set::add}{Invariant}(#t53);
}
}
}
@ -383,10 +383,10 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = mapSpread.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String*, core::int*>* #t56 = :sync-for-iterator.{core::Iterator::current};
#t55.{core::Map::[]=}(#t56.{core::MapEntry::key}, #t56.{core::MapEntry::value});
#t55.{core::Map::[]=}{Invariant}(#t56.{core::MapEntry::key}, #t56.{core::MapEntry::value});
}
}
#t55.{core::Map::[]=}("baz", 42);
#t55.{core::Map::[]=}{Invariant}("baz", 42);
} =>#t55) as{TypeError} core::int*;
core::int* map30ambiguous = let final<BottomType> #t57 = invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:109:7: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
- 'Map' is from 'dart:core'.
@ -397,7 +397,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = mapSpread.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String*, core::int*>* #t59 = :sync-for-iterator.{core::Iterator::current};
#t58.{core::Map::[]=}(#t59.{core::MapEntry::key}, #t59.{core::MapEntry::value});
#t58.{core::Map::[]=}{Invariant}(#t59.{core::MapEntry::key}, #t59.{core::MapEntry::value});
}
}
} =>#t58) as{TypeError} core::int*;
@ -406,7 +406,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^"];
core::Set<dynamic>* set40 = block {
final core::Set<dynamic>* #t60 = new col::_CompactLinkedHashSet::•<dynamic>();
#t60.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:113:37: Error: Unexpected type 'int' of a spread. Expected 'dynamic' or an Iterable.
#t60.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:113:37: Error: Unexpected type 'int' of a spread. Expected 'dynamic' or an Iterable.
Set<dynamic> set40 = <dynamic>{...notSpreadInt};
^");
} =>#t60;
@ -418,7 +418,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^"];
core::Set<dynamic>* set50 = block {
final core::Set<dynamic>* #t61 = new col::_CompactLinkedHashSet::•<dynamic>();
#t61.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:119:37: Error: Unexpected type 'int Function()' of a spread. Expected 'dynamic' or an Iterable.
#t61.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:119:37: Error: Unexpected type 'int Function()' of a spread. Expected 'dynamic' or an Iterable.
Set<dynamic> set50 = <dynamic>{...notSpreadFunction};
^");
} =>#t61;
@ -430,7 +430,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^"];
core::Set<core::String*>* set60 = block {
final core::Set<core::String*>* #t62 = new col::_CompactLinkedHashSet::•<core::String*>();
#t62.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:125:35: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
#t62.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:125:35: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
Set<String> set60 = <String>{...spread};
^");
} =>#t62;
@ -445,13 +445,13 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^"];
core::Set<core::int*>* set70 = block {
final core::Set<core::int*>* #t63 = new col::_CompactLinkedHashSet::•<core::int*>();
#t63.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:133:29: Error: Can't spread a value with static type 'Null'.
#t63.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:133:29: Error: Can't spread a value with static type 'Null'.
Set<int> set70 = <int>{...null};
^");
} =>#t63;
core::Set<dynamic>* set71ambiguous = block {
final core::Set<dynamic>* #t64 = new col::_CompactLinkedHashSet::•<dynamic>();
#t64.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:137:8: Error: Expected ',' before this.
#t64.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:137:8: Error: Expected ',' before this.
...null,
^");
{
@ -460,7 +460,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final dynamic #t65 = :sync-for-iterator.{core::Iterator::current};
{
final dynamic #t66 = #t65 as{TypeError} dynamic;
#t64.{core::Set::add}(#t66);
#t64.{core::Set::add}{Invariant}(#t66);
}
}
}
@ -475,7 +475,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::int*>* :sync-for-iterator = #t68.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t69 = :sync-for-iterator.{core::Iterator::current};
#t67.{core::List::add}(#t69);
#t67.{core::List::add}{Invariant}(#t69);
}
}
} =>#t67;
@ -486,7 +486,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::int*>* :sync-for-iterator = #t71.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t72 = :sync-for-iterator.{core::Iterator::current};
#t70.{core::Set::add}(#t72);
#t70.{core::Set::add}{Invariant}(#t72);
}
}
} =>#t70;
@ -499,7 +499,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final dynamic #t75 = :sync-for-iterator.{core::Iterator::current};
{
final dynamic #t76 = #t75 as{TypeError} dynamic;
#t73.{core::Set::add}(#t76);
#t73.{core::Set::add}{Invariant}(#t76);
}
}
}
@ -509,7 +509,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final dynamic #t77 = :sync-for-iterator.{core::Iterator::current};
{
final dynamic #t78 = #t77 as{TypeError} dynamic;
#t73.{core::Set::add}(#t78);
#t73.{core::Set::add}{Invariant}(#t78);
}
}
}
@ -521,7 +521,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = #t80.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String*, core::int*>* #t81 = :sync-for-iterator.{core::Iterator::current};
#t79.{core::Map::[]=}(#t81.{core::MapEntry::key}, #t81.{core::MapEntry::value});
#t79.{core::Map::[]=}{Invariant}(#t81.{core::MapEntry::key}, #t81.{core::MapEntry::value});
}
}
} =>#t79;
@ -531,7 +531,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = self::bar<core::String*, core::int*>().{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String*, core::int*>* #t83 = :sync-for-iterator.{core::Iterator::current};
#t82.{core::Map::[]=}(#t83.{core::MapEntry::key}, #t83.{core::MapEntry::value});
#t82.{core::Map::[]=}{Invariant}(#t83.{core::MapEntry::key}, #t83.{core::MapEntry::value});
}
}
} =>#t82;
@ -543,7 +543,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final dynamic #t85 = :sync-for-iterator.{core::Iterator::current};
{
final core::int* #t86 = #t85 as{TypeError} core::int*;
#t84.{core::List::add}(#t86);
#t84.{core::List::add}{Invariant}(#t86);
}
}
}
@ -557,7 +557,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
{
final core::num* #t89 = #t88.{core::MapEntry::key} as{TypeError} core::num*;
final core::int* #t90 = #t88.{core::MapEntry::value} as{TypeError} core::int*;
#t87.{core::Map::[]=}(#t89, #t90);
#t87.{core::Map::[]=}{Invariant}(#t89, #t90);
}
}
}
@ -570,7 +570,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final dynamic #t92 = :sync-for-iterator.{core::Iterator::current};
{
final core::int* #t93 = #t92 as{TypeError} core::int*;
#t91.{core::List::add}(#t93);
#t91.{core::List::add}{Invariant}(#t93);
}
}
}
@ -584,7 +584,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
{
final core::num* #t96 = #t95.{core::MapEntry::key} as{TypeError} core::num*;
final core::int* #t97 = #t95.{core::MapEntry::value} as{TypeError} core::int*;
#t94.{core::Map::[]=}(#t96, #t97);
#t94.{core::Map::[]=}{Invariant}(#t96, #t97);
}
}
}

View file

@ -6,63 +6,63 @@ import "dart:collection" as col;
static method main() → dynamic {
final core::List<core::int*>* aList = block {
final core::List<core::int*>* #t1 = <core::int*>[];
#t1.{core::List::add}(1);
#t1.{core::List::add}{Invariant}(1);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t1.{core::List::add}(2);
#t1.{core::List::add}{Invariant}(2);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t1.{core::List::add}(3);
#t1.{core::List::add}{Invariant}(3);
else
#t1.{core::List::add}(1.{core::int::unary-}());
#t1.{core::List::add}{Invariant}(1.{core::int::unary-}());
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t1.{core::List::add}(4);
#t1.{core::List::add}{Invariant}(4);
for (core::int* i in <core::int*>[5, 6, 7])
#t1.{core::List::add}(i);
#t1.{core::List::add}{Invariant}(i);
for (core::int* i in <core::int*>[8, 9, 10])
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t1.{core::List::add}(i);
#t1.{core::List::add}{Invariant}(i);
for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
#t1.{core::List::add}(i);
#t1.{core::List::add}{Invariant}(i);
} =>#t1;
final core::Set<core::int*>* aSet = block {
final core::Set<core::int*>* #t2 = col::LinkedHashSet::•<core::int*>();
#t2.{core::Set::add}(1);
#t2.{core::Set::add}{Invariant}(1);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t2.{core::Set::add}(2);
#t2.{core::Set::add}{Invariant}(2);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t2.{core::Set::add}(3);
#t2.{core::Set::add}{Invariant}(3);
else
#t2.{core::Set::add}(1.{core::int::unary-}());
#t2.{core::Set::add}{Invariant}(1.{core::int::unary-}());
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t2.{core::Set::add}(4);
#t2.{core::Set::add}{Invariant}(4);
for (core::int* i in <core::int*>[5, 6, 7])
#t2.{core::Set::add}(i);
#t2.{core::Set::add}{Invariant}(i);
for (core::int* i in <core::int*>[8, 9, 10])
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t2.{core::Set::add}(i);
#t2.{core::Set::add}{Invariant}(i);
for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
#t2.{core::Set::add}(i);
#t2.{core::Set::add}{Invariant}(i);
} =>#t2;
final core::Map<core::int*, core::int*>* aMap = block {
final core::Map<core::int*, core::int*>* #t3 = <core::int*, core::int*>{};
#t3.{core::Map::[]=}(1, 1);
#t3.{core::Map::[]=}{Invariant}(1, 1);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t3.{core::Map::[]=}(2, 2);
#t3.{core::Map::[]=}{Invariant}(2, 2);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t3.{core::Map::[]=}(3, 3);
#t3.{core::Map::[]=}{Invariant}(3, 3);
else
#t3.{core::Map::[]=}(1.{core::int::unary-}(), 1.{core::int::unary-}());
#t3.{core::Map::[]=}{Invariant}(1.{core::int::unary-}(), 1.{core::int::unary-}());
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t3.{core::Map::[]=}(4, 4);
#t3.{core::Map::[]=}{Invariant}(4, 4);
for (core::int* i in <core::int*>[5, 6, 7])
#t3.{core::Map::[]=}(i, i);
#t3.{core::Map::[]=}{Invariant}(i, i);
for (core::int* i in <core::int*>[8, 9, 10])
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t3.{core::Map::[]=}(i, i);
#t3.{core::Map::[]=}{Invariant}(i, i);
for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
#t3.{core::Map::[]=}(i, i);
#t3.{core::Map::[]=}{Invariant}(i, i);
} =>#t3;
core::print(aList);
core::print(aSet);

View file

@ -6,21 +6,21 @@ import "dart:collection" as col;
static method main() → dynamic {
final core::List<core::int*>* aList = block {
final core::List<core::int*>* #t1 = <core::int*>[];
#t1.{core::List::add}(1);
#t1.{core::List::add}{Invariant}(1);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t1.{core::List::add}(2);
#t1.{core::List::add}{Invariant}(2);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t1.{core::List::add}(3);
#t1.{core::List::add}{Invariant}(3);
else
#t1.{core::List::add}(1.{core::int::unary-}());
#t1.{core::List::add}{Invariant}(1.{core::int::unary-}());
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t1.{core::List::add}(4);
#t1.{core::List::add}{Invariant}(4);
{
core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[5, 6, 7].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int* i = :sync-for-iterator.{core::Iterator::current};
#t1.{core::List::add}(i);
#t1.{core::List::add}{Invariant}(i);
}
}
{
@ -28,29 +28,29 @@ static method main() → dynamic {
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int* i = :sync-for-iterator.{core::Iterator::current};
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t1.{core::List::add}(i);
#t1.{core::List::add}{Invariant}(i);
}
}
for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
#t1.{core::List::add}(i);
#t1.{core::List::add}{Invariant}(i);
} =>#t1;
final core::Set<core::int*>* aSet = block {
final core::Set<core::int*>* #t2 = new col::_CompactLinkedHashSet::•<core::int*>();
#t2.{core::Set::add}(1);
#t2.{core::Set::add}{Invariant}(1);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t2.{core::Set::add}(2);
#t2.{core::Set::add}{Invariant}(2);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t2.{core::Set::add}(3);
#t2.{core::Set::add}{Invariant}(3);
else
#t2.{core::Set::add}(1.{core::int::unary-}());
#t2.{core::Set::add}{Invariant}(1.{core::int::unary-}());
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t2.{core::Set::add}(4);
#t2.{core::Set::add}{Invariant}(4);
{
core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[5, 6, 7].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int* i = :sync-for-iterator.{core::Iterator::current};
#t2.{core::Set::add}(i);
#t2.{core::Set::add}{Invariant}(i);
}
}
{
@ -58,29 +58,29 @@ static method main() → dynamic {
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int* i = :sync-for-iterator.{core::Iterator::current};
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t2.{core::Set::add}(i);
#t2.{core::Set::add}{Invariant}(i);
}
}
for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
#t2.{core::Set::add}(i);
#t2.{core::Set::add}{Invariant}(i);
} =>#t2;
final core::Map<core::int*, core::int*>* aMap = block {
final core::Map<core::int*, core::int*>* #t3 = <core::int*, core::int*>{};
#t3.{core::Map::[]=}(1, 1);
#t3.{core::Map::[]=}{Invariant}(1, 1);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t3.{core::Map::[]=}(2, 2);
#t3.{core::Map::[]=}{Invariant}(2, 2);
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t3.{core::Map::[]=}(3, 3);
#t3.{core::Map::[]=}{Invariant}(3, 3);
else
#t3.{core::Map::[]=}(1.{core::int::unary-}(), 1.{core::int::unary-}());
#t3.{core::Map::[]=}{Invariant}(1.{core::int::unary-}(), 1.{core::int::unary-}());
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t3.{core::Map::[]=}(4, 4);
#t3.{core::Map::[]=}{Invariant}(4, 4);
{
core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[5, 6, 7].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int* i = :sync-for-iterator.{core::Iterator::current};
#t3.{core::Map::[]=}(i, i);
#t3.{core::Map::[]=}{Invariant}(i, i);
}
}
{
@ -88,11 +88,11 @@ static method main() → dynamic {
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int* i = :sync-for-iterator.{core::Iterator::current};
if(self::oracle() as{TypeError,ForDynamic} core::bool*)
#t3.{core::Map::[]=}(i, i);
#t3.{core::Map::[]=}{Invariant}(i, i);
}
}
for (core::int* i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
#t3.{core::Map::[]=}(i, i);
#t3.{core::Map::[]=}{Invariant}(i, i);
} =>#t3;
core::print(aList);
core::print(aSet);

View file

@ -8,6 +8,6 @@ static method main() → dynamic {
core::Object* b;
return block {
final core::Set<core::Object*>* #t1 = col::LinkedHashSet::•<core::Object*>();
#t1.{core::Set::add}(let final core::Object* #t2 = a in #t2.{core::Object::==}(null) ?{core::Object*} b : #t2);
#t1.{core::Set::add}{Invariant}(let final core::Object* #t2 = a in #t2.{core::Object::==}(null) ?{core::Object*} b : #t2);
} =>#t1;
}

View file

@ -8,6 +8,6 @@ static method main() → dynamic {
core::Object* b;
return block {
final core::Set<core::Object*>* #t1 = new col::_CompactLinkedHashSet::•<core::Object*>();
#t1.{core::Set::add}(let final core::Object* #t2 = a in #t2.{core::Object::==}(null) ?{core::Object*} b : #t2);
#t1.{core::Set::add}{Invariant}(let final core::Object* #t2 = a in #t2.{core::Object::==}(null) ?{core::Object*} b : #t2);
} =>#t1;
}

View file

@ -10,7 +10,7 @@ class C extends core::Object {
final core::Set<core::int*>* #t1 = col::LinkedHashSet::•<core::int*>();
for (core::int* e in ell)
if(e.{core::int::isOdd})
#t1.{core::Set::add}(2.{core::num::*}(e));
#t1.{core::Set::add}{Invariant}(2.{core::num::*}(e));
} =>#t1, super core::Object::•()
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode

View file

@ -13,7 +13,7 @@ class C extends core::Object {
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int* e = :sync-for-iterator.{core::Iterator::current};
if(e.{core::int::isOdd})
#t1.{core::Set::add}(2.{core::num::*}(e));
#t1.{core::Set::add}{Invariant}(2.{core::num::*}(e));
}
}
} =>#t1, super core::Object::•()

View file

@ -6,31 +6,31 @@ import "dart:collection" as col;
static method nullAwareListSpread(core::List<core::String*>* list) → dynamic {
list = block {
final core::List<core::String*>* #t1 = <core::String*>[];
#t1.{core::List::add}("foo");
#t1.{core::List::add}{Invariant}("foo");
final core::Iterable<core::String*>* #t2 = list;
if(!#t2.{core::Object::==}(null))
for (final core::String* #t3 in #t2)
#t1.{core::List::add}(#t3);
#t1.{core::List::add}{Invariant}(#t3);
} =>#t1;
}
static method nullAwareSetSpread(core::Set<core::String*>* set) → dynamic {
set = block {
final core::Set<core::String*>* #t4 = col::LinkedHashSet::•<core::String*>();
#t4.{core::Set::add}("foo");
#t4.{core::Set::add}{Invariant}("foo");
final core::Iterable<core::String*>* #t5 = set;
if(!#t5.{core::Object::==}(null))
for (final core::String* #t6 in #t5)
#t4.{core::Set::add}(#t6);
#t4.{core::Set::add}{Invariant}(#t6);
} =>#t4;
}
static method nullAwareMapSpread(core::Map<core::int*, core::String*>* map) → dynamic {
map = block {
final core::Map<core::int*, core::String*>* #t7 = <core::int*, core::String*>{};
#t7.{core::Map::[]=}(0, "foo");
#t7.{core::Map::[]=}{Invariant}(0, "foo");
final core::Map<core::int*, core::String*>* #t8 = map;
if(!#t8.{core::Object::==}(null))
for (final core::MapEntry<core::int*, core::String*>* #t9 in #t8.{core::Map::entries})
#t7.{core::Map::[]=}(#t9.{core::MapEntry::key}, #t9.{core::MapEntry::value});
#t7.{core::Map::[]=}{Invariant}(#t9.{core::MapEntry::key}, #t9.{core::MapEntry::value});
} =>#t7;
}
static method main() → dynamic {

View file

@ -6,13 +6,13 @@ import "dart:collection" as col;
static method nullAwareListSpread(core::List<core::String*>* list) → dynamic {
list = block {
final core::List<core::String*>* #t1 = <core::String*>[];
#t1.{core::List::add}("foo");
#t1.{core::List::add}{Invariant}("foo");
final core::Iterable<core::String*>* #t2 = list;
if(!#t2.{core::Object::==}(null)) {
core::Iterator<core::String*>* :sync-for-iterator = #t2.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::String* #t3 = :sync-for-iterator.{core::Iterator::current};
#t1.{core::List::add}(#t3);
#t1.{core::List::add}{Invariant}(#t3);
}
}
} =>#t1;
@ -20,13 +20,13 @@ static method nullAwareListSpread(core::List<core::String*>* list) → dynamic {
static method nullAwareSetSpread(core::Set<core::String*>* set) → dynamic {
set = block {
final core::Set<core::String*>* #t4 = new col::_CompactLinkedHashSet::•<core::String*>();
#t4.{core::Set::add}("foo");
#t4.{core::Set::add}{Invariant}("foo");
final core::Iterable<core::String*>* #t5 = set;
if(!#t5.{core::Object::==}(null)) {
core::Iterator<core::String*>* :sync-for-iterator = #t5.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::String* #t6 = :sync-for-iterator.{core::Iterator::current};
#t4.{core::Set::add}(#t6);
#t4.{core::Set::add}{Invariant}(#t6);
}
}
} =>#t4;
@ -34,13 +34,13 @@ static method nullAwareSetSpread(core::Set<core::String*>* set) → dynamic {
static method nullAwareMapSpread(core::Map<core::int*, core::String*>* map) → dynamic {
map = block {
final core::Map<core::int*, core::String*>* #t7 = <core::int*, core::String*>{};
#t7.{core::Map::[]=}(0, "foo");
#t7.{core::Map::[]=}{Invariant}(0, "foo");
final core::Map<core::int*, core::String*>* #t8 = map;
if(!#t8.{core::Object::==}(null)) {
core::Iterator<core::MapEntry<core::int*, core::String*>>* :sync-for-iterator = #t8.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int*, core::String*>* #t9 = :sync-for-iterator.{core::Iterator::current};
#t7.{core::Map::[]=}(#t9.{core::MapEntry::key}, #t9.{core::MapEntry::value});
#t7.{core::Map::[]=}{Invariant}(#t9.{core::MapEntry::key}, #t9.{core::MapEntry::value});
}
}
} =>#t7;

View file

@ -14,33 +14,33 @@ import "dart:collection" as col;
static method main() → dynamic {
final core::List<core::int*>* aList = block {
final core::List<core::int*>* #t1 = <core::int*>[];
#t1.{core::List::add}(1);
#t1.{core::List::add}{Invariant}(1);
for (final core::int* #t2 in <core::int*>[2])
#t1.{core::List::add}(#t2);
#t1.{core::List::add}{Invariant}(#t2);
final core::Iterable<core::int*>* #t3 = <core::int*>[3];
if(!#t3.{core::Object::==}(null))
for (final core::int* #t4 in #t3)
#t1.{core::List::add}(#t4);
#t1.{core::List::add}{Invariant}(#t4);
} =>#t1;
final core::Map<core::int*, core::int*>* aMap = block {
final core::Map<core::int*, core::int*>* #t5 = <core::int*, core::int*>{};
#t5.{core::Map::[]=}(1, 1);
#t5.{core::Map::[]=}{Invariant}(1, 1);
for (final core::MapEntry<core::int*, core::int*>* #t6 in <core::int*, core::int*>{2: 2}.{core::Map::entries})
#t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
#t5.{core::Map::[]=}{Invariant}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
final core::Map<core::int*, core::int*>* #t7 = <core::int*, core::int*>{3: 3};
if(!#t7.{core::Object::==}(null))
for (final core::MapEntry<core::int*, core::int*>* #t8 in #t7.{core::Map::entries})
#t5.{core::Map::[]=}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
#t5.{core::Map::[]=}{Invariant}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
} =>#t5;
final core::Set<core::int*>* aSet = block {
final core::Set<core::int*>* #t9 = col::LinkedHashSet::•<core::int*>();
#t9.{core::Set::add}(1);
#t9.{core::Set::add}{Invariant}(1);
for (final core::int* #t10 in <core::int*>[2])
#t9.{core::Set::add}(#t10);
#t9.{core::Set::add}{Invariant}(#t10);
final core::Iterable<core::int*>* #t11 = <core::int*>[3];
if(!#t11.{core::Object::==}(null))
for (final core::int* #t12 in #t11)
#t9.{core::Set::add}(#t12);
#t9.{core::Set::add}{Invariant}(#t12);
} =>#t9;
final dynamic aSetOrMap = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection.dart:23:21: Error: Not enough type information to disambiguate between literal set and literal map.
Try providing type arguments for the literal explicitly to disambiguate it.

View file

@ -14,12 +14,12 @@ import "dart:collection" as col;
static method main() → dynamic {
final core::List<core::int*>* aList = block {
final core::List<core::int*>* #t1 = <core::int*>[];
#t1.{core::List::add}(1);
#t1.{core::List::add}{Invariant}(1);
{
core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[2].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t2 = :sync-for-iterator.{core::Iterator::current};
#t1.{core::List::add}(#t2);
#t1.{core::List::add}{Invariant}(#t2);
}
}
final core::Iterable<core::int*>* #t3 = <core::int*>[3];
@ -27,18 +27,18 @@ static method main() → dynamic {
core::Iterator<core::int*>* :sync-for-iterator = #t3.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t4 = :sync-for-iterator.{core::Iterator::current};
#t1.{core::List::add}(#t4);
#t1.{core::List::add}{Invariant}(#t4);
}
}
} =>#t1;
final core::Map<core::int*, core::int*>* aMap = block {
final core::Map<core::int*, core::int*>* #t5 = <core::int*, core::int*>{};
#t5.{core::Map::[]=}(1, 1);
#t5.{core::Map::[]=}{Invariant}(1, 1);
{
core::Iterator<core::MapEntry<core::int*, core::int*>>* :sync-for-iterator = <core::int*, core::int*>{2: 2}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int*, core::int*>* #t6 = :sync-for-iterator.{core::Iterator::current};
#t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
#t5.{core::Map::[]=}{Invariant}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
}
}
final core::Map<core::int*, core::int*>* #t7 = <core::int*, core::int*>{3: 3};
@ -46,18 +46,18 @@ static method main() → dynamic {
core::Iterator<core::MapEntry<core::int*, core::int*>>* :sync-for-iterator = #t7.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int*, core::int*>* #t8 = :sync-for-iterator.{core::Iterator::current};
#t5.{core::Map::[]=}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
#t5.{core::Map::[]=}{Invariant}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
}
}
} =>#t5;
final core::Set<core::int*>* aSet = block {
final core::Set<core::int*>* #t9 = new col::_CompactLinkedHashSet::•<core::int*>();
#t9.{core::Set::add}(1);
#t9.{core::Set::add}{Invariant}(1);
{
core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[2].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t10 = :sync-for-iterator.{core::Iterator::current};
#t9.{core::Set::add}(#t10);
#t9.{core::Set::add}{Invariant}(#t10);
}
}
final core::Iterable<core::int*>* #t11 = <core::int*>[3];
@ -65,7 +65,7 @@ static method main() → dynamic {
core::Iterator<core::int*>* :sync-for-iterator = #t11.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t12 = :sync-for-iterator.{core::Iterator::current};
#t9.{core::Set::add}(#t12);
#t9.{core::Set::add}{Invariant}(#t12);
}
}
} =>#t9;

View file

@ -112,68 +112,68 @@ static method foo(dynamic dynVar) → dynamic {
core::List<dynamic>* lhs10 = block {
final core::List<dynamic>* #t1 = <dynamic>[];
for (final dynamic #t2 in <dynamic>[])
#t1.{core::List::add}(#t2);
#t1.{core::List::add}{Invariant}(#t2);
} =>#t1;
core::Set<dynamic>* set10 = block {
final core::Set<dynamic>* #t3 = col::LinkedHashSet::•<dynamic>();
for (final dynamic #t4 in <dynamic>[])
#t3.{core::Set::add}(#t4);
#t3.{core::Set::add}{Invariant}(#t4);
} =>#t3;
core::Map<dynamic, dynamic>* map10 = block {
final core::Map<dynamic, dynamic>* #t5 = <dynamic, dynamic>{};
for (final core::MapEntry<dynamic, dynamic>* #t6 in <dynamic, dynamic>{}.{core::Map::entries})
#t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
#t5.{core::Map::[]=}{Invariant}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
} =>#t5;
core::Map<dynamic, dynamic>* map10ambiguous = block {
final core::Map<dynamic, dynamic>* #t7 = <dynamic, dynamic>{};
for (final core::MapEntry<dynamic, dynamic>* #t8 in <dynamic, dynamic>{}.{core::Map::entries})
#t7.{core::Map::[]=}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
#t7.{core::Map::[]=}{Invariant}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
} =>#t7;
core::List<core::int*>* lhs20 = block {
final core::List<core::int*>* #t9 = <core::int*>[];
for (final core::int* #t10 in spread)
#t9.{core::List::add}(#t10);
#t9.{core::List::add}{Invariant}(#t10);
} =>#t9;
core::Set<core::int*>* set20 = block {
final core::Set<core::int*>* #t11 = col::LinkedHashSet::•<core::int*>();
for (final core::int* #t12 in spread)
#t11.{core::Set::add}(#t12);
#t11.{core::Set::add}(42);
#t11.{core::Set::add}{Invariant}(#t12);
#t11.{core::Set::add}{Invariant}(42);
} =>#t11;
core::Set<core::int*>* set20ambiguous = block {
final core::Set<core::int*>* #t13 = col::LinkedHashSet::•<core::int*>();
for (final dynamic #t14 in spread) {
final core::int* #t15 = #t14 as{TypeError} core::int*;
#t13.{core::Set::add}(#t15);
#t13.{core::Set::add}{Invariant}(#t15);
}
} =>#t13;
core::Map<core::String*, core::int*>* map20 = block {
final core::Map<core::String*, core::int*>* #t16 = <core::String*, core::int*>{};
for (final core::MapEntry<core::String*, core::int*>* #t17 in mapSpread.{core::Map::entries})
#t16.{core::Map::[]=}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
#t16.{core::Map::[]=}("baz", 42);
#t16.{core::Map::[]=}{Invariant}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
#t16.{core::Map::[]=}{Invariant}("baz", 42);
} =>#t16;
core::Map<core::String*, core::int*>* map20ambiguous = block {
final core::Map<core::String*, core::int*>* #t18 = <core::String*, core::int*>{};
for (final core::MapEntry<core::String*, core::int*>* #t19 in mapSpread.{core::Map::entries})
#t18.{core::Map::[]=}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
#t18.{core::Map::[]=}{Invariant}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
} =>#t18;
core::List<dynamic>* lhs21 = block {
final core::List<dynamic>* #t20 = <dynamic>[];
for (final dynamic #t21 in (spread as dynamic) as{TypeError,ForDynamic} core::Iterable<dynamic>*)
#t20.{core::List::add}(#t21);
#t20.{core::List::add}{Invariant}(#t21);
} =>#t20;
core::Set<dynamic>* set21 = block {
final core::Set<dynamic>* #t22 = col::LinkedHashSet::•<dynamic>();
for (final dynamic #t23 in (spread as dynamic) as{TypeError,ForDynamic} core::Iterable<dynamic>*)
#t22.{core::Set::add}(#t23);
#t22.{core::Set::add}(42);
#t22.{core::Set::add}{Invariant}(#t23);
#t22.{core::Set::add}{Invariant}(42);
} =>#t22;
core::Map<dynamic, dynamic>* map21 = block {
final core::Map<dynamic, dynamic>* #t24 = <dynamic, dynamic>{};
for (final core::MapEntry<dynamic, dynamic>* #t25 in ((mapSpread as dynamic) as{TypeError,ForDynamic} core::Map<dynamic, dynamic>*).{core::Map::entries})
#t24.{core::Map::[]=}(#t25.{core::MapEntry::key}, #t25.{core::MapEntry::value});
#t24.{core::Map::[]=}("baz", 42);
#t24.{core::Map::[]=}{Invariant}(#t25.{core::MapEntry::key}, #t25.{core::MapEntry::value});
#t24.{core::Map::[]=}{Invariant}("baz", 42);
} =>#t24;
dynamic map21ambiguous = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:66:28: Error: Not enough type information to disambiguate between literal set and literal map.
Try providing type arguments for the literal explicitly to disambiguate it.
@ -182,48 +182,48 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::List<core::int*>* lhs22 = block {
final core::List<core::int*>* #t26 = <core::int*>[];
for (final core::int* #t27 in <core::int*>[])
#t26.{core::List::add}(#t27);
#t26.{core::List::add}{Invariant}(#t27);
} =>#t26;
core::Set<core::int*>* set22 = block {
final core::Set<core::int*>* #t28 = col::LinkedHashSet::•<core::int*>();
for (final core::int* #t29 in <core::int*>[])
#t28.{core::Set::add}(#t29);
#t28.{core::Set::add}(42);
#t28.{core::Set::add}{Invariant}(#t29);
#t28.{core::Set::add}{Invariant}(42);
} =>#t28;
core::Set<core::int*>* set22ambiguous = block {
final core::Set<core::int*>* #t30 = col::LinkedHashSet::•<core::int*>();
for (final dynamic #t31 in <core::int*>[]) {
final core::int* #t32 = #t31 as{TypeError} core::int*;
#t30.{core::Set::add}(#t32);
#t30.{core::Set::add}{Invariant}(#t32);
}
} =>#t30;
core::Map<core::String*, core::int*>* map22 = block {
final core::Map<core::String*, core::int*>* #t33 = <core::String*, core::int*>{};
for (final core::MapEntry<core::String*, core::int*>* #t34 in <core::String*, core::int*>{}.{core::Map::entries})
#t33.{core::Map::[]=}(#t34.{core::MapEntry::key}, #t34.{core::MapEntry::value});
#t33.{core::Map::[]=}{Invariant}(#t34.{core::MapEntry::key}, #t34.{core::MapEntry::value});
} =>#t33;
core::List<core::List<core::int*>*>* lhs23 = block {
final core::List<core::List<core::int*>*>* #t35 = <core::List<core::int*>*>[];
for (final core::List<core::int*>* #t36 in <core::List<core::int*>*>[<core::int*>[]])
#t35.{core::List::add}(#t36);
#t35.{core::List::add}{Invariant}(#t36);
} =>#t35;
core::Set<core::List<core::int*>*>* set23 = block {
final core::Set<core::List<core::int*>*>* #t37 = col::LinkedHashSet::•<core::List<core::int*>*>();
for (final core::List<core::int*>* #t38 in <core::List<core::int*>*>[<core::int*>[]])
#t37.{core::Set::add}(#t38);
#t37.{core::Set::add}(<core::int*>[42]);
#t37.{core::Set::add}{Invariant}(#t38);
#t37.{core::Set::add}{Invariant}(<core::int*>[42]);
} =>#t37;
core::Set<core::List<core::int*>*>* set23ambiguous = block {
final core::Set<core::List<core::int*>*>* #t39 = col::LinkedHashSet::•<core::List<core::int*>*>();
for (final dynamic #t40 in <core::List<core::int*>*>[<core::int*>[]]) {
final core::List<core::int*>* #t41 = #t40 as{TypeError} core::List<core::int*>*;
#t39.{core::Set::add}(#t41);
#t39.{core::Set::add}{Invariant}(#t41);
}
} =>#t39;
core::Map<core::String*, core::List<core::int*>*>* map23 = block {
final core::Map<core::String*, core::List<core::int*>*>* #t42 = <core::String*, core::List<core::int*>*>{};
for (final core::MapEntry<core::String*, core::List<core::int*>*>* #t43 in <core::String*, core::List<core::int*>*>{"baz": <core::int*>[]}.{core::Map::entries})
#t42.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
#t42.{core::Map::[]=}{Invariant}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
} =>#t42;
dynamic map24ambiguous = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:98:28: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
dynamic map24ambiguous = {...spread, ...mapSpread};
@ -234,7 +234,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^" in ( block {
final core::List<core::int*>* #t45 = <core::int*>[];
for (final core::int* #t46 in spread)
#t45.{core::List::add}(#t46);
#t45.{core::List::add}{Invariant}(#t46);
} =>#t45) as{TypeError} core::int*;
core::int* set30 = let final<BottomType> #t47 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:102:36: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
- 'Set' is from 'dart:core'.
@ -242,8 +242,8 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^" in ( block {
final core::Set<core::int*>* #t48 = col::LinkedHashSet::•<core::int*>();
for (final core::int* #t49 in spread)
#t48.{core::Set::add}(#t49);
#t48.{core::Set::add}(42);
#t48.{core::Set::add}{Invariant}(#t49);
#t48.{core::Set::add}{Invariant}(42);
} =>#t48) as{TypeError} core::int*;
core::int* set30ambiguous = let final<BottomType> #t50 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:105:7: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
- 'Set' is from 'dart:core'.
@ -252,7 +252,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final core::Set<core::int*>* #t51 = col::LinkedHashSet::•<core::int*>();
for (final dynamic #t52 in spread) {
final core::int* #t53 = #t52 as{TypeError} core::int*;
#t51.{core::Set::add}(#t53);
#t51.{core::Set::add}{Invariant}(#t53);
}
} =>#t51) as{TypeError} core::int*;
core::int* map30 = let final<BottomType> #t54 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:108:7: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
@ -261,8 +261,8 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^" in ( block {
final core::Map<core::String*, core::int*>* #t55 = <core::String*, core::int*>{};
for (final core::MapEntry<core::String*, core::int*>* #t56 in mapSpread.{core::Map::entries})
#t55.{core::Map::[]=}(#t56.{core::MapEntry::key}, #t56.{core::MapEntry::value});
#t55.{core::Map::[]=}("baz", 42);
#t55.{core::Map::[]=}{Invariant}(#t56.{core::MapEntry::key}, #t56.{core::MapEntry::value});
#t55.{core::Map::[]=}{Invariant}("baz", 42);
} =>#t55) as{TypeError} core::int*;
core::int* map30ambiguous = let final<BottomType> #t57 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:111:7: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
- 'Map' is from 'dart:core'.
@ -270,14 +270,14 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^" in ( block {
final core::Map<core::String*, core::int*>* #t58 = <core::String*, core::int*>{};
for (final core::MapEntry<core::String*, core::int*>* #t59 in mapSpread.{core::Map::entries})
#t58.{core::Map::[]=}(#t59.{core::MapEntry::key}, #t59.{core::MapEntry::value});
#t58.{core::Map::[]=}{Invariant}(#t59.{core::MapEntry::key}, #t59.{core::MapEntry::value});
} =>#t58) as{TypeError} core::int*;
core::List<dynamic>* lhs40 = <dynamic>[invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:113:38: Error: Unexpected type 'int' of a spread. Expected 'dynamic' or an Iterable.
List<dynamic> lhs40 = <dynamic>[...notSpreadInt];
^"];
core::Set<dynamic>* set40 = block {
final core::Set<dynamic>* #t60 = col::LinkedHashSet::•<dynamic>();
#t60.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:115:37: Error: Unexpected type 'int' of a spread. Expected 'dynamic' or an Iterable.
#t60.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:115:37: Error: Unexpected type 'int' of a spread. Expected 'dynamic' or an Iterable.
Set<dynamic> set40 = <dynamic>{...notSpreadInt};
^");
} =>#t60;
@ -289,7 +289,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^"];
core::Set<dynamic>* set50 = block {
final core::Set<dynamic>* #t61 = col::LinkedHashSet::•<dynamic>();
#t61.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:121:37: Error: Unexpected type 'int Function()' of a spread. Expected 'dynamic' or an Iterable.
#t61.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:121:37: Error: Unexpected type 'int Function()' of a spread. Expected 'dynamic' or an Iterable.
Set<dynamic> set50 = <dynamic>{...notSpreadFunction};
^");
} =>#t61;
@ -301,7 +301,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^"];
core::Set<core::String*>* set60 = block {
final core::Set<core::String*>* #t62 = col::LinkedHashSet::•<core::String*>();
#t62.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:127:35: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
#t62.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:127:35: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
Set<String> set60 = <String>{...spread};
^");
} =>#t62;
@ -316,18 +316,18 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^"];
core::Set<core::int*>* set70 = block {
final core::Set<core::int*>* #t63 = col::LinkedHashSet::•<core::int*>();
#t63.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:135:29: Error: Can't spread a value with static type 'Null'.
#t63.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:135:29: Error: Can't spread a value with static type 'Null'.
Set<int> set70 = <int>{...null};
^");
} =>#t63;
core::Set<dynamic>* set71ambiguous = block {
final core::Set<dynamic>* #t64 = col::LinkedHashSet::•<dynamic>();
#t64.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:139:8: Error: Expected ',' before this.
#t64.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:139:8: Error: Expected ',' before this.
...null,
^");
for (final dynamic #t65 in <dynamic>[]) {
final dynamic #t66 = #t65 as{TypeError} dynamic;
#t64.{core::Set::add}(#t66);
#t64.{core::Set::add}{Invariant}(#t66);
}
} =>#t64;
core::Map<core::String*, core::int*>* map70 = <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:144:45: Error: Can't spread a value with static type 'Null'.
@ -338,14 +338,14 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final core::Iterable<core::int*>* #t68 = null;
if(!#t68.{core::Object::==}(null))
for (final core::int* #t69 in #t68)
#t67.{core::List::add}(#t69);
#t67.{core::List::add}{Invariant}(#t69);
} =>#t67;
core::Set<core::int*>* set80 = block {
final core::Set<core::int*>* #t70 = col::LinkedHashSet::•<core::int*>();
final core::Iterable<core::int*>* #t71 = null;
if(!#t71.{core::Object::==}(null))
for (final core::int* #t72 in #t71)
#t70.{core::Set::add}(#t72);
#t70.{core::Set::add}{Invariant}(#t72);
} =>#t70;
core::Set<dynamic>* set81ambiguous = block {
final core::Set<dynamic>* #t73 = col::LinkedHashSet::•<dynamic>();
@ -353,11 +353,11 @@ Try providing type arguments for the literal explicitly to disambiguate it.
if(!#t74.{core::Object::==}(null))
for (final dynamic #t75 in #t74) {
final dynamic #t76 = #t75 as{TypeError} dynamic;
#t73.{core::Set::add}(#t76);
#t73.{core::Set::add}{Invariant}(#t76);
}
for (final dynamic #t77 in <dynamic>[]) {
final dynamic #t78 = #t77 as{TypeError} dynamic;
#t73.{core::Set::add}(#t78);
#t73.{core::Set::add}{Invariant}(#t78);
}
} =>#t73;
core::Map<core::String*, core::int*>* map80 = block {
@ -365,18 +365,18 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final core::Map<core::String*, core::int*>* #t80 = null;
if(!#t80.{core::Object::==}(null))
for (final core::MapEntry<core::String*, core::int*>* #t81 in #t80.{core::Map::entries})
#t79.{core::Map::[]=}(#t81.{core::MapEntry::key}, #t81.{core::MapEntry::value});
#t79.{core::Map::[]=}{Invariant}(#t81.{core::MapEntry::key}, #t81.{core::MapEntry::value});
} =>#t79;
core::Map<core::String*, core::int*>* map90 = block {
final core::Map<core::String*, core::int*>* #t82 = <core::String*, core::int*>{};
for (final core::MapEntry<core::String*, core::int*>* #t83 in self::bar<core::String*, core::int*>().{core::Map::entries})
#t82.{core::Map::[]=}(#t83.{core::MapEntry::key}, #t83.{core::MapEntry::value});
#t82.{core::Map::[]=}{Invariant}(#t83.{core::MapEntry::key}, #t83.{core::MapEntry::value});
} =>#t82;
core::List<core::int*>* list100 = block {
final core::List<core::int*>* #t84 = <core::int*>[];
for (final dynamic #t85 in listNum) {
final core::int* #t86 = #t85 as{TypeError} core::int*;
#t84.{core::List::add}(#t86);
#t84.{core::List::add}{Invariant}(#t86);
}
} =>#t84;
core::Map<core::num*, core::int*>* map100 = block {
@ -384,14 +384,14 @@ Try providing type arguments for the literal explicitly to disambiguate it.
for (final core::MapEntry<dynamic, dynamic>* #t88 in mapIntNum.{core::Map::entries}) {
final core::num* #t89 = #t88.{core::MapEntry::key} as{TypeError} core::num*;
final core::int* #t90 = #t88.{core::MapEntry::value} as{TypeError} core::int*;
#t87.{core::Map::[]=}(#t89, #t90);
#t87.{core::Map::[]=}{Invariant}(#t89, #t90);
}
} =>#t87;
core::List<core::int*>* list110 = block {
final core::List<core::int*>* #t91 = <core::int*>[];
for (final dynamic #t92 in dynVar as{TypeError,ForDynamic} core::Iterable<dynamic>*) {
final core::int* #t93 = #t92 as{TypeError} core::int*;
#t91.{core::List::add}(#t93);
#t91.{core::List::add}{Invariant}(#t93);
}
} =>#t91;
core::Map<core::num*, core::int*>* map110 = block {
@ -399,7 +399,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
for (final core::MapEntry<dynamic, dynamic>* #t95 in (dynVar as{TypeError,ForDynamic} core::Map<dynamic, dynamic>*).{core::Map::entries}) {
final core::num* #t96 = #t95.{core::MapEntry::key} as{TypeError} core::num*;
final core::int* #t97 = #t95.{core::MapEntry::value} as{TypeError} core::int*;
#t94.{core::Map::[]=}(#t96, #t97);
#t94.{core::Map::[]=}{Invariant}(#t96, #t97);
}
} =>#t94;
}

View file

@ -115,7 +115,7 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<dynamic>* :sync-for-iterator = <dynamic>[].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t2 = :sync-for-iterator.{core::Iterator::current};
#t1.{core::List::add}(#t2);
#t1.{core::List::add}{Invariant}(#t2);
}
}
} =>#t1;
@ -125,7 +125,7 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<dynamic>* :sync-for-iterator = <dynamic>[].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t4 = :sync-for-iterator.{core::Iterator::current};
#t3.{core::Set::add}(#t4);
#t3.{core::Set::add}{Invariant}(#t4);
}
}
} =>#t3;
@ -135,7 +135,7 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<core::MapEntry<dynamic, dynamic>>* :sync-for-iterator = <dynamic, dynamic>{}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic>* #t6 = :sync-for-iterator.{core::Iterator::current};
#t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
#t5.{core::Map::[]=}{Invariant}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
}
}
} =>#t5;
@ -145,7 +145,7 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<core::MapEntry<dynamic, dynamic>>* :sync-for-iterator = <dynamic, dynamic>{}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic>* #t8 = :sync-for-iterator.{core::Iterator::current};
#t7.{core::Map::[]=}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
#t7.{core::Map::[]=}{Invariant}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
}
}
} =>#t7;
@ -155,7 +155,7 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<core::int*>* :sync-for-iterator = spread.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t10 = :sync-for-iterator.{core::Iterator::current};
#t9.{core::List::add}(#t10);
#t9.{core::List::add}{Invariant}(#t10);
}
}
} =>#t9;
@ -165,10 +165,10 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<core::int*>* :sync-for-iterator = spread.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t12 = :sync-for-iterator.{core::Iterator::current};
#t11.{core::Set::add}(#t12);
#t11.{core::Set::add}{Invariant}(#t12);
}
}
#t11.{core::Set::add}(42);
#t11.{core::Set::add}{Invariant}(42);
} =>#t11;
core::Set<core::int*>* set20ambiguous = block {
final core::Set<core::int*>* #t13 = new col::_CompactLinkedHashSet::•<core::int*>();
@ -178,7 +178,7 @@ static method foo(dynamic dynVar) → dynamic {
final dynamic #t14 = :sync-for-iterator.{core::Iterator::current};
{
final core::int* #t15 = #t14 as{TypeError} core::int*;
#t13.{core::Set::add}(#t15);
#t13.{core::Set::add}{Invariant}(#t15);
}
}
}
@ -189,10 +189,10 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = mapSpread.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String*, core::int*>* #t17 = :sync-for-iterator.{core::Iterator::current};
#t16.{core::Map::[]=}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
#t16.{core::Map::[]=}{Invariant}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
}
}
#t16.{core::Map::[]=}("baz", 42);
#t16.{core::Map::[]=}{Invariant}("baz", 42);
} =>#t16;
core::Map<core::String*, core::int*>* map20ambiguous = block {
final core::Map<core::String*, core::int*>* #t18 = <core::String*, core::int*>{};
@ -200,7 +200,7 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = mapSpread.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String*, core::int*>* #t19 = :sync-for-iterator.{core::Iterator::current};
#t18.{core::Map::[]=}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
#t18.{core::Map::[]=}{Invariant}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
}
}
} =>#t18;
@ -210,7 +210,7 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<dynamic>* :sync-for-iterator = ((spread as dynamic) as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t21 = :sync-for-iterator.{core::Iterator::current};
#t20.{core::List::add}(#t21);
#t20.{core::List::add}{Invariant}(#t21);
}
}
} =>#t20;
@ -220,10 +220,10 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<dynamic>* :sync-for-iterator = ((spread as dynamic) as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t23 = :sync-for-iterator.{core::Iterator::current};
#t22.{core::Set::add}(#t23);
#t22.{core::Set::add}{Invariant}(#t23);
}
}
#t22.{core::Set::add}(42);
#t22.{core::Set::add}{Invariant}(42);
} =>#t22;
core::Map<dynamic, dynamic>* map21 = block {
final core::Map<dynamic, dynamic>* #t24 = <dynamic, dynamic>{};
@ -231,10 +231,10 @@ static method foo(dynamic dynVar) → dynamic {
core::Iterator<core::MapEntry<dynamic, dynamic>>* :sync-for-iterator = ((mapSpread as dynamic) as{TypeError,ForDynamic} core::Map<dynamic, dynamic>*).{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic>* #t25 = :sync-for-iterator.{core::Iterator::current};
#t24.{core::Map::[]=}(#t25.{core::MapEntry::key}, #t25.{core::MapEntry::value});
#t24.{core::Map::[]=}{Invariant}(#t25.{core::MapEntry::key}, #t25.{core::MapEntry::value});
}
}
#t24.{core::Map::[]=}("baz", 42);
#t24.{core::Map::[]=}{Invariant}("baz", 42);
} =>#t24;
dynamic map21ambiguous = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:66:28: Error: Not enough type information to disambiguate between literal set and literal map.
Try providing type arguments for the literal explicitly to disambiguate it.
@ -246,7 +246,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t27 = :sync-for-iterator.{core::Iterator::current};
#t26.{core::List::add}(#t27);
#t26.{core::List::add}{Invariant}(#t27);
}
}
} =>#t26;
@ -256,10 +256,10 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::int*>* :sync-for-iterator = <core::int*>[].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t29 = :sync-for-iterator.{core::Iterator::current};
#t28.{core::Set::add}(#t29);
#t28.{core::Set::add}{Invariant}(#t29);
}
}
#t28.{core::Set::add}(42);
#t28.{core::Set::add}{Invariant}(42);
} =>#t28;
core::Set<core::int*>* set22ambiguous = block {
final core::Set<core::int*>* #t30 = new col::_CompactLinkedHashSet::•<core::int*>();
@ -269,7 +269,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final dynamic #t31 = :sync-for-iterator.{core::Iterator::current};
{
final core::int* #t32 = #t31 as{TypeError} core::int*;
#t30.{core::Set::add}(#t32);
#t30.{core::Set::add}{Invariant}(#t32);
}
}
}
@ -280,7 +280,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = <core::String*, core::int*>{}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String*, core::int*>* #t34 = :sync-for-iterator.{core::Iterator::current};
#t33.{core::Map::[]=}(#t34.{core::MapEntry::key}, #t34.{core::MapEntry::value});
#t33.{core::Map::[]=}{Invariant}(#t34.{core::MapEntry::key}, #t34.{core::MapEntry::value});
}
}
} =>#t33;
@ -290,7 +290,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::List<core::int*>* #t36 = :sync-for-iterator.{core::Iterator::current};
#t35.{core::List::add}(#t36);
#t35.{core::List::add}{Invariant}(#t36);
}
}
} =>#t35;
@ -300,10 +300,10 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::List<core::int*>*>* :sync-for-iterator = <core::List<core::int*>*>[<core::int*>[]].{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::List<core::int*>* #t38 = :sync-for-iterator.{core::Iterator::current};
#t37.{core::Set::add}(#t38);
#t37.{core::Set::add}{Invariant}(#t38);
}
}
#t37.{core::Set::add}(<core::int*>[42]);
#t37.{core::Set::add}{Invariant}(<core::int*>[42]);
} =>#t37;
core::Set<core::List<core::int*>*>* set23ambiguous = block {
final core::Set<core::List<core::int*>*>* #t39 = new col::_CompactLinkedHashSet::•<core::List<core::int*>*>();
@ -313,7 +313,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final dynamic #t40 = :sync-for-iterator.{core::Iterator::current};
{
final core::List<core::int*>* #t41 = #t40 as{TypeError} core::List<core::int*>*;
#t39.{core::Set::add}(#t41);
#t39.{core::Set::add}{Invariant}(#t41);
}
}
}
@ -324,7 +324,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::MapEntry<core::String*, core::List<core::int*>*>>* :sync-for-iterator = <core::String*, core::List<core::int*>*>{"baz": <core::int*>[]}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String*, core::List<core::int*>*>* #t43 = :sync-for-iterator.{core::Iterator::current};
#t42.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
#t42.{core::Map::[]=}{Invariant}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
}
}
} =>#t42;
@ -340,7 +340,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::int*>* :sync-for-iterator = spread.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t46 = :sync-for-iterator.{core::Iterator::current};
#t45.{core::List::add}(#t46);
#t45.{core::List::add}{Invariant}(#t46);
}
}
} =>#t45) as{TypeError} core::int*;
@ -353,10 +353,10 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::int*>* :sync-for-iterator = spread.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t49 = :sync-for-iterator.{core::Iterator::current};
#t48.{core::Set::add}(#t49);
#t48.{core::Set::add}{Invariant}(#t49);
}
}
#t48.{core::Set::add}(42);
#t48.{core::Set::add}{Invariant}(42);
} =>#t48) as{TypeError} core::int*;
core::int* set30ambiguous = let final<BottomType> #t50 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:105:7: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
- 'Set' is from 'dart:core'.
@ -369,7 +369,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final dynamic #t52 = :sync-for-iterator.{core::Iterator::current};
{
final core::int* #t53 = #t52 as{TypeError} core::int*;
#t51.{core::Set::add}(#t53);
#t51.{core::Set::add}{Invariant}(#t53);
}
}
}
@ -383,10 +383,10 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = mapSpread.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String*, core::int*>* #t56 = :sync-for-iterator.{core::Iterator::current};
#t55.{core::Map::[]=}(#t56.{core::MapEntry::key}, #t56.{core::MapEntry::value});
#t55.{core::Map::[]=}{Invariant}(#t56.{core::MapEntry::key}, #t56.{core::MapEntry::value});
}
}
#t55.{core::Map::[]=}("baz", 42);
#t55.{core::Map::[]=}{Invariant}("baz", 42);
} =>#t55) as{TypeError} core::int*;
core::int* map30ambiguous = let final<BottomType> #t57 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:111:7: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
- 'Map' is from 'dart:core'.
@ -397,7 +397,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = mapSpread.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String*, core::int*>* #t59 = :sync-for-iterator.{core::Iterator::current};
#t58.{core::Map::[]=}(#t59.{core::MapEntry::key}, #t59.{core::MapEntry::value});
#t58.{core::Map::[]=}{Invariant}(#t59.{core::MapEntry::key}, #t59.{core::MapEntry::value});
}
}
} =>#t58) as{TypeError} core::int*;
@ -406,7 +406,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^"];
core::Set<dynamic>* set40 = block {
final core::Set<dynamic>* #t60 = new col::_CompactLinkedHashSet::•<dynamic>();
#t60.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:115:37: Error: Unexpected type 'int' of a spread. Expected 'dynamic' or an Iterable.
#t60.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:115:37: Error: Unexpected type 'int' of a spread. Expected 'dynamic' or an Iterable.
Set<dynamic> set40 = <dynamic>{...notSpreadInt};
^");
} =>#t60;
@ -418,7 +418,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^"];
core::Set<dynamic>* set50 = block {
final core::Set<dynamic>* #t61 = new col::_CompactLinkedHashSet::•<dynamic>();
#t61.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:121:37: Error: Unexpected type 'int Function()' of a spread. Expected 'dynamic' or an Iterable.
#t61.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:121:37: Error: Unexpected type 'int Function()' of a spread. Expected 'dynamic' or an Iterable.
Set<dynamic> set50 = <dynamic>{...notSpreadFunction};
^");
} =>#t61;
@ -430,7 +430,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^"];
core::Set<core::String*>* set60 = block {
final core::Set<core::String*>* #t62 = new col::_CompactLinkedHashSet::•<core::String*>();
#t62.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:127:35: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
#t62.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:127:35: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
Set<String> set60 = <String>{...spread};
^");
} =>#t62;
@ -445,13 +445,13 @@ Try providing type arguments for the literal explicitly to disambiguate it.
^"];
core::Set<core::int*>* set70 = block {
final core::Set<core::int*>* #t63 = new col::_CompactLinkedHashSet::•<core::int*>();
#t63.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:135:29: Error: Can't spread a value with static type 'Null'.
#t63.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:135:29: Error: Can't spread a value with static type 'Null'.
Set<int> set70 = <int>{...null};
^");
} =>#t63;
core::Set<dynamic>* set71ambiguous = block {
final core::Set<dynamic>* #t64 = new col::_CompactLinkedHashSet::•<dynamic>();
#t64.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:139:8: Error: Expected ',' before this.
#t64.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:139:8: Error: Expected ',' before this.
...null,
^");
{
@ -460,7 +460,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final dynamic #t65 = :sync-for-iterator.{core::Iterator::current};
{
final dynamic #t66 = #t65 as{TypeError} dynamic;
#t64.{core::Set::add}(#t66);
#t64.{core::Set::add}{Invariant}(#t66);
}
}
}
@ -475,7 +475,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::int*>* :sync-for-iterator = #t68.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t69 = :sync-for-iterator.{core::Iterator::current};
#t67.{core::List::add}(#t69);
#t67.{core::List::add}{Invariant}(#t69);
}
}
} =>#t67;
@ -486,7 +486,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::int*>* :sync-for-iterator = #t71.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t72 = :sync-for-iterator.{core::Iterator::current};
#t70.{core::Set::add}(#t72);
#t70.{core::Set::add}{Invariant}(#t72);
}
}
} =>#t70;
@ -499,7 +499,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final dynamic #t75 = :sync-for-iterator.{core::Iterator::current};
{
final dynamic #t76 = #t75 as{TypeError} dynamic;
#t73.{core::Set::add}(#t76);
#t73.{core::Set::add}{Invariant}(#t76);
}
}
}
@ -509,7 +509,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final dynamic #t77 = :sync-for-iterator.{core::Iterator::current};
{
final dynamic #t78 = #t77 as{TypeError} dynamic;
#t73.{core::Set::add}(#t78);
#t73.{core::Set::add}{Invariant}(#t78);
}
}
}
@ -521,7 +521,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = #t80.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String*, core::int*>* #t81 = :sync-for-iterator.{core::Iterator::current};
#t79.{core::Map::[]=}(#t81.{core::MapEntry::key}, #t81.{core::MapEntry::value});
#t79.{core::Map::[]=}{Invariant}(#t81.{core::MapEntry::key}, #t81.{core::MapEntry::value});
}
}
} =>#t79;
@ -531,7 +531,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
core::Iterator<core::MapEntry<core::String*, core::int*>>* :sync-for-iterator = self::bar<core::String*, core::int*>().{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String*, core::int*>* #t83 = :sync-for-iterator.{core::Iterator::current};
#t82.{core::Map::[]=}(#t83.{core::MapEntry::key}, #t83.{core::MapEntry::value});
#t82.{core::Map::[]=}{Invariant}(#t83.{core::MapEntry::key}, #t83.{core::MapEntry::value});
}
}
} =>#t82;
@ -543,7 +543,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final dynamic #t85 = :sync-for-iterator.{core::Iterator::current};
{
final core::int* #t86 = #t85 as{TypeError} core::int*;
#t84.{core::List::add}(#t86);
#t84.{core::List::add}{Invariant}(#t86);
}
}
}
@ -557,7 +557,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
{
final core::num* #t89 = #t88.{core::MapEntry::key} as{TypeError} core::num*;
final core::int* #t90 = #t88.{core::MapEntry::value} as{TypeError} core::int*;
#t87.{core::Map::[]=}(#t89, #t90);
#t87.{core::Map::[]=}{Invariant}(#t89, #t90);
}
}
}
@ -570,7 +570,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
final dynamic #t92 = :sync-for-iterator.{core::Iterator::current};
{
final core::int* #t93 = #t92 as{TypeError} core::int*;
#t91.{core::List::add}(#t93);
#t91.{core::List::add}{Invariant}(#t93);
}
}
}
@ -584,7 +584,7 @@ Try providing type arguments for the literal explicitly to disambiguate it.
{
final core::num* #t96 = #t95.{core::MapEntry::key} as{TypeError} core::num*;
final core::int* #t97 = #t95.{core::MapEntry::value} as{TypeError} core::int*;
#t94.{core::Map::[]=}(#t96, #t97);
#t94.{core::Map::[]=}{Invariant}(#t96, #t97);
}
}
}

View file

@ -322,14 +322,14 @@ library from "org-dartlang-test:///main.dart" as main {
dart.core::Iterator<dart.core::int*> :sync-for-iterator = this.{dart.core::Iterable::iterator};
for (; :sync-for-iterator.{dart.core::Iterator::moveNext}(); ) {
final dart.core::int* #t6 = :sync-for-iterator.{dart.core::Iterator::current};
#t5.{dart.core::List::add}(#t6);
#t5.{dart.core::List::add}{Invariant}(#t6);
}
}
{
dart.core::Iterator<dart.core::int*> :sync-for-iterator = other.{dart.core::Iterable::iterator};
for (; :sync-for-iterator.{dart.core::Iterator::moveNext}(); ) {
final dart.core::int* #t7 = :sync-for-iterator.{dart.core::Iterator::current};
#t5.{dart.core::List::add}(#t7);
#t5.{dart.core::List::add}{Invariant}(#t7);
}
}
} =>#t5;

View file

@ -322,14 +322,14 @@ library from "org-dartlang-test:///main.dart" as main {
dart.core::Iterator<dart.core::int*> :sync-for-iterator = this.{dart.core::Iterable::iterator};
for (; :sync-for-iterator.{dart.core::Iterator::moveNext}(); ) {
final dart.core::int* #t6 = :sync-for-iterator.{dart.core::Iterator::current};
#t5.{dart.core::List::add}(#t6);
#t5.{dart.core::List::add}{Invariant}(#t6);
}
}
{
dart.core::Iterator<dart.core::int*> :sync-for-iterator = other.{dart.core::Iterable::iterator};
for (; :sync-for-iterator.{dart.core::Iterator::moveNext}(); ) {
final dart.core::int* #t7 = :sync-for-iterator.{dart.core::Iterator::current};
#t5.{dart.core::List::add}(#t7);
#t5.{dart.core::List::add}{Invariant}(#t7);
}
}
} =>#t5;

View file

@ -127,7 +127,7 @@ No types are needed, the first is given by 'on', the second is always 'StackTrac
block {
final core::List<core::int> #t7 = <core::int>[];
for (core::int i = 0; i.{core::num::<}(10); i = i.{core::num::+}(1))
#t7.{core::List::add}(i);
#t7.{core::List::add}{Invariant}(i);
} =>#t7;
}
static method hest() → dynamic async {

View file

@ -133,7 +133,7 @@ No types are needed, the first is given by 'on', the second is always 'StackTrac
block {
final core::List<core::int> #t7 = <core::int>[];
for (core::int i = 0; i.{core::num::<}(10); i = i.{core::num::+}(1))
#t7.{core::List::add}(i);
#t7.{core::List::add}{Invariant}(i);
} =>#t7;
}
static method hest() → dynamic /* originally async */ {

View file

@ -147,7 +147,7 @@ No types are needed, the first is given by 'on', the second is always 'StackTrac
block {
final core::List<core::int> #t7 = <core::int>[];
for (core::int i = 0; i.{core::num::<}(10); i = i.{core::num::+}(1))
#t7.{core::List::add}(i);
#t7.{core::List::add}{Invariant}(i);
} =>#t7;
}
static method hest() → dynamic async {

View file

@ -153,7 +153,7 @@ No types are needed, the first is given by 'on', the second is always 'StackTrac
block {
final core::List<core::int> #t7 = <core::int>[];
for (core::int i = 0; i.{core::num::<}(10); i = i.{core::num::+}(1))
#t7.{core::List::add}(i);
#t7.{core::List::add}{Invariant}(i);
} =>#t7;
}
static method hest() → dynamic /* originally async */ {

View file

@ -63,7 +63,7 @@ static method error(core::Iterable<core::int>? i2, core::List<core::int>? l2, co
- 'Iterable' is from 'dart:core'.
[for (int x in i2) x];
^" in i2 as{TypeError,ForNonNullableByDefault} core::Iterable<dynamic>)
#t2.{core::List::add}(x);
#t2.{core::List::add}{Invariant}(x);
} =>#t2;
for (core::int x in let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:12:17: Error: The type 'List<int>?' used in the 'for' loop must implement 'Iterable<dynamic>' because 'List<int>?' is nullable and 'Iterable<dynamic>' isn't.
- 'List' is from 'dart:core'.
@ -78,7 +78,7 @@ static method error(core::Iterable<core::int>? i2, core::List<core::int>? l2, co
- 'Iterable' is from 'dart:core'.
[for (int x in l2) x];
^" in l2 as{TypeError,ForNonNullableByDefault} core::Iterable<dynamic>)
#t5.{core::List::add}(x);
#t5.{core::List::add}{Invariant}(x);
} =>#t5;
for (final dynamic #t7 in let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:15:17: Error: The type 'Object' used in the 'for' loop must implement 'Iterable<dynamic>'.
- 'Object' is from 'dart:core'.
@ -96,7 +96,7 @@ static method error(core::Iterable<core::int>? i2, core::List<core::int>? l2, co
[for (int x in o1) x];
^" in o1 as{TypeError,ForNonNullableByDefault} core::Iterable<dynamic>) {
core::int x = #t10 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
#t9.{core::List::add}(x);
#t9.{core::List::add}{Invariant}(x);
}
} =>#t9;
for (final dynamic #t12 in let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:18:17: Error: The type 'Object?' used in the 'for' loop must implement 'Iterable<dynamic>'.
@ -115,7 +115,7 @@ static method error(core::Iterable<core::int>? i2, core::List<core::int>? l2, co
[for (int x in o2) x];
^" in o2 as{TypeError,ForNonNullableByDefault} core::Iterable<dynamic>) {
core::int x = #t15 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
#t14.{core::List::add}(x);
#t14.{core::List::add}{Invariant}(x);
}
} =>#t14;
}
@ -125,14 +125,14 @@ static method ok(core::Iterable<core::int> i1, core::List<core::int> l1, dynamic
block {
final core::List<core::int> #t17 = <core::int>[];
for (core::int x in i1)
#t17.{core::List::add}(x);
#t17.{core::List::add}{Invariant}(x);
} =>#t17;
for (core::int x in l1)
x;
block {
final core::List<core::int> #t18 = <core::int>[];
for (core::int x in l1)
#t18.{core::List::add}(x);
#t18.{core::List::add}{Invariant}(x);
} =>#t18;
for (final dynamic #t19 in d as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<dynamic>) {
core::int x = #t19 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
@ -142,7 +142,7 @@ static method ok(core::Iterable<core::int> i1, core::List<core::int> l1, dynamic
final core::List<core::int> #t20 = <core::int>[];
for (final dynamic #t21 in d as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<dynamic>) {
core::int x = #t21 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
#t20.{core::List::add}(x);
#t20.{core::List::add}{Invariant}(x);
}
} =>#t20;
}

View file

@ -71,7 +71,7 @@ static method error(core::Iterable<core::int>? i2, core::List<core::int>? l2, co
^" in let core::Iterable<core::int>? #t5 = i2 in #t5.==(null) ?{core::Iterable<dynamic>} #t5 as{TypeError,ForNonNullableByDefault} core::Iterable<dynamic> : #t5{core::Iterable<dynamic>}).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int x = :sync-for-iterator.{core::Iterator::current};
#t3.{core::List::add}(x);
#t3.{core::List::add}{Invariant}(x);
}
}
} =>#t3;
@ -96,7 +96,7 @@ static method error(core::Iterable<core::int>? i2, core::List<core::int>? l2, co
^" in let core::List<core::int>? #t10 = l2 in #t10.==(null) ?{core::Iterable<dynamic>} #t10 as{TypeError,ForNonNullableByDefault} core::Iterable<dynamic> : #t10{core::Iterable<dynamic>}).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int x = :sync-for-iterator.{core::Iterator::current};
#t8.{core::List::add}(x);
#t8.{core::List::add}{Invariant}(x);
}
}
} =>#t8;
@ -126,7 +126,7 @@ static method error(core::Iterable<core::int>? i2, core::List<core::int>? l2, co
final dynamic #t15 = :sync-for-iterator.{core::Iterator::current};
{
core::int x = #t15 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
#t13.{core::List::add}(x);
#t13.{core::List::add}{Invariant}(x);
}
}
}
@ -157,7 +157,7 @@ static method error(core::Iterable<core::int>? i2, core::List<core::int>? l2, co
final dynamic #t20 = :sync-for-iterator.{core::Iterator::current};
{
core::int x = #t20 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
#t18.{core::List::add}(x);
#t18.{core::List::add}{Invariant}(x);
}
}
}
@ -177,7 +177,7 @@ static method ok(core::Iterable<core::int> i1, core::List<core::int> l1, dynamic
core::Iterator<core::int> :sync-for-iterator = i1.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int x = :sync-for-iterator.{core::Iterator::current};
#t21.{core::List::add}(x);
#t21.{core::List::add}{Invariant}(x);
}
}
} =>#t21;
@ -194,7 +194,7 @@ static method ok(core::Iterable<core::int> i1, core::List<core::int> l1, dynamic
core::Iterator<core::int> :sync-for-iterator = l1.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int x = :sync-for-iterator.{core::Iterator::current};
#t22.{core::List::add}(x);
#t22.{core::List::add}{Invariant}(x);
}
}
} =>#t22;
@ -216,7 +216,7 @@ static method ok(core::Iterable<core::int> i1, core::List<core::int> l1, dynamic
final dynamic #t25 = :sync-for-iterator.{core::Iterator::current};
{
core::int x = #t25 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
#t24.{core::List::add}(x);
#t24.{core::List::add}{Invariant}(x);
}
}
}

View file

@ -63,7 +63,7 @@ static method error(core::Iterable<core::int>? i2, core::List<core::int>? l2, co
- 'Iterable' is from 'dart:core'.
[for (int x in i2) x];
^" in i2 as{TypeError,ForNonNullableByDefault} core::Iterable<dynamic>)
#t2.{core::List::add}(x);
#t2.{core::List::add}{Invariant}(x);
} =>#t2;
for (core::int x in let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:12:17: Error: The type 'List<int>?' used in the 'for' loop must implement 'Iterable<dynamic>' because 'List<int>?' is nullable and 'Iterable<dynamic>' isn't.
- 'List' is from 'dart:core'.
@ -78,7 +78,7 @@ static method error(core::Iterable<core::int>? i2, core::List<core::int>? l2, co
- 'Iterable' is from 'dart:core'.
[for (int x in l2) x];
^" in l2 as{TypeError,ForNonNullableByDefault} core::Iterable<dynamic>)
#t5.{core::List::add}(x);
#t5.{core::List::add}{Invariant}(x);
} =>#t5;
for (final dynamic #t7 in let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:15:17: Error: The type 'Object' used in the 'for' loop must implement 'Iterable<dynamic>'.
- 'Object' is from 'dart:core'.
@ -96,7 +96,7 @@ static method error(core::Iterable<core::int>? i2, core::List<core::int>? l2, co
[for (int x in o1) x];
^" in o1 as{TypeError,ForNonNullableByDefault} core::Iterable<dynamic>) {
core::int x = #t10 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
#t9.{core::List::add}(x);
#t9.{core::List::add}{Invariant}(x);
}
} =>#t9;
for (final dynamic #t12 in let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:18:17: Error: The type 'Object?' used in the 'for' loop must implement 'Iterable<dynamic>'.
@ -115,7 +115,7 @@ static method error(core::Iterable<core::int>? i2, core::List<core::int>? l2, co
[for (int x in o2) x];
^" in o2 as{TypeError,ForNonNullableByDefault} core::Iterable<dynamic>) {
core::int x = #t15 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
#t14.{core::List::add}(x);
#t14.{core::List::add}{Invariant}(x);
}
} =>#t14;
}
@ -125,14 +125,14 @@ static method ok(core::Iterable<core::int> i1, core::List<core::int> l1, dynamic
block {
final core::List<core::int> #t17 = <core::int>[];
for (core::int x in i1)
#t17.{core::List::add}(x);
#t17.{core::List::add}{Invariant}(x);
} =>#t17;
for (core::int x in l1)
x;
block {
final core::List<core::int> #t18 = <core::int>[];
for (core::int x in l1)
#t18.{core::List::add}(x);
#t18.{core::List::add}{Invariant}(x);
} =>#t18;
for (final dynamic #t19 in d as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<dynamic>) {
core::int x = #t19 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
@ -142,7 +142,7 @@ static method ok(core::Iterable<core::int> i1, core::List<core::int> l1, dynamic
final core::List<core::int> #t20 = <core::int>[];
for (final dynamic #t21 in d as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<dynamic>) {
core::int x = #t21 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
#t20.{core::List::add}(x);
#t20.{core::List::add}{Invariant}(x);
}
} =>#t20;
}

View file

@ -71,7 +71,7 @@ static method error(core::Iterable<core::int>? i2, core::List<core::int>? l2, co
^" in i2).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int x = :sync-for-iterator.{core::Iterator::current};
#t2.{core::List::add}(x);
#t2.{core::List::add}{Invariant}(x);
}
}
} =>#t2;
@ -96,7 +96,7 @@ static method error(core::Iterable<core::int>? i2, core::List<core::int>? l2, co
^" in l2).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int x = :sync-for-iterator.{core::Iterator::current};
#t5.{core::List::add}(x);
#t5.{core::List::add}{Invariant}(x);
}
}
} =>#t5;
@ -126,7 +126,7 @@ static method error(core::Iterable<core::int>? i2, core::List<core::int>? l2, co
final dynamic #t11 = :sync-for-iterator.{core::Iterator::current};
{
core::int x = #t11 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
#t9.{core::List::add}(x);
#t9.{core::List::add}{Invariant}(x);
}
}
}
@ -157,7 +157,7 @@ static method error(core::Iterable<core::int>? i2, core::List<core::int>? l2, co
final dynamic #t16 = :sync-for-iterator.{core::Iterator::current};
{
core::int x = #t16 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
#t14.{core::List::add}(x);
#t14.{core::List::add}{Invariant}(x);
}
}
}
@ -177,7 +177,7 @@ static method ok(core::Iterable<core::int> i1, core::List<core::int> l1, dynamic
core::Iterator<core::int> :sync-for-iterator = i1.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int x = :sync-for-iterator.{core::Iterator::current};
#t17.{core::List::add}(x);
#t17.{core::List::add}{Invariant}(x);
}
}
} =>#t17;
@ -194,7 +194,7 @@ static method ok(core::Iterable<core::int> i1, core::List<core::int> l1, dynamic
core::Iterator<core::int> :sync-for-iterator = l1.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int x = :sync-for-iterator.{core::Iterator::current};
#t18.{core::List::add}(x);
#t18.{core::List::add}{Invariant}(x);
}
}
} =>#t18;
@ -216,7 +216,7 @@ static method ok(core::Iterable<core::int> i1, core::List<core::int> l1, dynamic
final dynamic #t21 = :sync-for-iterator.{core::Iterator::current};
{
core::int x = #t21 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
#t20.{core::List::add}(x);
#t20.{core::List::add}{Invariant}(x);
}
}
}

View file

@ -82,14 +82,14 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::List<Never> l1 = block {
final core::List<Never> #t1 = <Never>[];
for (final Never #t2 in n1)
#t1.{core::List::add}(#t2);
#t1.{core::List::add}{Invariant}(#t2);
} =>#t1;
core::List<Never> l2 = block {
final core::List<Never> #t3 = <Never>[];
final core::Iterable<Never>? #t4 = n1;
if(!#t4.{core::Object::==}(null))
for (final Never #t5 in #t4{core::Iterable<Never>})
#t3.{core::List::add}(#t5);
#t3.{core::List::add}{Invariant}(#t5);
} =>#t3;
core::List<dynamic> l3 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:8:16: Error: Can't spread a value with static type 'Never?'.
var l3 = [...n2];
@ -99,7 +99,7 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
final core::Iterable<Never>? #t7 = n2;
if(!#t7.{core::Object::==}(null))
for (final Never #t8 in #t7{core::Iterable<Never>})
#t6.{core::List::add}(#t8);
#t6.{core::List::add}{Invariant}(#t8);
} =>#t6;
core::List<dynamic> l5 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:10:16: Error: Can't spread a value with static type 'Null'.
var l5 = [...n3];
@ -109,65 +109,65 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
final core::Iterable<Never>? #t10 = n3;
if(!#t10.{core::Object::==}(null))
for (final Never #t11 in #t10{core::Iterable<Never>})
#t9.{core::List::add}(#t11);
#t9.{core::List::add}{Invariant}(#t11);
} =>#t9;
core::Set<Never> s1 = block {
final core::Set<Never> #t12 = col::LinkedHashSet::•<Never>();
for (final Never #t13 in n1)
#t12.{core::Set::add}(#t13);
#t12.{core::Set::add}(n1);
#t12.{core::Set::add}{Invariant}(#t13);
#t12.{core::Set::add}{Invariant}(n1);
} =>#t12;
core::Set<Never> s2 = block {
final core::Set<Never> #t14 = col::LinkedHashSet::•<Never>();
final core::Iterable<Never>? #t15 = n1;
if(!#t15.{core::Object::==}(null))
for (final Never #t16 in #t15{core::Iterable<Never>})
#t14.{core::Set::add}(#t16);
#t14.{core::Set::add}(n1);
#t14.{core::Set::add}{Invariant}(#t16);
#t14.{core::Set::add}{Invariant}(n1);
} =>#t14;
core::Set<dynamic> s3 = block {
final core::Set<dynamic> #t17 = col::LinkedHashSet::•<dynamic>();
#t17.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'.
#t17.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'.
var s3 = {...n2, n1};
^");
#t17.{core::Set::add}(n1);
#t17.{core::Set::add}{Invariant}(n1);
} =>#t17;
core::Set<Never> s4 = block {
final core::Set<Never> #t18 = col::LinkedHashSet::•<Never>();
final core::Iterable<Never>? #t19 = n2;
if(!#t19.{core::Object::==}(null))
for (final Never #t20 in #t19{core::Iterable<Never>})
#t18.{core::Set::add}(#t20);
#t18.{core::Set::add}(n1);
#t18.{core::Set::add}{Invariant}(#t20);
#t18.{core::Set::add}{Invariant}(n1);
} =>#t18;
core::Set<dynamic> s5 = block {
final core::Set<dynamic> #t21 = col::LinkedHashSet::•<dynamic>();
#t21.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:16:16: Error: Can't spread a value with static type 'Null'.
#t21.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:16:16: Error: Can't spread a value with static type 'Null'.
var s5 = {...n3, n1};
^");
#t21.{core::Set::add}(n1);
#t21.{core::Set::add}{Invariant}(n1);
} =>#t21;
core::Set<Never> s6 = block {
final core::Set<Never> #t22 = col::LinkedHashSet::•<Never>();
final core::Iterable<Never>? #t23 = n3;
if(!#t23.{core::Object::==}(null))
for (final Never #t24 in #t23{core::Iterable<Never>})
#t22.{core::Set::add}(#t24);
#t22.{core::Set::add}(n1);
#t22.{core::Set::add}{Invariant}(#t24);
#t22.{core::Set::add}{Invariant}(n1);
} =>#t22;
core::Map<Never, Never> m1 = block {
final core::Map<Never, Never> #t25 = <Never, Never>{};
for (final core::MapEntry<Never, Never> #t26 in n1.{core::Map::entries})
#t25.{core::Map::[]=}(#t26.{core::MapEntry::key}, #t26.{core::MapEntry::value});
#t25.{core::Map::[]=}(n1, n1);
#t25.{core::Map::[]=}{Invariant}(#t26.{core::MapEntry::key}, #t26.{core::MapEntry::value});
#t25.{core::Map::[]=}{Invariant}(n1, n1);
} =>#t25;
core::Map<Never, Never> m2 = block {
final core::Map<Never, Never> #t27 = <Never, Never>{};
final core::Map<Never, Never>? #t28 = n1;
if(!#t28.{core::Object::==}(null))
for (final core::MapEntry<Never, Never> #t29 in #t28{core::Map<Never, Never>}.{core::Map::entries})
#t27.{core::Map::[]=}(#t29.{core::MapEntry::key}, #t29.{core::MapEntry::value});
#t27.{core::Map::[]=}(n1, n1);
#t27.{core::Map::[]=}{Invariant}(#t29.{core::MapEntry::key}, #t29.{core::MapEntry::value});
#t27.{core::Map::[]=}{Invariant}(n1, n1);
} =>#t27;
core::Map<dynamic, dynamic> m3 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:20:16: Error: Can't spread a value with static type 'Never?'.
var m3 = {...n2, n1: n1};
@ -177,8 +177,8 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
final core::Map<Never, Never>? #t31 = n2;
if(!#t31.{core::Object::==}(null))
for (final core::MapEntry<Never, Never> #t32 in #t31{core::Map<Never, Never>}.{core::Map::entries})
#t30.{core::Map::[]=}(#t32.{core::MapEntry::key}, #t32.{core::MapEntry::value});
#t30.{core::Map::[]=}(n1, n1);
#t30.{core::Map::[]=}{Invariant}(#t32.{core::MapEntry::key}, #t32.{core::MapEntry::value});
#t30.{core::Map::[]=}{Invariant}(n1, n1);
} =>#t30;
core::Map<dynamic, dynamic> m5 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:22:16: Error: Can't spread a value with static type 'Null'.
var m5 = {...n3, n1: n1};
@ -188,22 +188,22 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
final core::Map<Never, Never>? #t34 = n3;
if(!#t34.{core::Object::==}(null))
for (final core::MapEntry<Never, Never> #t35 in #t34{core::Map<Never, Never>}.{core::Map::entries})
#t33.{core::Map::[]=}(#t35.{core::MapEntry::key}, #t35.{core::MapEntry::value});
#t33.{core::Map::[]=}(n1, n1);
#t33.{core::Map::[]=}{Invariant}(#t35.{core::MapEntry::key}, #t35.{core::MapEntry::value});
#t33.{core::Map::[]=}{Invariant}(n1, n1);
} =>#t33;
}
static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 extends Null = Null>(self::test2::N1 n1, self::test2::N2% n2, self::test2::N3% n3) → dynamic {
core::List<Never> l1 = block {
final core::List<Never> #t36 = <Never>[];
for (final Never #t37 in n1)
#t36.{core::List::add}(#t37);
#t36.{core::List::add}{Invariant}(#t37);
} =>#t36;
core::List<Never> l2 = block {
final core::List<Never> #t38 = <Never>[];
final core::Iterable<Never>? #t39 = n1;
if(!#t39.{core::Object::==}(null))
for (final Never #t40 in #t39{core::Iterable<Never>})
#t38.{core::List::add}(#t40);
#t38.{core::List::add}{Invariant}(#t40);
} =>#t38;
core::List<dynamic> l3 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:30:16: Error: Can't spread a value with static type 'N2'.
var l3 = [...n2];
@ -213,7 +213,7 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
final core::Iterable<Never>? #t42 = n2;
if(!#t42.{core::Object::==}(null))
for (final Never #t43 in #t42{core::Iterable<Never>})
#t41.{core::List::add}(#t43);
#t41.{core::List::add}{Invariant}(#t43);
} =>#t41;
core::List<dynamic> l5 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:32:16: Error: Can't spread a value with static type 'N3'.
var l5 = [...n3];
@ -223,65 +223,65 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
final core::Iterable<Never>? #t45 = n3;
if(!#t45.{core::Object::==}(null))
for (final Never #t46 in #t45{core::Iterable<Never>})
#t44.{core::List::add}(#t46);
#t44.{core::List::add}{Invariant}(#t46);
} =>#t44;
core::Set<self::test2::N1> s1 = block {
final core::Set<self::test2::N1> #t47 = col::LinkedHashSet::•<self::test2::N1>();
for (final self::test2::N1 #t48 in n1)
#t47.{core::Set::add}(#t48);
#t47.{core::Set::add}(n1);
#t47.{core::Set::add}{Invariant}(#t48);
#t47.{core::Set::add}{Invariant}(n1);
} =>#t47;
core::Set<self::test2::N1> s2 = block {
final core::Set<self::test2::N1> #t49 = col::LinkedHashSet::•<self::test2::N1>();
final core::Iterable<self::test2::N1>? #t50 = n1;
if(!#t50.{core::Object::==}(null))
for (final self::test2::N1 #t51 in #t50{core::Iterable<self::test2::N1>})
#t49.{core::Set::add}(#t51);
#t49.{core::Set::add}(n1);
#t49.{core::Set::add}{Invariant}(#t51);
#t49.{core::Set::add}{Invariant}(n1);
} =>#t49;
core::Set<dynamic> s3 = block {
final core::Set<dynamic> #t52 = col::LinkedHashSet::•<dynamic>();
#t52.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'.
#t52.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'.
var s3 = {...n2, n1};
^");
#t52.{core::Set::add}(n1);
#t52.{core::Set::add}{Invariant}(n1);
} =>#t52;
core::Set<self::test2::N1> s4 = block {
final core::Set<self::test2::N1> #t53 = col::LinkedHashSet::•<self::test2::N1>();
final core::Iterable<self::test2::N1>? #t54 = n2;
if(!#t54.{core::Object::==}(null))
for (final self::test2::N1 #t55 in #t54{core::Iterable<self::test2::N1>})
#t53.{core::Set::add}(#t55);
#t53.{core::Set::add}(n1);
#t53.{core::Set::add}{Invariant}(#t55);
#t53.{core::Set::add}{Invariant}(n1);
} =>#t53;
core::Set<dynamic> s5 = block {
final core::Set<dynamic> #t56 = col::LinkedHashSet::•<dynamic>();
#t56.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:38:16: Error: Can't spread a value with static type 'N3'.
#t56.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:38:16: Error: Can't spread a value with static type 'N3'.
var s5 = {...n3, n1};
^");
#t56.{core::Set::add}(n1);
#t56.{core::Set::add}{Invariant}(n1);
} =>#t56;
core::Set<self::test2::N1> s6 = block {
final core::Set<self::test2::N1> #t57 = col::LinkedHashSet::•<self::test2::N1>();
final core::Iterable<self::test2::N1>? #t58 = n3;
if(!#t58.{core::Object::==}(null))
for (final self::test2::N1 #t59 in #t58{core::Iterable<self::test2::N1>})
#t57.{core::Set::add}(#t59);
#t57.{core::Set::add}(n1);
#t57.{core::Set::add}{Invariant}(#t59);
#t57.{core::Set::add}{Invariant}(n1);
} =>#t57;
core::Map<self::test2::N1, self::test2::N1> m1 = block {
final core::Map<self::test2::N1, self::test2::N1> #t60 = <self::test2::N1, self::test2::N1>{};
for (final core::MapEntry<self::test2::N1, self::test2::N1> #t61 in n1.{core::Map::entries})
#t60.{core::Map::[]=}(#t61.{core::MapEntry::key}, #t61.{core::MapEntry::value});
#t60.{core::Map::[]=}(n1, n1);
#t60.{core::Map::[]=}{Invariant}(#t61.{core::MapEntry::key}, #t61.{core::MapEntry::value});
#t60.{core::Map::[]=}{Invariant}(n1, n1);
} =>#t60;
core::Map<self::test2::N1, self::test2::N1> m2 = block {
final core::Map<self::test2::N1, self::test2::N1> #t62 = <self::test2::N1, self::test2::N1>{};
final core::Map<self::test2::N1, self::test2::N1>? #t63 = n1;
if(!#t63.{core::Object::==}(null))
for (final core::MapEntry<self::test2::N1, self::test2::N1> #t64 in #t63{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries})
#t62.{core::Map::[]=}(#t64.{core::MapEntry::key}, #t64.{core::MapEntry::value});
#t62.{core::Map::[]=}(n1, n1);
#t62.{core::Map::[]=}{Invariant}(#t64.{core::MapEntry::key}, #t64.{core::MapEntry::value});
#t62.{core::Map::[]=}{Invariant}(n1, n1);
} =>#t62;
core::Map<dynamic, dynamic> m3 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:42:16: Error: Can't spread a value with static type 'N2'.
var m3 = {...n2, n1: n1};
@ -291,8 +291,8 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
final core::Map<self::test2::N1, self::test2::N1>? #t66 = n2;
if(!#t66.{core::Object::==}(null))
for (final core::MapEntry<self::test2::N1, self::test2::N1> #t67 in #t66{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries})
#t65.{core::Map::[]=}(#t67.{core::MapEntry::key}, #t67.{core::MapEntry::value});
#t65.{core::Map::[]=}(n1, n1);
#t65.{core::Map::[]=}{Invariant}(#t67.{core::MapEntry::key}, #t67.{core::MapEntry::value});
#t65.{core::Map::[]=}{Invariant}(n1, n1);
} =>#t65;
core::Map<dynamic, dynamic> m5 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:44:16: Error: Can't spread a value with static type 'N3'.
var m5 = {...n3, n1: n1};
@ -302,8 +302,8 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
final core::Map<self::test2::N1, self::test2::N1>? #t69 = n3;
if(!#t69.{core::Object::==}(null))
for (final core::MapEntry<self::test2::N1, self::test2::N1> #t70 in #t69{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries})
#t68.{core::Map::[]=}(#t70.{core::MapEntry::key}, #t70.{core::MapEntry::value});
#t68.{core::Map::[]=}(n1, n1);
#t68.{core::Map::[]=}{Invariant}(#t70.{core::MapEntry::key}, #t70.{core::MapEntry::value});
#t68.{core::Map::[]=}{Invariant}(n1, n1);
} =>#t68;
}
static method main() → dynamic {}

View file

@ -82,7 +82,7 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::List<Never> l1 = block {
final core::List<Never> #t1 = <Never>[];
for (final Never #t2 in n1)
#t1.{core::List::add}(#t2);
#t1.{core::List::add}{Invariant}(#t2);
} =>#t1;
core::List<Never> l2 = block {
final core::List<Never> #t3 = <Never>[];
@ -91,7 +91,7 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<Never> :sync-for-iterator = #t4{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t5 = :sync-for-iterator.{core::Iterator::current};
#t3.{core::List::add}(#t5);
#t3.{core::List::add}{Invariant}(#t5);
}
}
} =>#t3;
@ -105,7 +105,7 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<Never> :sync-for-iterator = #t7{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t8 = :sync-for-iterator.{core::Iterator::current};
#t6.{core::List::add}(#t8);
#t6.{core::List::add}{Invariant}(#t8);
}
}
} =>#t6;
@ -119,15 +119,15 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<Never> :sync-for-iterator = #t10{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t11 = :sync-for-iterator.{core::Iterator::current};
#t9.{core::List::add}(#t11);
#t9.{core::List::add}{Invariant}(#t11);
}
}
} =>#t9;
core::Set<Never> s1 = block {
final core::Set<Never> #t12 = new col::_CompactLinkedHashSet::•<Never>();
for (final Never #t13 in n1)
#t12.{core::Set::add}(#t13);
#t12.{core::Set::add}(n1);
#t12.{core::Set::add}{Invariant}(#t13);
#t12.{core::Set::add}{Invariant}(n1);
} =>#t12;
core::Set<Never> s2 = block {
final core::Set<Never> #t14 = new col::_CompactLinkedHashSet::•<Never>();
@ -136,17 +136,17 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<Never> :sync-for-iterator = #t15{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t16 = :sync-for-iterator.{core::Iterator::current};
#t14.{core::Set::add}(#t16);
#t14.{core::Set::add}{Invariant}(#t16);
}
}
#t14.{core::Set::add}(n1);
#t14.{core::Set::add}{Invariant}(n1);
} =>#t14;
core::Set<dynamic> s3 = block {
final core::Set<dynamic> #t17 = new col::_CompactLinkedHashSet::•<dynamic>();
#t17.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'.
#t17.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'.
var s3 = {...n2, n1};
^");
#t17.{core::Set::add}(n1);
#t17.{core::Set::add}{Invariant}(n1);
} =>#t17;
core::Set<Never> s4 = block {
final core::Set<Never> #t18 = new col::_CompactLinkedHashSet::•<Never>();
@ -155,17 +155,17 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<Never> :sync-for-iterator = #t19{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t20 = :sync-for-iterator.{core::Iterator::current};
#t18.{core::Set::add}(#t20);
#t18.{core::Set::add}{Invariant}(#t20);
}
}
#t18.{core::Set::add}(n1);
#t18.{core::Set::add}{Invariant}(n1);
} =>#t18;
core::Set<dynamic> s5 = block {
final core::Set<dynamic> #t21 = new col::_CompactLinkedHashSet::•<dynamic>();
#t21.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:16:16: Error: Can't spread a value with static type 'Null'.
#t21.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:16:16: Error: Can't spread a value with static type 'Null'.
var s5 = {...n3, n1};
^");
#t21.{core::Set::add}(n1);
#t21.{core::Set::add}{Invariant}(n1);
} =>#t21;
core::Set<Never> s6 = block {
final core::Set<Never> #t22 = new col::_CompactLinkedHashSet::•<Never>();
@ -174,10 +174,10 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<Never> :sync-for-iterator = #t23{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t24 = :sync-for-iterator.{core::Iterator::current};
#t22.{core::Set::add}(#t24);
#t22.{core::Set::add}{Invariant}(#t24);
}
}
#t22.{core::Set::add}(n1);
#t22.{core::Set::add}{Invariant}(n1);
} =>#t22;
core::Map<Never, Never> m1 = block {
final core::Map<Never, Never> #t25 = <Never, Never>{};
@ -185,10 +185,10 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<core::MapEntry<<BottomType>, <BottomType>>> :sync-for-iterator = n1.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<Never, Never> #t26 = :sync-for-iterator.{core::Iterator::current};
#t25.{core::Map::[]=}(#t26.{core::MapEntry::key}, #t26.{core::MapEntry::value});
#t25.{core::Map::[]=}{Invariant}(#t26.{core::MapEntry::key}, #t26.{core::MapEntry::value});
}
}
#t25.{core::Map::[]=}(n1, n1);
#t25.{core::Map::[]=}{Invariant}(n1, n1);
} =>#t25;
core::Map<Never, Never> m2 = block {
final core::Map<Never, Never> #t27 = <Never, Never>{};
@ -197,10 +197,10 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<core::MapEntry<Never, Never>> :sync-for-iterator = #t28{core::Map<Never, Never>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<Never, Never> #t29 = :sync-for-iterator.{core::Iterator::current};
#t27.{core::Map::[]=}(#t29.{core::MapEntry::key}, #t29.{core::MapEntry::value});
#t27.{core::Map::[]=}{Invariant}(#t29.{core::MapEntry::key}, #t29.{core::MapEntry::value});
}
}
#t27.{core::Map::[]=}(n1, n1);
#t27.{core::Map::[]=}{Invariant}(n1, n1);
} =>#t27;
core::Map<dynamic, dynamic> m3 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:20:16: Error: Can't spread a value with static type 'Never?'.
var m3 = {...n2, n1: n1};
@ -212,10 +212,10 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<core::MapEntry<Never, Never>> :sync-for-iterator = #t31{core::Map<Never, Never>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<Never, Never> #t32 = :sync-for-iterator.{core::Iterator::current};
#t30.{core::Map::[]=}(#t32.{core::MapEntry::key}, #t32.{core::MapEntry::value});
#t30.{core::Map::[]=}{Invariant}(#t32.{core::MapEntry::key}, #t32.{core::MapEntry::value});
}
}
#t30.{core::Map::[]=}(n1, n1);
#t30.{core::Map::[]=}{Invariant}(n1, n1);
} =>#t30;
core::Map<dynamic, dynamic> m5 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:22:16: Error: Can't spread a value with static type 'Null'.
var m5 = {...n3, n1: n1};
@ -227,17 +227,17 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<core::MapEntry<Never, Never>> :sync-for-iterator = #t34{core::Map<Never, Never>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<Never, Never> #t35 = :sync-for-iterator.{core::Iterator::current};
#t33.{core::Map::[]=}(#t35.{core::MapEntry::key}, #t35.{core::MapEntry::value});
#t33.{core::Map::[]=}{Invariant}(#t35.{core::MapEntry::key}, #t35.{core::MapEntry::value});
}
}
#t33.{core::Map::[]=}(n1, n1);
#t33.{core::Map::[]=}{Invariant}(n1, n1);
} =>#t33;
}
static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 extends Null = Null>(self::test2::N1 n1, self::test2::N2% n2, self::test2::N3% n3) → dynamic {
core::List<Never> l1 = block {
final core::List<Never> #t36 = <Never>[];
for (final Never #t37 in n1)
#t36.{core::List::add}(#t37);
#t36.{core::List::add}{Invariant}(#t37);
} =>#t36;
core::List<Never> l2 = block {
final core::List<Never> #t38 = <Never>[];
@ -246,7 +246,7 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<Never> :sync-for-iterator = #t39{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t40 = :sync-for-iterator.{core::Iterator::current};
#t38.{core::List::add}(#t40);
#t38.{core::List::add}{Invariant}(#t40);
}
}
} =>#t38;
@ -260,7 +260,7 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<Never> :sync-for-iterator = #t42{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t43 = :sync-for-iterator.{core::Iterator::current};
#t41.{core::List::add}(#t43);
#t41.{core::List::add}{Invariant}(#t43);
}
}
} =>#t41;
@ -274,15 +274,15 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<Never> :sync-for-iterator = #t45{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t46 = :sync-for-iterator.{core::Iterator::current};
#t44.{core::List::add}(#t46);
#t44.{core::List::add}{Invariant}(#t46);
}
}
} =>#t44;
core::Set<self::test2::N1> s1 = block {
final core::Set<self::test2::N1> #t47 = new col::_CompactLinkedHashSet::•<self::test2::N1>();
for (final self::test2::N1 #t48 in n1)
#t47.{core::Set::add}(#t48);
#t47.{core::Set::add}(n1);
#t47.{core::Set::add}{Invariant}(#t48);
#t47.{core::Set::add}{Invariant}(n1);
} =>#t47;
core::Set<self::test2::N1> s2 = block {
final core::Set<self::test2::N1> #t49 = new col::_CompactLinkedHashSet::•<self::test2::N1>();
@ -291,17 +291,17 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<self::test2::N1> :sync-for-iterator = #t50{core::Iterable<self::test2::N1>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final self::test2::N1 #t51 = :sync-for-iterator.{core::Iterator::current};
#t49.{core::Set::add}(#t51);
#t49.{core::Set::add}{Invariant}(#t51);
}
}
#t49.{core::Set::add}(n1);
#t49.{core::Set::add}{Invariant}(n1);
} =>#t49;
core::Set<dynamic> s3 = block {
final core::Set<dynamic> #t52 = new col::_CompactLinkedHashSet::•<dynamic>();
#t52.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'.
#t52.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'.
var s3 = {...n2, n1};
^");
#t52.{core::Set::add}(n1);
#t52.{core::Set::add}{Invariant}(n1);
} =>#t52;
core::Set<self::test2::N1> s4 = block {
final core::Set<self::test2::N1> #t53 = new col::_CompactLinkedHashSet::•<self::test2::N1>();
@ -310,17 +310,17 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<self::test2::N1> :sync-for-iterator = #t54{core::Iterable<self::test2::N1>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final self::test2::N1 #t55 = :sync-for-iterator.{core::Iterator::current};
#t53.{core::Set::add}(#t55);
#t53.{core::Set::add}{Invariant}(#t55);
}
}
#t53.{core::Set::add}(n1);
#t53.{core::Set::add}{Invariant}(n1);
} =>#t53;
core::Set<dynamic> s5 = block {
final core::Set<dynamic> #t56 = new col::_CompactLinkedHashSet::•<dynamic>();
#t56.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:38:16: Error: Can't spread a value with static type 'N3'.
#t56.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:38:16: Error: Can't spread a value with static type 'N3'.
var s5 = {...n3, n1};
^");
#t56.{core::Set::add}(n1);
#t56.{core::Set::add}{Invariant}(n1);
} =>#t56;
core::Set<self::test2::N1> s6 = block {
final core::Set<self::test2::N1> #t57 = new col::_CompactLinkedHashSet::•<self::test2::N1>();
@ -329,10 +329,10 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<self::test2::N1> :sync-for-iterator = #t58{core::Iterable<self::test2::N1>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final self::test2::N1 #t59 = :sync-for-iterator.{core::Iterator::current};
#t57.{core::Set::add}(#t59);
#t57.{core::Set::add}{Invariant}(#t59);
}
}
#t57.{core::Set::add}(n1);
#t57.{core::Set::add}{Invariant}(n1);
} =>#t57;
core::Map<self::test2::N1, self::test2::N1> m1 = block {
final core::Map<self::test2::N1, self::test2::N1> #t60 = <self::test2::N1, self::test2::N1>{};
@ -340,10 +340,10 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<core::MapEntry<<BottomType>, <BottomType>>> :sync-for-iterator = n1.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<self::test2::N1, self::test2::N1> #t61 = :sync-for-iterator.{core::Iterator::current};
#t60.{core::Map::[]=}(#t61.{core::MapEntry::key}, #t61.{core::MapEntry::value});
#t60.{core::Map::[]=}{Invariant}(#t61.{core::MapEntry::key}, #t61.{core::MapEntry::value});
}
}
#t60.{core::Map::[]=}(n1, n1);
#t60.{core::Map::[]=}{Invariant}(n1, n1);
} =>#t60;
core::Map<self::test2::N1, self::test2::N1> m2 = block {
final core::Map<self::test2::N1, self::test2::N1> #t62 = <self::test2::N1, self::test2::N1>{};
@ -352,10 +352,10 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<core::MapEntry<self::test2::N1, self::test2::N1>> :sync-for-iterator = #t63{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<self::test2::N1, self::test2::N1> #t64 = :sync-for-iterator.{core::Iterator::current};
#t62.{core::Map::[]=}(#t64.{core::MapEntry::key}, #t64.{core::MapEntry::value});
#t62.{core::Map::[]=}{Invariant}(#t64.{core::MapEntry::key}, #t64.{core::MapEntry::value});
}
}
#t62.{core::Map::[]=}(n1, n1);
#t62.{core::Map::[]=}{Invariant}(n1, n1);
} =>#t62;
core::Map<dynamic, dynamic> m3 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:42:16: Error: Can't spread a value with static type 'N2'.
var m3 = {...n2, n1: n1};
@ -367,10 +367,10 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<core::MapEntry<self::test2::N1, self::test2::N1>> :sync-for-iterator = #t66{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<self::test2::N1, self::test2::N1> #t67 = :sync-for-iterator.{core::Iterator::current};
#t65.{core::Map::[]=}(#t67.{core::MapEntry::key}, #t67.{core::MapEntry::value});
#t65.{core::Map::[]=}{Invariant}(#t67.{core::MapEntry::key}, #t67.{core::MapEntry::value});
}
}
#t65.{core::Map::[]=}(n1, n1);
#t65.{core::Map::[]=}{Invariant}(n1, n1);
} =>#t65;
core::Map<dynamic, dynamic> m5 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:44:16: Error: Can't spread a value with static type 'N3'.
var m5 = {...n3, n1: n1};
@ -382,10 +382,10 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<core::MapEntry<self::test2::N1, self::test2::N1>> :sync-for-iterator = #t69{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<self::test2::N1, self::test2::N1> #t70 = :sync-for-iterator.{core::Iterator::current};
#t68.{core::Map::[]=}(#t70.{core::MapEntry::key}, #t70.{core::MapEntry::value});
#t68.{core::Map::[]=}{Invariant}(#t70.{core::MapEntry::key}, #t70.{core::MapEntry::value});
}
}
#t68.{core::Map::[]=}(n1, n1);
#t68.{core::Map::[]=}{Invariant}(n1, n1);
} =>#t68;
}
static method main() → dynamic {}

View file

@ -83,14 +83,14 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::List<Never> l1 = block {
final core::List<Never> #t1 = <Never>[];
for (final Never #t2 in let final Never #t3 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."))
#t1.{core::List::add}(#t2);
#t1.{core::List::add}{Invariant}(#t2);
} =>#t1;
core::List<Never> l2 = block {
final core::List<Never> #t4 = <Never>[];
final core::Iterable<Never>? #t5 = let final Never #t6 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.");
if(!#t5.{core::Object::==}(null))
for (final Never #t7 in #t5{core::Iterable<Never>})
#t4.{core::List::add}(#t7);
#t4.{core::List::add}{Invariant}(#t7);
} =>#t4;
core::List<dynamic> l3 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:8:16: Error: Can't spread a value with static type 'Never?'.
var l3 = [...n2];
@ -100,7 +100,7 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
final core::Iterable<Never>? #t9 = n2;
if(!#t9.{core::Object::==}(null))
for (final Never #t10 in #t9{core::Iterable<Never>})
#t8.{core::List::add}(#t10);
#t8.{core::List::add}{Invariant}(#t10);
} =>#t8;
core::List<dynamic> l5 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:10:16: Error: Can't spread a value with static type 'Null'.
var l5 = [...n3];
@ -110,65 +110,65 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
final core::Iterable<Never>? #t12 = n3;
if(!#t12.{core::Object::==}(null))
for (final Never #t13 in #t12{core::Iterable<Never>})
#t11.{core::List::add}(#t13);
#t11.{core::List::add}{Invariant}(#t13);
} =>#t11;
core::Set<Never> s1 = block {
final core::Set<Never> #t14 = col::LinkedHashSet::•<Never>();
for (final Never #t15 in let final Never #t16 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."))
#t14.{core::Set::add}(#t15);
#t14.{core::Set::add}(let final Never #t17 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t14.{core::Set::add}{Invariant}(#t15);
#t14.{core::Set::add}{Invariant}(let final Never #t17 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t14;
core::Set<Never> s2 = block {
final core::Set<Never> #t18 = col::LinkedHashSet::•<Never>();
final core::Iterable<Never>? #t19 = let final Never #t20 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.");
if(!#t19.{core::Object::==}(null))
for (final Never #t21 in #t19{core::Iterable<Never>})
#t18.{core::Set::add}(#t21);
#t18.{core::Set::add}(let final Never #t22 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t18.{core::Set::add}{Invariant}(#t21);
#t18.{core::Set::add}{Invariant}(let final Never #t22 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t18;
core::Set<dynamic> s3 = block {
final core::Set<dynamic> #t23 = col::LinkedHashSet::•<dynamic>();
#t23.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'.
#t23.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'.
var s3 = {...n2, n1};
^");
#t23.{core::Set::add}(let final Never #t24 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t23.{core::Set::add}{Invariant}(let final Never #t24 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t23;
core::Set<Never> s4 = block {
final core::Set<Never> #t25 = col::LinkedHashSet::•<Never>();
final core::Iterable<Never>? #t26 = n2;
if(!#t26.{core::Object::==}(null))
for (final Never #t27 in #t26{core::Iterable<Never>})
#t25.{core::Set::add}(#t27);
#t25.{core::Set::add}(let final Never #t28 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t25.{core::Set::add}{Invariant}(#t27);
#t25.{core::Set::add}{Invariant}(let final Never #t28 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t25;
core::Set<dynamic> s5 = block {
final core::Set<dynamic> #t29 = col::LinkedHashSet::•<dynamic>();
#t29.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:16:16: Error: Can't spread a value with static type 'Null'.
#t29.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:16:16: Error: Can't spread a value with static type 'Null'.
var s5 = {...n3, n1};
^");
#t29.{core::Set::add}(let final Never #t30 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t29.{core::Set::add}{Invariant}(let final Never #t30 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t29;
core::Set<Never> s6 = block {
final core::Set<Never> #t31 = col::LinkedHashSet::•<Never>();
final core::Iterable<Never>? #t32 = n3;
if(!#t32.{core::Object::==}(null))
for (final Never #t33 in #t32{core::Iterable<Never>})
#t31.{core::Set::add}(#t33);
#t31.{core::Set::add}(let final Never #t34 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t31.{core::Set::add}{Invariant}(#t33);
#t31.{core::Set::add}{Invariant}(let final Never #t34 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t31;
core::Map<Never, Never> m1 = block {
final core::Map<Never, Never> #t35 = <Never, Never>{};
for (final core::MapEntry<Never, Never> #t36 in (let final Never #t37 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")).{core::Map::entries})
#t35.{core::Map::[]=}(#t36.{core::MapEntry::key}, #t36.{core::MapEntry::value});
#t35.{core::Map::[]=}(let final Never #t38 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t39 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t35.{core::Map::[]=}{Invariant}(#t36.{core::MapEntry::key}, #t36.{core::MapEntry::value});
#t35.{core::Map::[]=}{Invariant}(let final Never #t38 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t39 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t35;
core::Map<Never, Never> m2 = block {
final core::Map<Never, Never> #t40 = <Never, Never>{};
final core::Map<Never, Never>? #t41 = let final Never #t42 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.");
if(!#t41.{core::Object::==}(null))
for (final core::MapEntry<Never, Never> #t43 in #t41{core::Map<Never, Never>}.{core::Map::entries})
#t40.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
#t40.{core::Map::[]=}(let final Never #t44 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t45 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t40.{core::Map::[]=}{Invariant}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
#t40.{core::Map::[]=}{Invariant}(let final Never #t44 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t45 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t40;
core::Map<dynamic, dynamic> m3 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:20:16: Error: Can't spread a value with static type 'Never?'.
var m3 = {...n2, n1: n1};
@ -178,8 +178,8 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
final core::Map<Never, Never>? #t49 = n2;
if(!#t49.{core::Object::==}(null))
for (final core::MapEntry<Never, Never> #t50 in #t49{core::Map<Never, Never>}.{core::Map::entries})
#t48.{core::Map::[]=}(#t50.{core::MapEntry::key}, #t50.{core::MapEntry::value});
#t48.{core::Map::[]=}(let final Never #t51 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t52 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t48.{core::Map::[]=}{Invariant}(#t50.{core::MapEntry::key}, #t50.{core::MapEntry::value});
#t48.{core::Map::[]=}{Invariant}(let final Never #t51 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t52 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t48;
core::Map<dynamic, dynamic> m5 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:22:16: Error: Can't spread a value with static type 'Null'.
var m5 = {...n3, n1: n1};
@ -189,22 +189,22 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
final core::Map<Never, Never>? #t56 = n3;
if(!#t56.{core::Object::==}(null))
for (final core::MapEntry<Never, Never> #t57 in #t56{core::Map<Never, Never>}.{core::Map::entries})
#t55.{core::Map::[]=}(#t57.{core::MapEntry::key}, #t57.{core::MapEntry::value});
#t55.{core::Map::[]=}(let final Never #t58 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t59 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t55.{core::Map::[]=}{Invariant}(#t57.{core::MapEntry::key}, #t57.{core::MapEntry::value});
#t55.{core::Map::[]=}{Invariant}(let final Never #t58 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t59 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t55;
}
static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 extends Null = Null>(self::test2::N1 n1, self::test2::N2% n2, self::test2::N3% n3) → dynamic {
core::List<Never> l1 = block {
final core::List<Never> #t60 = <Never>[];
for (final Never #t61 in let final self::test2::N1 #t62 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."))
#t60.{core::List::add}(#t61);
#t60.{core::List::add}{Invariant}(#t61);
} =>#t60;
core::List<Never> l2 = block {
final core::List<Never> #t63 = <Never>[];
final core::Iterable<Never>? #t64 = let final self::test2::N1 #t65 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.");
if(!#t64.{core::Object::==}(null))
for (final Never #t66 in #t64{core::Iterable<Never>})
#t63.{core::List::add}(#t66);
#t63.{core::List::add}{Invariant}(#t66);
} =>#t63;
core::List<dynamic> l3 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:30:16: Error: Can't spread a value with static type 'N2'.
var l3 = [...n2];
@ -214,7 +214,7 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
final core::Iterable<Never>? #t68 = n2;
if(!#t68.{core::Object::==}(null))
for (final Never #t69 in #t68{core::Iterable<Never>})
#t67.{core::List::add}(#t69);
#t67.{core::List::add}{Invariant}(#t69);
} =>#t67;
core::List<dynamic> l5 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:32:16: Error: Can't spread a value with static type 'N3'.
var l5 = [...n3];
@ -224,65 +224,65 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
final core::Iterable<Never>? #t71 = n3;
if(!#t71.{core::Object::==}(null))
for (final Never #t72 in #t71{core::Iterable<Never>})
#t70.{core::List::add}(#t72);
#t70.{core::List::add}{Invariant}(#t72);
} =>#t70;
core::Set<self::test2::N1> s1 = block {
final core::Set<self::test2::N1> #t73 = col::LinkedHashSet::•<self::test2::N1>();
for (final self::test2::N1 #t74 in let final self::test2::N1 #t75 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."))
#t73.{core::Set::add}(#t74);
#t73.{core::Set::add}(let final self::test2::N1 #t76 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t73.{core::Set::add}{Invariant}(#t74);
#t73.{core::Set::add}{Invariant}(let final self::test2::N1 #t76 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t73;
core::Set<self::test2::N1> s2 = block {
final core::Set<self::test2::N1> #t77 = col::LinkedHashSet::•<self::test2::N1>();
final core::Iterable<self::test2::N1>? #t78 = let final self::test2::N1 #t79 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.");
if(!#t78.{core::Object::==}(null))
for (final self::test2::N1 #t80 in #t78{core::Iterable<self::test2::N1>})
#t77.{core::Set::add}(#t80);
#t77.{core::Set::add}(let final self::test2::N1 #t81 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t77.{core::Set::add}{Invariant}(#t80);
#t77.{core::Set::add}{Invariant}(let final self::test2::N1 #t81 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t77;
core::Set<dynamic> s3 = block {
final core::Set<dynamic> #t82 = col::LinkedHashSet::•<dynamic>();
#t82.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'.
#t82.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'.
var s3 = {...n2, n1};
^");
#t82.{core::Set::add}(let final self::test2::N1 #t83 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t82.{core::Set::add}{Invariant}(let final self::test2::N1 #t83 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t82;
core::Set<self::test2::N1> s4 = block {
final core::Set<self::test2::N1> #t84 = col::LinkedHashSet::•<self::test2::N1>();
final core::Iterable<self::test2::N1>? #t85 = n2;
if(!#t85.{core::Object::==}(null))
for (final self::test2::N1 #t86 in #t85{core::Iterable<self::test2::N1>})
#t84.{core::Set::add}(#t86);
#t84.{core::Set::add}(let final self::test2::N1 #t87 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t84.{core::Set::add}{Invariant}(#t86);
#t84.{core::Set::add}{Invariant}(let final self::test2::N1 #t87 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t84;
core::Set<dynamic> s5 = block {
final core::Set<dynamic> #t88 = col::LinkedHashSet::•<dynamic>();
#t88.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:38:16: Error: Can't spread a value with static type 'N3'.
#t88.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:38:16: Error: Can't spread a value with static type 'N3'.
var s5 = {...n3, n1};
^");
#t88.{core::Set::add}(let final self::test2::N1 #t89 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t88.{core::Set::add}{Invariant}(let final self::test2::N1 #t89 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t88;
core::Set<self::test2::N1> s6 = block {
final core::Set<self::test2::N1> #t90 = col::LinkedHashSet::•<self::test2::N1>();
final core::Iterable<self::test2::N1>? #t91 = n3;
if(!#t91.{core::Object::==}(null))
for (final self::test2::N1 #t92 in #t91{core::Iterable<self::test2::N1>})
#t90.{core::Set::add}(#t92);
#t90.{core::Set::add}(let final self::test2::N1 #t93 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t90.{core::Set::add}{Invariant}(#t92);
#t90.{core::Set::add}{Invariant}(let final self::test2::N1 #t93 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t90;
core::Map<self::test2::N1, self::test2::N1> m1 = block {
final core::Map<self::test2::N1, self::test2::N1> #t94 = <self::test2::N1, self::test2::N1>{};
for (final core::MapEntry<self::test2::N1, self::test2::N1> #t95 in (let final self::test2::N1 #t96 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")).{core::Map::entries})
#t94.{core::Map::[]=}(#t95.{core::MapEntry::key}, #t95.{core::MapEntry::value});
#t94.{core::Map::[]=}(let final self::test2::N1 #t97 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t98 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t94.{core::Map::[]=}{Invariant}(#t95.{core::MapEntry::key}, #t95.{core::MapEntry::value});
#t94.{core::Map::[]=}{Invariant}(let final self::test2::N1 #t97 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t98 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t94;
core::Map<self::test2::N1, self::test2::N1> m2 = block {
final core::Map<self::test2::N1, self::test2::N1> #t99 = <self::test2::N1, self::test2::N1>{};
final core::Map<self::test2::N1, self::test2::N1>? #t100 = let final self::test2::N1 #t101 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.");
if(!#t100.{core::Object::==}(null))
for (final core::MapEntry<self::test2::N1, self::test2::N1> #t102 in #t100{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries})
#t99.{core::Map::[]=}(#t102.{core::MapEntry::key}, #t102.{core::MapEntry::value});
#t99.{core::Map::[]=}(let final self::test2::N1 #t103 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t104 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t99.{core::Map::[]=}{Invariant}(#t102.{core::MapEntry::key}, #t102.{core::MapEntry::value});
#t99.{core::Map::[]=}{Invariant}(let final self::test2::N1 #t103 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t104 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t99;
core::Map<dynamic, dynamic> m3 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:42:16: Error: Can't spread a value with static type 'N2'.
var m3 = {...n2, n1: n1};
@ -292,8 +292,8 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
final core::Map<self::test2::N1, self::test2::N1>? #t108 = n2;
if(!#t108.{core::Object::==}(null))
for (final core::MapEntry<self::test2::N1, self::test2::N1> #t109 in #t108{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries})
#t107.{core::Map::[]=}(#t109.{core::MapEntry::key}, #t109.{core::MapEntry::value});
#t107.{core::Map::[]=}(let final self::test2::N1 #t110 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t111 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t107.{core::Map::[]=}{Invariant}(#t109.{core::MapEntry::key}, #t109.{core::MapEntry::value});
#t107.{core::Map::[]=}{Invariant}(let final self::test2::N1 #t110 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t111 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t107;
core::Map<dynamic, dynamic> m5 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:44:16: Error: Can't spread a value with static type 'N3'.
var m5 = {...n3, n1: n1};
@ -303,8 +303,8 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
final core::Map<self::test2::N1, self::test2::N1>? #t115 = n3;
if(!#t115.{core::Object::==}(null))
for (final core::MapEntry<self::test2::N1, self::test2::N1> #t116 in #t115{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries})
#t114.{core::Map::[]=}(#t116.{core::MapEntry::key}, #t116.{core::MapEntry::value});
#t114.{core::Map::[]=}(let final self::test2::N1 #t117 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t118 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t114.{core::Map::[]=}{Invariant}(#t116.{core::MapEntry::key}, #t116.{core::MapEntry::value});
#t114.{core::Map::[]=}{Invariant}(let final self::test2::N1 #t117 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t118 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t114;
}
static method main() → dynamic {}

View file

@ -83,7 +83,7 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::List<Never> l1 = block {
final core::List<Never> #t1 = <Never>[];
for (final Never #t2 in let final Never #t3 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."))
#t1.{core::List::add}(#t2);
#t1.{core::List::add}{Invariant}(#t2);
} =>#t1;
core::List<Never> l2 = block {
final core::List<Never> #t4 = <Never>[];
@ -92,7 +92,7 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<Never> :sync-for-iterator = #t5{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t7 = :sync-for-iterator.{core::Iterator::current};
#t4.{core::List::add}(#t7);
#t4.{core::List::add}{Invariant}(#t7);
}
}
} =>#t4;
@ -106,7 +106,7 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<Never> :sync-for-iterator = #t9{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t10 = :sync-for-iterator.{core::Iterator::current};
#t8.{core::List::add}(#t10);
#t8.{core::List::add}{Invariant}(#t10);
}
}
} =>#t8;
@ -120,15 +120,15 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<Never> :sync-for-iterator = #t12{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t13 = :sync-for-iterator.{core::Iterator::current};
#t11.{core::List::add}(#t13);
#t11.{core::List::add}{Invariant}(#t13);
}
}
} =>#t11;
core::Set<Never> s1 = block {
final core::Set<Never> #t14 = new col::_CompactLinkedHashSet::•<Never>();
for (final Never #t15 in let final Never #t16 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."))
#t14.{core::Set::add}(#t15);
#t14.{core::Set::add}(let final Never #t17 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t14.{core::Set::add}{Invariant}(#t15);
#t14.{core::Set::add}{Invariant}(let final Never #t17 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t14;
core::Set<Never> s2 = block {
final core::Set<Never> #t18 = new col::_CompactLinkedHashSet::•<Never>();
@ -137,17 +137,17 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<Never> :sync-for-iterator = #t19{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t21 = :sync-for-iterator.{core::Iterator::current};
#t18.{core::Set::add}(#t21);
#t18.{core::Set::add}{Invariant}(#t21);
}
}
#t18.{core::Set::add}(let final Never #t22 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t18.{core::Set::add}{Invariant}(let final Never #t22 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t18;
core::Set<dynamic> s3 = block {
final core::Set<dynamic> #t23 = new col::_CompactLinkedHashSet::•<dynamic>();
#t23.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'.
#t23.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'.
var s3 = {...n2, n1};
^");
#t23.{core::Set::add}(let final Never #t24 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t23.{core::Set::add}{Invariant}(let final Never #t24 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t23;
core::Set<Never> s4 = block {
final core::Set<Never> #t25 = new col::_CompactLinkedHashSet::•<Never>();
@ -156,17 +156,17 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<Never> :sync-for-iterator = #t26{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t27 = :sync-for-iterator.{core::Iterator::current};
#t25.{core::Set::add}(#t27);
#t25.{core::Set::add}{Invariant}(#t27);
}
}
#t25.{core::Set::add}(let final Never #t28 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t25.{core::Set::add}{Invariant}(let final Never #t28 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t25;
core::Set<dynamic> s5 = block {
final core::Set<dynamic> #t29 = new col::_CompactLinkedHashSet::•<dynamic>();
#t29.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:16:16: Error: Can't spread a value with static type 'Null'.
#t29.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:16:16: Error: Can't spread a value with static type 'Null'.
var s5 = {...n3, n1};
^");
#t29.{core::Set::add}(let final Never #t30 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t29.{core::Set::add}{Invariant}(let final Never #t30 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t29;
core::Set<Never> s6 = block {
final core::Set<Never> #t31 = new col::_CompactLinkedHashSet::•<Never>();
@ -175,10 +175,10 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<Never> :sync-for-iterator = #t32{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t33 = :sync-for-iterator.{core::Iterator::current};
#t31.{core::Set::add}(#t33);
#t31.{core::Set::add}{Invariant}(#t33);
}
}
#t31.{core::Set::add}(let final Never #t34 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t31.{core::Set::add}{Invariant}(let final Never #t34 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t31;
core::Map<Never, Never> m1 = block {
final core::Map<Never, Never> #t35 = <Never, Never>{};
@ -186,10 +186,10 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<core::MapEntry<<BottomType>, <BottomType>>> :sync-for-iterator = (let final Never #t36 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")).{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<Never, Never> #t37 = :sync-for-iterator.{core::Iterator::current};
#t35.{core::Map::[]=}(#t37.{core::MapEntry::key}, #t37.{core::MapEntry::value});
#t35.{core::Map::[]=}{Invariant}(#t37.{core::MapEntry::key}, #t37.{core::MapEntry::value});
}
}
#t35.{core::Map::[]=}(let final Never #t38 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t39 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t35.{core::Map::[]=}{Invariant}(let final Never #t38 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t39 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t35;
core::Map<Never, Never> m2 = block {
final core::Map<Never, Never> #t40 = <Never, Never>{};
@ -198,10 +198,10 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<core::MapEntry<Never, Never>> :sync-for-iterator = #t41{core::Map<Never, Never>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<Never, Never> #t43 = :sync-for-iterator.{core::Iterator::current};
#t40.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
#t40.{core::Map::[]=}{Invariant}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
}
}
#t40.{core::Map::[]=}(let final Never #t44 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t45 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t40.{core::Map::[]=}{Invariant}(let final Never #t44 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t45 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t40;
core::Map<dynamic, dynamic> m3 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:20:16: Error: Can't spread a value with static type 'Never?'.
var m3 = {...n2, n1: n1};
@ -213,10 +213,10 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<core::MapEntry<Never, Never>> :sync-for-iterator = #t49{core::Map<Never, Never>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<Never, Never> #t50 = :sync-for-iterator.{core::Iterator::current};
#t48.{core::Map::[]=}(#t50.{core::MapEntry::key}, #t50.{core::MapEntry::value});
#t48.{core::Map::[]=}{Invariant}(#t50.{core::MapEntry::key}, #t50.{core::MapEntry::value});
}
}
#t48.{core::Map::[]=}(let final Never #t51 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t52 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t48.{core::Map::[]=}{Invariant}(let final Never #t51 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t52 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t48;
core::Map<dynamic, dynamic> m5 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:22:16: Error: Can't spread a value with static type 'Null'.
var m5 = {...n3, n1: n1};
@ -228,17 +228,17 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic {
core::Iterator<core::MapEntry<Never, Never>> :sync-for-iterator = #t56{core::Map<Never, Never>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<Never, Never> #t57 = :sync-for-iterator.{core::Iterator::current};
#t55.{core::Map::[]=}(#t57.{core::MapEntry::key}, #t57.{core::MapEntry::value});
#t55.{core::Map::[]=}{Invariant}(#t57.{core::MapEntry::key}, #t57.{core::MapEntry::value});
}
}
#t55.{core::Map::[]=}(let final Never #t58 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t59 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t55.{core::Map::[]=}{Invariant}(let final Never #t58 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t59 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t55;
}
static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 extends Null = Null>(self::test2::N1 n1, self::test2::N2% n2, self::test2::N3% n3) → dynamic {
core::List<Never> l1 = block {
final core::List<Never> #t60 = <Never>[];
for (final Never #t61 in let final self::test2::N1 #t62 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."))
#t60.{core::List::add}(#t61);
#t60.{core::List::add}{Invariant}(#t61);
} =>#t60;
core::List<Never> l2 = block {
final core::List<Never> #t63 = <Never>[];
@ -247,7 +247,7 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<Never> :sync-for-iterator = #t64{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t66 = :sync-for-iterator.{core::Iterator::current};
#t63.{core::List::add}(#t66);
#t63.{core::List::add}{Invariant}(#t66);
}
}
} =>#t63;
@ -261,7 +261,7 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<Never> :sync-for-iterator = #t68{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t69 = :sync-for-iterator.{core::Iterator::current};
#t67.{core::List::add}(#t69);
#t67.{core::List::add}{Invariant}(#t69);
}
}
} =>#t67;
@ -275,15 +275,15 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<Never> :sync-for-iterator = #t71{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t72 = :sync-for-iterator.{core::Iterator::current};
#t70.{core::List::add}(#t72);
#t70.{core::List::add}{Invariant}(#t72);
}
}
} =>#t70;
core::Set<self::test2::N1> s1 = block {
final core::Set<self::test2::N1> #t73 = new col::_CompactLinkedHashSet::•<self::test2::N1>();
for (final self::test2::N1 #t74 in let final self::test2::N1 #t75 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."))
#t73.{core::Set::add}(#t74);
#t73.{core::Set::add}(let final self::test2::N1 #t76 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t73.{core::Set::add}{Invariant}(#t74);
#t73.{core::Set::add}{Invariant}(let final self::test2::N1 #t76 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t73;
core::Set<self::test2::N1> s2 = block {
final core::Set<self::test2::N1> #t77 = new col::_CompactLinkedHashSet::•<self::test2::N1>();
@ -292,17 +292,17 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<self::test2::N1> :sync-for-iterator = #t78{core::Iterable<self::test2::N1>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final self::test2::N1 #t80 = :sync-for-iterator.{core::Iterator::current};
#t77.{core::Set::add}(#t80);
#t77.{core::Set::add}{Invariant}(#t80);
}
}
#t77.{core::Set::add}(let final self::test2::N1 #t81 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t77.{core::Set::add}{Invariant}(let final self::test2::N1 #t81 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t77;
core::Set<dynamic> s3 = block {
final core::Set<dynamic> #t82 = new col::_CompactLinkedHashSet::•<dynamic>();
#t82.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'.
#t82.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'.
var s3 = {...n2, n1};
^");
#t82.{core::Set::add}(let final self::test2::N1 #t83 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t82.{core::Set::add}{Invariant}(let final self::test2::N1 #t83 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t82;
core::Set<self::test2::N1> s4 = block {
final core::Set<self::test2::N1> #t84 = new col::_CompactLinkedHashSet::•<self::test2::N1>();
@ -311,17 +311,17 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<self::test2::N1> :sync-for-iterator = #t85{core::Iterable<self::test2::N1>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final self::test2::N1 #t86 = :sync-for-iterator.{core::Iterator::current};
#t84.{core::Set::add}(#t86);
#t84.{core::Set::add}{Invariant}(#t86);
}
}
#t84.{core::Set::add}(let final self::test2::N1 #t87 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t84.{core::Set::add}{Invariant}(let final self::test2::N1 #t87 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t84;
core::Set<dynamic> s5 = block {
final core::Set<dynamic> #t88 = new col::_CompactLinkedHashSet::•<dynamic>();
#t88.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:38:16: Error: Can't spread a value with static type 'N3'.
#t88.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:38:16: Error: Can't spread a value with static type 'N3'.
var s5 = {...n3, n1};
^");
#t88.{core::Set::add}(let final self::test2::N1 #t89 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t88.{core::Set::add}{Invariant}(let final self::test2::N1 #t89 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t88;
core::Set<self::test2::N1> s6 = block {
final core::Set<self::test2::N1> #t90 = new col::_CompactLinkedHashSet::•<self::test2::N1>();
@ -330,10 +330,10 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<self::test2::N1> :sync-for-iterator = #t91{core::Iterable<self::test2::N1>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final self::test2::N1 #t92 = :sync-for-iterator.{core::Iterator::current};
#t90.{core::Set::add}(#t92);
#t90.{core::Set::add}{Invariant}(#t92);
}
}
#t90.{core::Set::add}(let final self::test2::N1 #t93 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t90.{core::Set::add}{Invariant}(let final self::test2::N1 #t93 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t90;
core::Map<self::test2::N1, self::test2::N1> m1 = block {
final core::Map<self::test2::N1, self::test2::N1> #t94 = <self::test2::N1, self::test2::N1>{};
@ -341,10 +341,10 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<core::MapEntry<<BottomType>, <BottomType>>> :sync-for-iterator = (let final self::test2::N1 #t95 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")).{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<self::test2::N1, self::test2::N1> #t96 = :sync-for-iterator.{core::Iterator::current};
#t94.{core::Map::[]=}(#t96.{core::MapEntry::key}, #t96.{core::MapEntry::value});
#t94.{core::Map::[]=}{Invariant}(#t96.{core::MapEntry::key}, #t96.{core::MapEntry::value});
}
}
#t94.{core::Map::[]=}(let final self::test2::N1 #t97 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t98 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t94.{core::Map::[]=}{Invariant}(let final self::test2::N1 #t97 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t98 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t94;
core::Map<self::test2::N1, self::test2::N1> m2 = block {
final core::Map<self::test2::N1, self::test2::N1> #t99 = <self::test2::N1, self::test2::N1>{};
@ -353,10 +353,10 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<core::MapEntry<self::test2::N1, self::test2::N1>> :sync-for-iterator = #t100{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<self::test2::N1, self::test2::N1> #t102 = :sync-for-iterator.{core::Iterator::current};
#t99.{core::Map::[]=}(#t102.{core::MapEntry::key}, #t102.{core::MapEntry::value});
#t99.{core::Map::[]=}{Invariant}(#t102.{core::MapEntry::key}, #t102.{core::MapEntry::value});
}
}
#t99.{core::Map::[]=}(let final self::test2::N1 #t103 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t104 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t99.{core::Map::[]=}{Invariant}(let final self::test2::N1 #t103 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t104 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t99;
core::Map<dynamic, dynamic> m3 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:42:16: Error: Can't spread a value with static type 'N2'.
var m3 = {...n2, n1: n1};
@ -368,10 +368,10 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<core::MapEntry<self::test2::N1, self::test2::N1>> :sync-for-iterator = #t108{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<self::test2::N1, self::test2::N1> #t109 = :sync-for-iterator.{core::Iterator::current};
#t107.{core::Map::[]=}(#t109.{core::MapEntry::key}, #t109.{core::MapEntry::value});
#t107.{core::Map::[]=}{Invariant}(#t109.{core::MapEntry::key}, #t109.{core::MapEntry::value});
}
}
#t107.{core::Map::[]=}(let final self::test2::N1 #t110 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t111 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t107.{core::Map::[]=}{Invariant}(let final self::test2::N1 #t110 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t111 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t107;
core::Map<dynamic, dynamic> m5 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:44:16: Error: Can't spread a value with static type 'N3'.
var m5 = {...n3, n1: n1};
@ -383,10 +383,10 @@ static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 ext
core::Iterator<core::MapEntry<self::test2::N1, self::test2::N1>> :sync-for-iterator = #t115{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<self::test2::N1, self::test2::N1> #t116 = :sync-for-iterator.{core::Iterator::current};
#t114.{core::Map::[]=}(#t116.{core::MapEntry::key}, #t116.{core::MapEntry::value});
#t114.{core::Map::[]=}{Invariant}(#t116.{core::MapEntry::key}, #t116.{core::MapEntry::value});
}
}
#t114.{core::Map::[]=}(let final self::test2::N1 #t117 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t118 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
#t114.{core::Map::[]=}{Invariant}(let final self::test2::N1 #t117 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t118 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."));
} =>#t114;
}
static method main() → dynamic {}

View file

@ -58,91 +58,91 @@ static field dynamic dynamicList = <core::int>[1, 2, 3];
static field core::Map<dynamic, dynamic> map1 = block {
final core::Map<dynamic, dynamic> #t1 = <dynamic, dynamic>{};
if(self::i.{core::num::>}(0))
#t1.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:16:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t1.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:16:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...nullableMap, // error
^", null);
if(self::i.{core::num::>}(0))
for (final core::MapEntry<dynamic, dynamic> #t2 in (self::dynamicMap as{TypeError,ForDynamic,ForNonNullableByDefault} core::Map<dynamic, dynamic>).{core::Map::entries})
#t1.{core::Map::[]=}(#t2.{core::MapEntry::key}, #t2.{core::MapEntry::value});
#t1.{core::Map::[]=}{Invariant}(#t2.{core::MapEntry::key}, #t2.{core::MapEntry::value});
if(self::i.{core::num::>}(0))
for (final core::MapEntry<dynamic, dynamic> #t3 in self::nullableMap!.{core::Map::entries})
#t1.{core::Map::[]=}(#t3.{core::MapEntry::key}, #t3.{core::MapEntry::value});
#t1.{core::Map::[]=}{Invariant}(#t3.{core::MapEntry::key}, #t3.{core::MapEntry::value});
} =>#t1;
static field core::Set<dynamic> set1 = block {
final core::Set<dynamic> #t4 = col::LinkedHashSet::•<dynamic>();
#t4.{core::Set::add}(0);
#t4.{core::Set::add}{Invariant}(0);
if(self::i.{core::num::>}(0))
#t4.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:23:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t4.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:23:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...nullableList, // error
^");
if(self::i.{core::num::>}(0))
for (final dynamic #t5 in self::dynamicList as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<dynamic>)
#t4.{core::Set::add}(#t5);
#t4.{core::Set::add}{Invariant}(#t5);
if(self::i.{core::num::>}(0))
for (final dynamic #t6 in self::nullableList!)
#t4.{core::Set::add}(#t6);
#t4.{core::Set::add}{Invariant}(#t6);
} =>#t4;
static field core::List<dynamic> list1 = block {
final core::List<dynamic> #t7 = <dynamic>[];
if(self::i.{core::num::>}(0))
#t7.{core::List::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:29:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t7.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:29:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...nullableList, // error
^");
if(self::i.{core::num::>}(0))
for (final dynamic #t8 in self::dynamicList as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<dynamic>)
#t7.{core::List::add}(#t8);
#t7.{core::List::add}{Invariant}(#t8);
if(self::i.{core::num::>}(0))
for (final dynamic #t9 in self::nullableList!)
#t7.{core::List::add}(#t9);
#t7.{core::List::add}{Invariant}(#t9);
} =>#t7;
static method testMap<X extends dynamic = dynamic, Y extends core::Map<core::int, core::String>? = core::Map<core::int, core::String>?, Z extends core::Map<core::int, core::String> = core::Map<core::int, core::String>>(self::testMap::X% x, self::testMap::Y% y, self::testMap::Z z) → dynamic {
core::Map<dynamic, dynamic> map2 = block {
final core::Map<dynamic, dynamic> #t10 = <dynamic, dynamic>{};
if(self::i.{core::num::>}(0))
#t10.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:37:19: Error: Unexpected type 'X' of a map spread entry. Expected 'dynamic' or a Map.
#t10.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:37:19: Error: Unexpected type 'X' of a map spread entry. Expected 'dynamic' or a Map.
if (i > 0) ...x, // error
^", null);
if(self::i.{core::num::>}(0))
#t10.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:38:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t10.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:38:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...y, // error
^", null);
if(self::i.{core::num::>}(0))
for (final core::MapEntry<dynamic, dynamic> #t11 in z.{core::Map::entries})
#t10.{core::Map::[]=}(#t11.{core::MapEntry::key}, #t11.{core::MapEntry::value});
#t10.{core::Map::[]=}{Invariant}(#t11.{core::MapEntry::key}, #t11.{core::MapEntry::value});
if(self::i.{core::num::>}(0))
for (final core::MapEntry<dynamic, dynamic> #t12 in y!.{core::Map::entries})
#t10.{core::Map::[]=}(#t12.{core::MapEntry::key}, #t12.{core::MapEntry::value});
#t10.{core::Map::[]=}{Invariant}(#t12.{core::MapEntry::key}, #t12.{core::MapEntry::value});
} =>#t10;
}
static method testIterables<X extends dynamic = dynamic, Y extends core::List<core::int>? = core::List<core::int>?, Z extends core::List<core::int> = core::List<core::int>>(self::testIterables::X% x, self::testIterables::Y% y, self::testIterables::Z z) → dynamic {
core::Set<dynamic> set2 = block {
final core::Set<dynamic> #t13 = col::LinkedHashSet::•<dynamic>();
#t13.{core::Set::add}(0);
#t13.{core::Set::add}{Invariant}(0);
if(self::i.{core::num::>}(0))
#t13.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:48:19: Error: Unexpected type 'X' of a spread. Expected 'dynamic' or an Iterable.
#t13.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:48:19: Error: Unexpected type 'X' of a spread. Expected 'dynamic' or an Iterable.
if (i > 0) ...x, // error
^");
if(self::i.{core::num::>}(0))
#t13.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:49:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t13.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:49:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...y, // error
^");
if(self::i.{core::num::>}(0))
for (final dynamic #t14 in z)
#t13.{core::Set::add}(#t14);
#t13.{core::Set::add}{Invariant}(#t14);
} =>#t13;
core::List<dynamic> list2 = block {
final core::List<dynamic> #t15 = <dynamic>[];
if(self::i.{core::num::>}(0))
#t15.{core::List::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:53:19: Error: Unexpected type 'X' of a spread. Expected 'dynamic' or an Iterable.
#t15.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:53:19: Error: Unexpected type 'X' of a spread. Expected 'dynamic' or an Iterable.
if (i > 0) ...x, // error
^");
if(self::i.{core::num::>}(0))
#t15.{core::List::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:54:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t15.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:54:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...y, // error
^");
if(self::i.{core::num::>}(0))
for (final dynamic #t16 in z)
#t15.{core::List::add}(#t16);
#t15.{core::List::add}{Invariant}(#t16);
} =>#t15;
}
static method main() → dynamic {}

View file

@ -58,64 +58,64 @@ static field dynamic dynamicList = <core::int>[1, 2, 3];
static field core::Map<dynamic, dynamic> map1 = block {
final core::Map<dynamic, dynamic> #t1 = <dynamic, dynamic>{};
if(self::i.{core::num::>}(0))
#t1.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:16:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t1.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:16:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...nullableMap, // error
^", null);
if(self::i.{core::num::>}(0)) {
core::Iterator<core::MapEntry<dynamic, dynamic>> :sync-for-iterator = (self::dynamicMap as{TypeError,ForDynamic,ForNonNullableByDefault} core::Map<dynamic, dynamic>).{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic> #t2 = :sync-for-iterator.{core::Iterator::current};
#t1.{core::Map::[]=}(#t2.{core::MapEntry::key}, #t2.{core::MapEntry::value});
#t1.{core::Map::[]=}{Invariant}(#t2.{core::MapEntry::key}, #t2.{core::MapEntry::value});
}
}
if(self::i.{core::num::>}(0)) {
core::Iterator<core::MapEntry<core::int, core::String>> :sync-for-iterator = self::nullableMap!.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic> #t3 = :sync-for-iterator.{core::Iterator::current};
#t1.{core::Map::[]=}(#t3.{core::MapEntry::key}, #t3.{core::MapEntry::value});
#t1.{core::Map::[]=}{Invariant}(#t3.{core::MapEntry::key}, #t3.{core::MapEntry::value});
}
}
} =>#t1;
static field core::Set<dynamic> set1 = block {
final core::Set<dynamic> #t4 = new col::_CompactLinkedHashSet::•<dynamic>();
#t4.{core::Set::add}(0);
#t4.{core::Set::add}{Invariant}(0);
if(self::i.{core::num::>}(0))
#t4.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:23:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t4.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:23:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...nullableList, // error
^");
if(self::i.{core::num::>}(0)) {
core::Iterator<dynamic> :sync-for-iterator = (self::dynamicList as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<dynamic>).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t5 = :sync-for-iterator.{core::Iterator::current};
#t4.{core::Set::add}(#t5);
#t4.{core::Set::add}{Invariant}(#t5);
}
}
if(self::i.{core::num::>}(0)) {
core::Iterator<core::int> :sync-for-iterator = self::nullableList!.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t6 = :sync-for-iterator.{core::Iterator::current};
#t4.{core::Set::add}(#t6);
#t4.{core::Set::add}{Invariant}(#t6);
}
}
} =>#t4;
static field core::List<dynamic> list1 = block {
final core::List<dynamic> #t7 = <dynamic>[];
if(self::i.{core::num::>}(0))
#t7.{core::List::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:29:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t7.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:29:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...nullableList, // error
^");
if(self::i.{core::num::>}(0)) {
core::Iterator<dynamic> :sync-for-iterator = (self::dynamicList as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<dynamic>).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t8 = :sync-for-iterator.{core::Iterator::current};
#t7.{core::List::add}(#t8);
#t7.{core::List::add}{Invariant}(#t8);
}
}
if(self::i.{core::num::>}(0)) {
core::Iterator<core::int> :sync-for-iterator = self::nullableList!.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t9 = :sync-for-iterator.{core::Iterator::current};
#t7.{core::List::add}(#t9);
#t7.{core::List::add}{Invariant}(#t9);
}
}
} =>#t7;
@ -123,25 +123,25 @@ static method testMap<X extends dynamic = dynamic, Y extends core::Map<core::int
core::Map<dynamic, dynamic> map2 = block {
final core::Map<dynamic, dynamic> #t10 = <dynamic, dynamic>{};
if(self::i.{core::num::>}(0))
#t10.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:37:19: Error: Unexpected type 'X' of a map spread entry. Expected 'dynamic' or a Map.
#t10.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:37:19: Error: Unexpected type 'X' of a map spread entry. Expected 'dynamic' or a Map.
if (i > 0) ...x, // error
^", null);
if(self::i.{core::num::>}(0))
#t10.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:38:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t10.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:38:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...y, // error
^", null);
if(self::i.{core::num::>}(0)) {
core::Iterator<core::MapEntry<core::int, core::String>> :sync-for-iterator = z.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic> #t11 = :sync-for-iterator.{core::Iterator::current};
#t10.{core::Map::[]=}(#t11.{core::MapEntry::key}, #t11.{core::MapEntry::value});
#t10.{core::Map::[]=}{Invariant}(#t11.{core::MapEntry::key}, #t11.{core::MapEntry::value});
}
}
if(self::i.{core::num::>}(0)) {
core::Iterator<core::MapEntry<core::int, core::String>> :sync-for-iterator = y!.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic> #t12 = :sync-for-iterator.{core::Iterator::current};
#t10.{core::Map::[]=}(#t12.{core::MapEntry::key}, #t12.{core::MapEntry::value});
#t10.{core::Map::[]=}{Invariant}(#t12.{core::MapEntry::key}, #t12.{core::MapEntry::value});
}
}
} =>#t10;
@ -149,38 +149,38 @@ static method testMap<X extends dynamic = dynamic, Y extends core::Map<core::int
static method testIterables<X extends dynamic = dynamic, Y extends core::List<core::int>? = core::List<core::int>?, Z extends core::List<core::int> = core::List<core::int>>(self::testIterables::X% x, self::testIterables::Y% y, self::testIterables::Z z) → dynamic {
core::Set<dynamic> set2 = block {
final core::Set<dynamic> #t13 = new col::_CompactLinkedHashSet::•<dynamic>();
#t13.{core::Set::add}(0);
#t13.{core::Set::add}{Invariant}(0);
if(self::i.{core::num::>}(0))
#t13.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:48:19: Error: Unexpected type 'X' of a spread. Expected 'dynamic' or an Iterable.
#t13.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:48:19: Error: Unexpected type 'X' of a spread. Expected 'dynamic' or an Iterable.
if (i > 0) ...x, // error
^");
if(self::i.{core::num::>}(0))
#t13.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:49:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t13.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:49:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...y, // error
^");
if(self::i.{core::num::>}(0)) {
core::Iterator<core::int> :sync-for-iterator = z.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t14 = :sync-for-iterator.{core::Iterator::current};
#t13.{core::Set::add}(#t14);
#t13.{core::Set::add}{Invariant}(#t14);
}
}
} =>#t13;
core::List<dynamic> list2 = block {
final core::List<dynamic> #t15 = <dynamic>[];
if(self::i.{core::num::>}(0))
#t15.{core::List::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:53:19: Error: Unexpected type 'X' of a spread. Expected 'dynamic' or an Iterable.
#t15.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:53:19: Error: Unexpected type 'X' of a spread. Expected 'dynamic' or an Iterable.
if (i > 0) ...x, // error
^");
if(self::i.{core::num::>}(0))
#t15.{core::List::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:54:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t15.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:54:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...y, // error
^");
if(self::i.{core::num::>}(0)) {
core::Iterator<core::int> :sync-for-iterator = z.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t16 = :sync-for-iterator.{core::Iterator::current};
#t15.{core::List::add}(#t16);
#t15.{core::List::add}{Invariant}(#t16);
}
}
} =>#t15;

View file

@ -58,91 +58,91 @@ static field dynamic dynamicList = <core::int>[1, 2, 3];
static field core::Map<dynamic, dynamic> map1 = block {
final core::Map<dynamic, dynamic> #t1 = <dynamic, dynamic>{};
if(self::i.{core::num::>}(0))
#t1.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:16:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t1.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:16:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...nullableMap, // error
^", null);
if(self::i.{core::num::>}(0))
for (final core::MapEntry<dynamic, dynamic> #t2 in (self::dynamicMap as{TypeError,ForDynamic,ForNonNullableByDefault} core::Map<dynamic, dynamic>).{core::Map::entries})
#t1.{core::Map::[]=}(#t2.{core::MapEntry::key}, #t2.{core::MapEntry::value});
#t1.{core::Map::[]=}{Invariant}(#t2.{core::MapEntry::key}, #t2.{core::MapEntry::value});
if(self::i.{core::num::>}(0))
for (final core::MapEntry<dynamic, dynamic> #t3 in self::nullableMap!.{core::Map::entries})
#t1.{core::Map::[]=}(#t3.{core::MapEntry::key}, #t3.{core::MapEntry::value});
#t1.{core::Map::[]=}{Invariant}(#t3.{core::MapEntry::key}, #t3.{core::MapEntry::value});
} =>#t1;
static field core::Set<dynamic> set1 = block {
final core::Set<dynamic> #t4 = col::LinkedHashSet::•<dynamic>();
#t4.{core::Set::add}(0);
#t4.{core::Set::add}{Invariant}(0);
if(self::i.{core::num::>}(0))
#t4.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:23:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t4.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:23:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...nullableList, // error
^");
if(self::i.{core::num::>}(0))
for (final dynamic #t5 in self::dynamicList as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<dynamic>)
#t4.{core::Set::add}(#t5);
#t4.{core::Set::add}{Invariant}(#t5);
if(self::i.{core::num::>}(0))
for (final dynamic #t6 in self::nullableList!)
#t4.{core::Set::add}(#t6);
#t4.{core::Set::add}{Invariant}(#t6);
} =>#t4;
static field core::List<dynamic> list1 = block {
final core::List<dynamic> #t7 = <dynamic>[];
if(self::i.{core::num::>}(0))
#t7.{core::List::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:29:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t7.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:29:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...nullableList, // error
^");
if(self::i.{core::num::>}(0))
for (final dynamic #t8 in self::dynamicList as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<dynamic>)
#t7.{core::List::add}(#t8);
#t7.{core::List::add}{Invariant}(#t8);
if(self::i.{core::num::>}(0))
for (final dynamic #t9 in self::nullableList!)
#t7.{core::List::add}(#t9);
#t7.{core::List::add}{Invariant}(#t9);
} =>#t7;
static method testMap<X extends dynamic = dynamic, Y extends core::Map<core::int, core::String>? = core::Map<core::int, core::String>?, Z extends core::Map<core::int, core::String> = core::Map<core::int, core::String>>(self::testMap::X% x, self::testMap::Y% y, self::testMap::Z z) → dynamic {
core::Map<dynamic, dynamic> map2 = block {
final core::Map<dynamic, dynamic> #t10 = <dynamic, dynamic>{};
if(self::i.{core::num::>}(0))
#t10.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:37:19: Error: Unexpected type 'X' of a map spread entry. Expected 'dynamic' or a Map.
#t10.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:37:19: Error: Unexpected type 'X' of a map spread entry. Expected 'dynamic' or a Map.
if (i > 0) ...x, // error
^", null);
if(self::i.{core::num::>}(0))
#t10.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:38:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t10.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:38:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...y, // error
^", null);
if(self::i.{core::num::>}(0))
for (final core::MapEntry<dynamic, dynamic> #t11 in z.{core::Map::entries})
#t10.{core::Map::[]=}(#t11.{core::MapEntry::key}, #t11.{core::MapEntry::value});
#t10.{core::Map::[]=}{Invariant}(#t11.{core::MapEntry::key}, #t11.{core::MapEntry::value});
if(self::i.{core::num::>}(0))
for (final core::MapEntry<dynamic, dynamic> #t12 in y!.{core::Map::entries})
#t10.{core::Map::[]=}(#t12.{core::MapEntry::key}, #t12.{core::MapEntry::value});
#t10.{core::Map::[]=}{Invariant}(#t12.{core::MapEntry::key}, #t12.{core::MapEntry::value});
} =>#t10;
}
static method testIterables<X extends dynamic = dynamic, Y extends core::List<core::int>? = core::List<core::int>?, Z extends core::List<core::int> = core::List<core::int>>(self::testIterables::X% x, self::testIterables::Y% y, self::testIterables::Z z) → dynamic {
core::Set<dynamic> set2 = block {
final core::Set<dynamic> #t13 = col::LinkedHashSet::•<dynamic>();
#t13.{core::Set::add}(0);
#t13.{core::Set::add}{Invariant}(0);
if(self::i.{core::num::>}(0))
#t13.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:48:19: Error: Unexpected type 'X' of a spread. Expected 'dynamic' or an Iterable.
#t13.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:48:19: Error: Unexpected type 'X' of a spread. Expected 'dynamic' or an Iterable.
if (i > 0) ...x, // error
^");
if(self::i.{core::num::>}(0))
#t13.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:49:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t13.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:49:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...y, // error
^");
if(self::i.{core::num::>}(0))
for (final dynamic #t14 in z)
#t13.{core::Set::add}(#t14);
#t13.{core::Set::add}{Invariant}(#t14);
} =>#t13;
core::List<dynamic> list2 = block {
final core::List<dynamic> #t15 = <dynamic>[];
if(self::i.{core::num::>}(0))
#t15.{core::List::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:53:19: Error: Unexpected type 'X' of a spread. Expected 'dynamic' or an Iterable.
#t15.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:53:19: Error: Unexpected type 'X' of a spread. Expected 'dynamic' or an Iterable.
if (i > 0) ...x, // error
^");
if(self::i.{core::num::>}(0))
#t15.{core::List::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:54:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t15.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:54:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...y, // error
^");
if(self::i.{core::num::>}(0))
for (final dynamic #t16 in z)
#t15.{core::List::add}(#t16);
#t15.{core::List::add}{Invariant}(#t16);
} =>#t15;
}
static method main() → dynamic {}

View file

@ -58,64 +58,64 @@ static field dynamic dynamicList = <core::int>[1, 2, 3];
static field core::Map<dynamic, dynamic> map1 = block {
final core::Map<dynamic, dynamic> #t1 = <dynamic, dynamic>{};
if(self::i.{core::num::>}(0))
#t1.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:16:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t1.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:16:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...nullableMap, // error
^", null);
if(self::i.{core::num::>}(0)) {
core::Iterator<core::MapEntry<dynamic, dynamic>> :sync-for-iterator = (self::dynamicMap as{TypeError,ForDynamic,ForNonNullableByDefault} core::Map<dynamic, dynamic>).{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic> #t2 = :sync-for-iterator.{core::Iterator::current};
#t1.{core::Map::[]=}(#t2.{core::MapEntry::key}, #t2.{core::MapEntry::value});
#t1.{core::Map::[]=}{Invariant}(#t2.{core::MapEntry::key}, #t2.{core::MapEntry::value});
}
}
if(self::i.{core::num::>}(0)) {
core::Iterator<core::MapEntry<core::int, core::String>> :sync-for-iterator = self::nullableMap!.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic> #t3 = :sync-for-iterator.{core::Iterator::current};
#t1.{core::Map::[]=}(#t3.{core::MapEntry::key}, #t3.{core::MapEntry::value});
#t1.{core::Map::[]=}{Invariant}(#t3.{core::MapEntry::key}, #t3.{core::MapEntry::value});
}
}
} =>#t1;
static field core::Set<dynamic> set1 = block {
final core::Set<dynamic> #t4 = new col::_CompactLinkedHashSet::•<dynamic>();
#t4.{core::Set::add}(0);
#t4.{core::Set::add}{Invariant}(0);
if(self::i.{core::num::>}(0))
#t4.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:23:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t4.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:23:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...nullableList, // error
^");
if(self::i.{core::num::>}(0)) {
core::Iterator<dynamic> :sync-for-iterator = (self::dynamicList as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<dynamic>).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t5 = :sync-for-iterator.{core::Iterator::current};
#t4.{core::Set::add}(#t5);
#t4.{core::Set::add}{Invariant}(#t5);
}
}
if(self::i.{core::num::>}(0)) {
core::Iterator<core::int> :sync-for-iterator = self::nullableList!.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t6 = :sync-for-iterator.{core::Iterator::current};
#t4.{core::Set::add}(#t6);
#t4.{core::Set::add}{Invariant}(#t6);
}
}
} =>#t4;
static field core::List<dynamic> list1 = block {
final core::List<dynamic> #t7 = <dynamic>[];
if(self::i.{core::num::>}(0))
#t7.{core::List::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:29:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t7.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:29:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...nullableList, // error
^");
if(self::i.{core::num::>}(0)) {
core::Iterator<dynamic> :sync-for-iterator = (self::dynamicList as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<dynamic>).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t8 = :sync-for-iterator.{core::Iterator::current};
#t7.{core::List::add}(#t8);
#t7.{core::List::add}{Invariant}(#t8);
}
}
if(self::i.{core::num::>}(0)) {
core::Iterator<core::int> :sync-for-iterator = self::nullableList!.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t9 = :sync-for-iterator.{core::Iterator::current};
#t7.{core::List::add}(#t9);
#t7.{core::List::add}{Invariant}(#t9);
}
}
} =>#t7;
@ -123,25 +123,25 @@ static method testMap<X extends dynamic = dynamic, Y extends core::Map<core::int
core::Map<dynamic, dynamic> map2 = block {
final core::Map<dynamic, dynamic> #t10 = <dynamic, dynamic>{};
if(self::i.{core::num::>}(0))
#t10.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:37:19: Error: Unexpected type 'X' of a map spread entry. Expected 'dynamic' or a Map.
#t10.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:37:19: Error: Unexpected type 'X' of a map spread entry. Expected 'dynamic' or a Map.
if (i > 0) ...x, // error
^", null);
if(self::i.{core::num::>}(0))
#t10.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:38:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t10.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:38:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...y, // error
^", null);
if(self::i.{core::num::>}(0)) {
core::Iterator<core::MapEntry<core::int, core::String>> :sync-for-iterator = z.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic> #t11 = :sync-for-iterator.{core::Iterator::current};
#t10.{core::Map::[]=}(#t11.{core::MapEntry::key}, #t11.{core::MapEntry::value});
#t10.{core::Map::[]=}{Invariant}(#t11.{core::MapEntry::key}, #t11.{core::MapEntry::value});
}
}
if(self::i.{core::num::>}(0)) {
core::Iterator<core::MapEntry<core::int, core::String>> :sync-for-iterator = y!.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic> #t12 = :sync-for-iterator.{core::Iterator::current};
#t10.{core::Map::[]=}(#t12.{core::MapEntry::key}, #t12.{core::MapEntry::value});
#t10.{core::Map::[]=}{Invariant}(#t12.{core::MapEntry::key}, #t12.{core::MapEntry::value});
}
}
} =>#t10;
@ -149,38 +149,38 @@ static method testMap<X extends dynamic = dynamic, Y extends core::Map<core::int
static method testIterables<X extends dynamic = dynamic, Y extends core::List<core::int>? = core::List<core::int>?, Z extends core::List<core::int> = core::List<core::int>>(self::testIterables::X% x, self::testIterables::Y% y, self::testIterables::Z z) → dynamic {
core::Set<dynamic> set2 = block {
final core::Set<dynamic> #t13 = new col::_CompactLinkedHashSet::•<dynamic>();
#t13.{core::Set::add}(0);
#t13.{core::Set::add}{Invariant}(0);
if(self::i.{core::num::>}(0))
#t13.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:48:19: Error: Unexpected type 'X' of a spread. Expected 'dynamic' or an Iterable.
#t13.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:48:19: Error: Unexpected type 'X' of a spread. Expected 'dynamic' or an Iterable.
if (i > 0) ...x, // error
^");
if(self::i.{core::num::>}(0))
#t13.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:49:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t13.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:49:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...y, // error
^");
if(self::i.{core::num::>}(0)) {
core::Iterator<core::int> :sync-for-iterator = z.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t14 = :sync-for-iterator.{core::Iterator::current};
#t13.{core::Set::add}(#t14);
#t13.{core::Set::add}{Invariant}(#t14);
}
}
} =>#t13;
core::List<dynamic> list2 = block {
final core::List<dynamic> #t15 = <dynamic>[];
if(self::i.{core::num::>}(0))
#t15.{core::List::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:53:19: Error: Unexpected type 'X' of a spread. Expected 'dynamic' or an Iterable.
#t15.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:53:19: Error: Unexpected type 'X' of a spread. Expected 'dynamic' or an Iterable.
if (i > 0) ...x, // error
^");
if(self::i.{core::num::>}(0))
#t15.{core::List::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:54:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t15.{core::List::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:54:19: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
if (i > 0) ...y, // error
^");
if(self::i.{core::num::>}(0)) {
core::Iterator<core::int> :sync-for-iterator = z.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t16 = :sync-for-iterator.{core::Iterator::current};
#t15.{core::List::add}(#t16);
#t15.{core::List::add}{Invariant}(#t16);
}
}
} =>#t15;

View file

@ -10,23 +10,23 @@ class C<X extends core::Object? = core::Object?, Y extends core::Object = core::
method test(generic-covariant-impl self::C::X% x, generic-covariant-impl self::C::Y? y) → dynamic {
core::Set<core::Object?> v = block {
final core::Set<core::Object?> #t1 = col::LinkedHashSet::•<core::Object?>();
#t1.{core::Set::add}(x);
#t1.{core::Set::add}(42);
#t1.{core::Set::add}{Invariant}(x);
#t1.{core::Set::add}{Invariant}(42);
} =>#t1;
core::Set<core::Object?> w = block {
final core::Set<core::Object?> #t2 = col::LinkedHashSet::•<core::Object?>();
#t2.{core::Set::add}(42);
#t2.{core::Set::add}(x);
#t2.{core::Set::add}{Invariant}(42);
#t2.{core::Set::add}{Invariant}(x);
} =>#t2;
core::Set<core::Object?> p = block {
final core::Set<core::Object?> #t3 = col::LinkedHashSet::•<core::Object?>();
#t3.{core::Set::add}(y);
#t3.{core::Set::add}(42);
#t3.{core::Set::add}{Invariant}(y);
#t3.{core::Set::add}{Invariant}(42);
} =>#t3;
core::Set<core::Object?> q = block {
final core::Set<core::Object?> #t4 = col::LinkedHashSet::•<core::Object?>();
#t4.{core::Set::add}(42);
#t4.{core::Set::add}(y);
#t4.{core::Set::add}{Invariant}(42);
#t4.{core::Set::add}{Invariant}(y);
} =>#t4;
self::assertRightSubtype(v);
self::assertLeftSubtype<core::Set<core::Object?>>(v);
@ -39,13 +39,13 @@ class C<X extends core::Object? = core::Object?, Y extends core::Object = core::
if(x is{ForNonNullableByDefault} core::Object?) {
core::Set<core::Object?> v = block {
final core::Set<core::Object?> #t5 = col::LinkedHashSet::•<core::Object?>();
#t5.{core::Set::add}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */});
#t5.{core::Set::add}(42);
#t5.{core::Set::add}{Invariant}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */});
#t5.{core::Set::add}{Invariant}(42);
} =>#t5;
core::Set<core::Object?> w = block {
final core::Set<core::Object?> #t6 = col::LinkedHashSet::•<core::Object?>();
#t6.{core::Set::add}(42);
#t6.{core::Set::add}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */});
#t6.{core::Set::add}{Invariant}(42);
#t6.{core::Set::add}{Invariant}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */});
} =>#t6;
self::assertRightSubtype(v);
self::assertLeftSubtype<core::Set<core::Object?>>(v);

View file

@ -10,23 +10,23 @@ class C<X extends core::Object? = core::Object?, Y extends core::Object = core::
method test(generic-covariant-impl self::C::X% x, generic-covariant-impl self::C::Y? y) → dynamic {
core::Set<core::Object?> v = block {
final core::Set<core::Object?> #t1 = new col::_CompactLinkedHashSet::•<core::Object?>();
#t1.{core::Set::add}(x);
#t1.{core::Set::add}(42);
#t1.{core::Set::add}{Invariant}(x);
#t1.{core::Set::add}{Invariant}(42);
} =>#t1;
core::Set<core::Object?> w = block {
final core::Set<core::Object?> #t2 = new col::_CompactLinkedHashSet::•<core::Object?>();
#t2.{core::Set::add}(42);
#t2.{core::Set::add}(x);
#t2.{core::Set::add}{Invariant}(42);
#t2.{core::Set::add}{Invariant}(x);
} =>#t2;
core::Set<core::Object?> p = block {
final core::Set<core::Object?> #t3 = new col::_CompactLinkedHashSet::•<core::Object?>();
#t3.{core::Set::add}(y);
#t3.{core::Set::add}(42);
#t3.{core::Set::add}{Invariant}(y);
#t3.{core::Set::add}{Invariant}(42);
} =>#t3;
core::Set<core::Object?> q = block {
final core::Set<core::Object?> #t4 = new col::_CompactLinkedHashSet::•<core::Object?>();
#t4.{core::Set::add}(42);
#t4.{core::Set::add}(y);
#t4.{core::Set::add}{Invariant}(42);
#t4.{core::Set::add}{Invariant}(y);
} =>#t4;
self::assertRightSubtype(v);
self::assertLeftSubtype<core::Set<core::Object?>>(v);
@ -39,13 +39,13 @@ class C<X extends core::Object? = core::Object?, Y extends core::Object = core::
if(x is{ForNonNullableByDefault} core::Object?) {
core::Set<core::Object?> v = block {
final core::Set<core::Object?> #t5 = new col::_CompactLinkedHashSet::•<core::Object?>();
#t5.{core::Set::add}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */});
#t5.{core::Set::add}(42);
#t5.{core::Set::add}{Invariant}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */});
#t5.{core::Set::add}{Invariant}(42);
} =>#t5;
core::Set<core::Object?> w = block {
final core::Set<core::Object?> #t6 = new col::_CompactLinkedHashSet::•<core::Object?>();
#t6.{core::Set::add}(42);
#t6.{core::Set::add}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */});
#t6.{core::Set::add}{Invariant}(42);
#t6.{core::Set::add}{Invariant}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */});
} =>#t6;
self::assertRightSubtype(v);
self::assertLeftSubtype<core::Set<core::Object?>>(v);

View file

@ -10,23 +10,23 @@ class C<X extends core::Object? = core::Object?, Y extends core::Object = core::
method test(generic-covariant-impl self::C::X% x, generic-covariant-impl self::C::Y? y) → dynamic {
core::Set<core::Object?> v = block {
final core::Set<core::Object?> #t1 = col::LinkedHashSet::•<core::Object?>();
#t1.{core::Set::add}(x);
#t1.{core::Set::add}(42);
#t1.{core::Set::add}{Invariant}(x);
#t1.{core::Set::add}{Invariant}(42);
} =>#t1;
core::Set<core::Object?> w = block {
final core::Set<core::Object?> #t2 = col::LinkedHashSet::•<core::Object?>();
#t2.{core::Set::add}(42);
#t2.{core::Set::add}(x);
#t2.{core::Set::add}{Invariant}(42);
#t2.{core::Set::add}{Invariant}(x);
} =>#t2;
core::Set<core::Object?> p = block {
final core::Set<core::Object?> #t3 = col::LinkedHashSet::•<core::Object?>();
#t3.{core::Set::add}(y);
#t3.{core::Set::add}(42);
#t3.{core::Set::add}{Invariant}(y);
#t3.{core::Set::add}{Invariant}(42);
} =>#t3;
core::Set<core::Object?> q = block {
final core::Set<core::Object?> #t4 = col::LinkedHashSet::•<core::Object?>();
#t4.{core::Set::add}(42);
#t4.{core::Set::add}(y);
#t4.{core::Set::add}{Invariant}(42);
#t4.{core::Set::add}{Invariant}(y);
} =>#t4;
self::assertRightSubtype(v);
self::assertLeftSubtype<core::Set<core::Object?>>(v);
@ -39,13 +39,13 @@ class C<X extends core::Object? = core::Object?, Y extends core::Object = core::
if(x is{ForNonNullableByDefault} core::Object?) {
core::Set<core::Object?> v = block {
final core::Set<core::Object?> #t5 = col::LinkedHashSet::•<core::Object?>();
#t5.{core::Set::add}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */});
#t5.{core::Set::add}(42);
#t5.{core::Set::add}{Invariant}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */});
#t5.{core::Set::add}{Invariant}(42);
} =>#t5;
core::Set<core::Object?> w = block {
final core::Set<core::Object?> #t6 = col::LinkedHashSet::•<core::Object?>();
#t6.{core::Set::add}(42);
#t6.{core::Set::add}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */});
#t6.{core::Set::add}{Invariant}(42);
#t6.{core::Set::add}{Invariant}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */});
} =>#t6;
self::assertRightSubtype(v);
self::assertLeftSubtype<core::Set<core::Object?>>(v);

View file

@ -10,23 +10,23 @@ class C<X extends core::Object? = core::Object?, Y extends core::Object = core::
method test(generic-covariant-impl self::C::X% x, generic-covariant-impl self::C::Y? y) → dynamic {
core::Set<core::Object?> v = block {
final core::Set<core::Object?> #t1 = new col::_CompactLinkedHashSet::•<core::Object?>();
#t1.{core::Set::add}(x);
#t1.{core::Set::add}(42);
#t1.{core::Set::add}{Invariant}(x);
#t1.{core::Set::add}{Invariant}(42);
} =>#t1;
core::Set<core::Object?> w = block {
final core::Set<core::Object?> #t2 = new col::_CompactLinkedHashSet::•<core::Object?>();
#t2.{core::Set::add}(42);
#t2.{core::Set::add}(x);
#t2.{core::Set::add}{Invariant}(42);
#t2.{core::Set::add}{Invariant}(x);
} =>#t2;
core::Set<core::Object?> p = block {
final core::Set<core::Object?> #t3 = new col::_CompactLinkedHashSet::•<core::Object?>();
#t3.{core::Set::add}(y);
#t3.{core::Set::add}(42);
#t3.{core::Set::add}{Invariant}(y);
#t3.{core::Set::add}{Invariant}(42);
} =>#t3;
core::Set<core::Object?> q = block {
final core::Set<core::Object?> #t4 = new col::_CompactLinkedHashSet::•<core::Object?>();
#t4.{core::Set::add}(42);
#t4.{core::Set::add}(y);
#t4.{core::Set::add}{Invariant}(42);
#t4.{core::Set::add}{Invariant}(y);
} =>#t4;
self::assertRightSubtype(v);
self::assertLeftSubtype<core::Set<core::Object?>>(v);
@ -39,13 +39,13 @@ class C<X extends core::Object? = core::Object?, Y extends core::Object = core::
if(x is{ForNonNullableByDefault} core::Object?) {
core::Set<core::Object?> v = block {
final core::Set<core::Object?> #t5 = new col::_CompactLinkedHashSet::•<core::Object?>();
#t5.{core::Set::add}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */});
#t5.{core::Set::add}(42);
#t5.{core::Set::add}{Invariant}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */});
#t5.{core::Set::add}{Invariant}(42);
} =>#t5;
core::Set<core::Object?> w = block {
final core::Set<core::Object?> #t6 = new col::_CompactLinkedHashSet::•<core::Object?>();
#t6.{core::Set::add}(42);
#t6.{core::Set::add}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */});
#t6.{core::Set::add}{Invariant}(42);
#t6.{core::Set::add}{Invariant}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */});
} =>#t6;
self::assertRightSubtype(v);
self::assertLeftSubtype<core::Set<core::Object?>>(v);

View file

@ -175,7 +175,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{...a}, // Error.
^") {
final core::int #t3 = #t2 as{TypeError,ForNonNullableByDefault} core::int;
#t1.{core::Set::add}(#t3);
#t1.{core::Set::add}{Invariant}(#t3);
}
} =>#t1, block {
final core::Set<core::int> #t4 = col::LinkedHashSet::•<core::int>();
@ -183,7 +183,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{...b}, // Error.
^") {
final core::int #t6 = #t5 as{TypeError,ForNonNullableByDefault} core::int;
#t4.{core::Set::add}(#t6);
#t4.{core::Set::add}{Invariant}(#t6);
}
} =>#t4, block {
final core::Set<core::int> #t7 = col::LinkedHashSet::•<core::int>();
@ -191,7 +191,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{...c}, // Error.
^") {
final core::int #t9 = #t8 as{TypeError,ForNonNullableByDefault} core::int;
#t7.{core::Set::add}(#t9);
#t7.{core::Set::add}{Invariant}(#t9);
}
} =>#t7, <core::int, core::int>{invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:11:9: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{...d}, // Error.
@ -200,7 +200,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
<int, int>{...a}, // Error.
^": null}, block {
final core::Set<core::int> #t10 = col::LinkedHashSet::•<core::int>();
#t10.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:13:14: Error: Unexpected type 'Map<int, int>?' of a spread. Expected 'dynamic' or an Iterable.
#t10.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:13:14: Error: Unexpected type 'Map<int, int>?' of a spread. Expected 'dynamic' or an Iterable.
- 'Map' is from 'dart:core'.
<int>{...d}, // Error.
^");
@ -211,7 +211,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{if (condition) ...a}, // Error.
^") {
final core::int #t13 = #t12 as{TypeError,ForNonNullableByDefault} core::int;
#t11.{core::Set::add}(#t13);
#t11.{core::Set::add}{Invariant}(#t13);
}
} =>#t11, block {
final core::Set<core::int> #t14 = col::LinkedHashSet::•<core::int>();
@ -220,7 +220,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{if (condition) ...b}, // Error.
^") {
final core::int #t16 = #t15 as{TypeError,ForNonNullableByDefault} core::int;
#t14.{core::Set::add}(#t16);
#t14.{core::Set::add}{Invariant}(#t16);
}
} =>#t14, block {
final core::Set<core::int> #t17 = col::LinkedHashSet::•<core::int>();
@ -229,12 +229,12 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{if (condition) ...c}, // Error.
^") {
final core::int #t19 = #t18 as{TypeError,ForNonNullableByDefault} core::int;
#t17.{core::Set::add}(#t19);
#t17.{core::Set::add}{Invariant}(#t19);
}
} =>#t17, block {
final core::Map<core::int, core::int> #t20 = <core::int, core::int>{};
if(condition)
#t20.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:17:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t20.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:17:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{if (condition) ...d}, // Error.
^", null);
} =>#t20, block {
@ -244,7 +244,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (dynamic e in iterable) ...a}, // Error.
^") {
final core::int #t23 = #t22 as{TypeError,ForNonNullableByDefault} core::int;
#t21.{core::Set::add}(#t23);
#t21.{core::Set::add}{Invariant}(#t23);
}
} =>#t21, block {
final core::Set<core::int> #t24 = col::LinkedHashSet::•<core::int>();
@ -253,7 +253,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (dynamic e in iterable) ...b}, // Error.
^") {
final core::int #t26 = #t25 as{TypeError,ForNonNullableByDefault} core::int;
#t24.{core::Set::add}(#t26);
#t24.{core::Set::add}{Invariant}(#t26);
}
} =>#t24, block {
final core::Set<core::int> #t27 = col::LinkedHashSet::•<core::int>();
@ -262,12 +262,12 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (dynamic e in iterable) ...c}, // Error.
^") {
final core::int #t29 = #t28 as{TypeError,ForNonNullableByDefault} core::int;
#t27.{core::Set::add}(#t29);
#t27.{core::Set::add}{Invariant}(#t29);
}
} =>#t27, block {
final core::Map<core::int, core::int> #t30 = <core::int, core::int>{};
for (dynamic e in iterable)
#t30.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:21:37: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t30.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:21:37: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{for (dynamic e in iterable) ...d}, // Error.
^", null);
} =>#t30, block {
@ -277,7 +277,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (int i = 0; i < 42; ++i) ...a}, // Error.
^") {
final core::int #t33 = #t32 as{TypeError,ForNonNullableByDefault} core::int;
#t31.{core::Set::add}(#t33);
#t31.{core::Set::add}{Invariant}(#t33);
}
} =>#t31, block {
final core::Set<core::int> #t34 = col::LinkedHashSet::•<core::int>();
@ -286,7 +286,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (int i = 0; i < 42; ++i) ...b}, // Error.
^") {
final core::int #t36 = #t35 as{TypeError,ForNonNullableByDefault} core::int;
#t34.{core::Set::add}(#t36);
#t34.{core::Set::add}{Invariant}(#t36);
}
} =>#t34, block {
final core::Set<core::int> #t37 = col::LinkedHashSet::•<core::int>();
@ -295,12 +295,12 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (int i = 0; i < 42; ++i) ...c}, // Error.
^") {
final core::int #t39 = #t38 as{TypeError,ForNonNullableByDefault} core::int;
#t37.{core::Set::add}(#t39);
#t37.{core::Set::add}{Invariant}(#t39);
}
} =>#t37, block {
final core::Map<core::int, core::int> #t40 = <core::int, core::int>{};
for (core::int i = 0; i.{core::num::<}(42); i = i.{core::num::+}(1))
#t40.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:25:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t40.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:25:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{for (int i = 0; i < 42; ++i) ...d}, // Error.
^", null);
} =>#t40, block {
@ -309,7 +309,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t42.{core::Object::==}(null))
for (final dynamic #t43 in #t42{core::Iterable<dynamic>}) {
final core::int #t44 = #t43 as{TypeError,ForNonNullableByDefault} core::int;
#t41.{core::Set::add}(#t44);
#t41.{core::Set::add}{Invariant}(#t44);
}
} =>#t41, block {
final core::Set<core::int> #t45 = col::LinkedHashSet::•<core::int>();
@ -317,7 +317,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t46.{core::Object::==}(null))
for (final dynamic #t47 in #t46{core::Iterable<dynamic>}) {
final core::int #t48 = #t47 as{TypeError,ForNonNullableByDefault} core::int;
#t45.{core::Set::add}(#t48);
#t45.{core::Set::add}{Invariant}(#t48);
}
} =>#t45, block {
final core::Set<core::int> #t49 = col::LinkedHashSet::•<core::int>();
@ -325,14 +325,14 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t50.{core::Object::==}(null))
for (final dynamic #t51 in #t50{core::Iterable<dynamic>}) {
final core::int #t52 = #t51 as{TypeError,ForNonNullableByDefault} core::int;
#t49.{core::Set::add}(#t52);
#t49.{core::Set::add}{Invariant}(#t52);
}
} =>#t49, block {
final core::Map<core::int, core::int> #t53 = <core::int, core::int>{};
final core::Map<core::int, core::int>? #t54 = d;
if(!#t54.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t55 in #t54{core::Map<core::int, core::int>}.{core::Map::entries})
#t53.{core::Map::[]=}(#t55.{core::MapEntry::key}, #t55.{core::MapEntry::value});
#t53.{core::Map::[]=}{Invariant}(#t55.{core::MapEntry::key}, #t55.{core::MapEntry::value});
} =>#t53, block {
final core::Set<core::int> #t56 = col::LinkedHashSet::•<core::int>();
if(condition) {
@ -340,7 +340,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t57.{core::Object::==}(null))
for (final dynamic #t58 in #t57{core::Iterable<dynamic>}) {
final core::int #t59 = #t58 as{TypeError,ForNonNullableByDefault} core::int;
#t56.{core::Set::add}(#t59);
#t56.{core::Set::add}{Invariant}(#t59);
}
}
} =>#t56, block {
@ -350,7 +350,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t61.{core::Object::==}(null))
for (final dynamic #t62 in #t61{core::Iterable<dynamic>}) {
final core::int #t63 = #t62 as{TypeError,ForNonNullableByDefault} core::int;
#t60.{core::Set::add}(#t63);
#t60.{core::Set::add}{Invariant}(#t63);
}
}
} =>#t60, block {
@ -360,7 +360,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t65.{core::Object::==}(null))
for (final dynamic #t66 in #t65{core::Iterable<dynamic>}) {
final core::int #t67 = #t66 as{TypeError,ForNonNullableByDefault} core::int;
#t64.{core::Set::add}(#t67);
#t64.{core::Set::add}{Invariant}(#t67);
}
}
} =>#t64, block {
@ -369,7 +369,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final core::Map<core::int, core::int>? #t69 = d;
if(!#t69.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t70 in #t69{core::Map<core::int, core::int>}.{core::Map::entries})
#t68.{core::Map::[]=}(#t70.{core::MapEntry::key}, #t70.{core::MapEntry::value});
#t68.{core::Map::[]=}{Invariant}(#t70.{core::MapEntry::key}, #t70.{core::MapEntry::value});
}
} =>#t68, block {
final core::Set<core::int> #t71 = col::LinkedHashSet::•<core::int>();
@ -378,7 +378,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t72.{core::Object::==}(null))
for (final dynamic #t73 in #t72{core::Iterable<dynamic>}) {
final core::int #t74 = #t73 as{TypeError,ForNonNullableByDefault} core::int;
#t71.{core::Set::add}(#t74);
#t71.{core::Set::add}{Invariant}(#t74);
}
}
} =>#t71, block {
@ -388,7 +388,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t76.{core::Object::==}(null))
for (final dynamic #t77 in #t76{core::Iterable<dynamic>}) {
final core::int #t78 = #t77 as{TypeError,ForNonNullableByDefault} core::int;
#t75.{core::Set::add}(#t78);
#t75.{core::Set::add}{Invariant}(#t78);
}
}
} =>#t75, block {
@ -398,7 +398,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t80.{core::Object::==}(null))
for (final dynamic #t81 in #t80{core::Iterable<dynamic>}) {
final core::int #t82 = #t81 as{TypeError,ForNonNullableByDefault} core::int;
#t79.{core::Set::add}(#t82);
#t79.{core::Set::add}{Invariant}(#t82);
}
}
} =>#t79, block {
@ -407,7 +407,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final core::Map<core::int, core::int>? #t84 = d;
if(!#t84.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t85 in #t84{core::Map<core::int, core::int>}.{core::Map::entries})
#t83.{core::Map::[]=}(#t85.{core::MapEntry::key}, #t85.{core::MapEntry::value});
#t83.{core::Map::[]=}{Invariant}(#t85.{core::MapEntry::key}, #t85.{core::MapEntry::value});
}
} =>#t83, block {
final core::Set<core::int> #t86 = col::LinkedHashSet::•<core::int>();
@ -416,7 +416,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t87.{core::Object::==}(null))
for (final dynamic #t88 in #t87{core::Iterable<dynamic>}) {
final core::int #t89 = #t88 as{TypeError,ForNonNullableByDefault} core::int;
#t86.{core::Set::add}(#t89);
#t86.{core::Set::add}{Invariant}(#t89);
}
}
} =>#t86, block {
@ -426,7 +426,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t91.{core::Object::==}(null))
for (final dynamic #t92 in #t91{core::Iterable<dynamic>}) {
final core::int #t93 = #t92 as{TypeError,ForNonNullableByDefault} core::int;
#t90.{core::Set::add}(#t93);
#t90.{core::Set::add}{Invariant}(#t93);
}
}
} =>#t90, block {
@ -436,7 +436,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t95.{core::Object::==}(null))
for (final dynamic #t96 in #t95{core::Iterable<dynamic>}) {
final core::int #t97 = #t96 as{TypeError,ForNonNullableByDefault} core::int;
#t94.{core::Set::add}(#t97);
#t94.{core::Set::add}{Invariant}(#t97);
}
}
} =>#t94, block {
@ -445,7 +445,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final core::Map<core::int, core::int>? #t99 = d;
if(!#t99.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t100 in #t99{core::Map<core::int, core::int>}.{core::Map::entries})
#t98.{core::Map::[]=}(#t100.{core::MapEntry::key}, #t100.{core::MapEntry::value});
#t98.{core::Map::[]=}{Invariant}(#t100.{core::MapEntry::key}, #t100.{core::MapEntry::value});
}
} =>#t98];
}
@ -456,7 +456,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{...x}, // Error.
^") {
final core::int #t103 = #t102 as{TypeError,ForNonNullableByDefault} core::int;
#t101.{core::Set::add}(#t103);
#t101.{core::Set::add}{Invariant}(#t103);
}
} =>#t101, block {
final core::Set<core::int> #t104 = col::LinkedHashSet::•<core::int>();
@ -464,7 +464,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{...y}, // Error.
^") {
final core::int #t106 = #t105 as{TypeError,ForNonNullableByDefault} core::int;
#t104.{core::Set::add}(#t106);
#t104.{core::Set::add}{Invariant}(#t106);
}
} =>#t104, block {
final core::Set<core::int> #t107 = col::LinkedHashSet::•<core::int>();
@ -472,7 +472,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{...z}, // Error.
^") {
final core::int #t109 = #t108 as{TypeError,ForNonNullableByDefault} core::int;
#t107.{core::Set::add}(#t109);
#t107.{core::Set::add}{Invariant}(#t109);
}
} =>#t107, <core::int, core::int>{invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:53:9: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{...w}, // Error.
@ -480,7 +480,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
<int, int>{...x}, // Error.
^": null}, block {
final core::Set<core::int> #t110 = col::LinkedHashSet::•<core::int>();
#t110.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:55:14: Error: Unexpected type 'W' of a spread. Expected 'dynamic' or an Iterable.
#t110.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:55:14: Error: Unexpected type 'W' of a spread. Expected 'dynamic' or an Iterable.
<int>{...w}, // Error.
^");
} =>#t110, block {
@ -490,7 +490,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{if (condition) ...x}, // Error.
^") {
final core::int #t113 = #t112 as{TypeError,ForNonNullableByDefault} core::int;
#t111.{core::Set::add}(#t113);
#t111.{core::Set::add}{Invariant}(#t113);
}
} =>#t111, block {
final core::Set<core::int> #t114 = col::LinkedHashSet::•<core::int>();
@ -499,7 +499,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{if (condition) ...y}, // Error.
^") {
final core::int #t116 = #t115 as{TypeError,ForNonNullableByDefault} core::int;
#t114.{core::Set::add}(#t116);
#t114.{core::Set::add}{Invariant}(#t116);
}
} =>#t114, block {
final core::Set<core::int> #t117 = col::LinkedHashSet::•<core::int>();
@ -508,12 +508,12 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{if (condition) ...z}, // Error.
^") {
final core::int #t119 = #t118 as{TypeError,ForNonNullableByDefault} core::int;
#t117.{core::Set::add}(#t119);
#t117.{core::Set::add}{Invariant}(#t119);
}
} =>#t117, block {
final core::Map<core::int, core::int> #t120 = <core::int, core::int>{};
if(condition)
#t120.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:59:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t120.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:59:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{if (condition) ...w}, // Error.
^", null);
} =>#t120, block {
@ -523,7 +523,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (dynamic e in iterable) ...x}, // Error.
^") {
final core::int #t123 = #t122 as{TypeError,ForNonNullableByDefault} core::int;
#t121.{core::Set::add}(#t123);
#t121.{core::Set::add}{Invariant}(#t123);
}
} =>#t121, block {
final core::Set<core::int> #t124 = col::LinkedHashSet::•<core::int>();
@ -532,7 +532,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (dynamic e in iterable) ...y}, // Error.
^") {
final core::int #t126 = #t125 as{TypeError,ForNonNullableByDefault} core::int;
#t124.{core::Set::add}(#t126);
#t124.{core::Set::add}{Invariant}(#t126);
}
} =>#t124, block {
final core::Set<core::int> #t127 = col::LinkedHashSet::•<core::int>();
@ -541,12 +541,12 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (dynamic e in iterable) ...z}, // Error.
^") {
final core::int #t129 = #t128 as{TypeError,ForNonNullableByDefault} core::int;
#t127.{core::Set::add}(#t129);
#t127.{core::Set::add}{Invariant}(#t129);
}
} =>#t127, block {
final core::Map<core::int, core::int> #t130 = <core::int, core::int>{};
for (dynamic e in iterable)
#t130.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:63:37: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t130.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:63:37: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{for (dynamic e in iterable) ...w}, // Error.
^", null);
} =>#t130, block {
@ -556,7 +556,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (int i = 0; i < 42; ++i) ...x}, // Error.
^") {
final core::int #t133 = #t132 as{TypeError,ForNonNullableByDefault} core::int;
#t131.{core::Set::add}(#t133);
#t131.{core::Set::add}{Invariant}(#t133);
}
} =>#t131, block {
final core::Set<core::int> #t134 = col::LinkedHashSet::•<core::int>();
@ -565,7 +565,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (int i = 0; i < 42; ++i) ...y}, // Error.
^") {
final core::int #t136 = #t135 as{TypeError,ForNonNullableByDefault} core::int;
#t134.{core::Set::add}(#t136);
#t134.{core::Set::add}{Invariant}(#t136);
}
} =>#t134, block {
final core::Set<core::int> #t137 = col::LinkedHashSet::•<core::int>();
@ -574,12 +574,12 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (int i = 0; i < 42; ++i) ...z}, // Error.
^") {
final core::int #t139 = #t138 as{TypeError,ForNonNullableByDefault} core::int;
#t137.{core::Set::add}(#t139);
#t137.{core::Set::add}{Invariant}(#t139);
}
} =>#t137, block {
final core::Map<core::int, core::int> #t140 = <core::int, core::int>{};
for (core::int i = 0; i.{core::num::<}(42); i = i.{core::num::+}(1))
#t140.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:67:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t140.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:67:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{for (int i = 0; i < 42; ++i) ...w}, // Error.
^", null);
} =>#t140, block {
@ -588,7 +588,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t142.{core::Object::==}(null))
for (final dynamic #t143 in #t142{core::Iterable<dynamic>}) {
final core::int #t144 = #t143 as{TypeError,ForNonNullableByDefault} core::int;
#t141.{core::Set::add}(#t144);
#t141.{core::Set::add}{Invariant}(#t144);
}
} =>#t141, block {
final core::Set<core::int> #t145 = col::LinkedHashSet::•<core::int>();
@ -596,7 +596,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t146.{core::Object::==}(null))
for (final dynamic #t147 in #t146{core::Iterable<dynamic>}) {
final core::int #t148 = #t147 as{TypeError,ForNonNullableByDefault} core::int;
#t145.{core::Set::add}(#t148);
#t145.{core::Set::add}{Invariant}(#t148);
}
} =>#t145, block {
final core::Set<core::int> #t149 = col::LinkedHashSet::•<core::int>();
@ -604,14 +604,14 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t150.{core::Object::==}(null))
for (final dynamic #t151 in #t150{core::Iterable<dynamic>}) {
final core::int #t152 = #t151 as{TypeError,ForNonNullableByDefault} core::int;
#t149.{core::Set::add}(#t152);
#t149.{core::Set::add}{Invariant}(#t152);
}
} =>#t149, block {
final core::Map<core::int, core::int> #t153 = <core::int, core::int>{};
final core::Map<core::int, core::int>? #t154 = w;
if(!#t154.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t155 in #t154{core::Map<core::int, core::int>}.{core::Map::entries})
#t153.{core::Map::[]=}(#t155.{core::MapEntry::key}, #t155.{core::MapEntry::value});
#t153.{core::Map::[]=}{Invariant}(#t155.{core::MapEntry::key}, #t155.{core::MapEntry::value});
} =>#t153, block {
final core::Set<core::int> #t156 = col::LinkedHashSet::•<core::int>();
if(condition) {
@ -619,7 +619,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t157.{core::Object::==}(null))
for (final dynamic #t158 in #t157{core::Iterable<dynamic>}) {
final core::int #t159 = #t158 as{TypeError,ForNonNullableByDefault} core::int;
#t156.{core::Set::add}(#t159);
#t156.{core::Set::add}{Invariant}(#t159);
}
}
} =>#t156, block {
@ -629,7 +629,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t161.{core::Object::==}(null))
for (final dynamic #t162 in #t161{core::Iterable<dynamic>}) {
final core::int #t163 = #t162 as{TypeError,ForNonNullableByDefault} core::int;
#t160.{core::Set::add}(#t163);
#t160.{core::Set::add}{Invariant}(#t163);
}
}
} =>#t160, block {
@ -639,7 +639,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t165.{core::Object::==}(null))
for (final dynamic #t166 in #t165{core::Iterable<dynamic>}) {
final core::int #t167 = #t166 as{TypeError,ForNonNullableByDefault} core::int;
#t164.{core::Set::add}(#t167);
#t164.{core::Set::add}{Invariant}(#t167);
}
}
} =>#t164, block {
@ -648,7 +648,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final core::Map<core::int, core::int>? #t169 = w;
if(!#t169.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t170 in #t169{core::Map<core::int, core::int>}.{core::Map::entries})
#t168.{core::Map::[]=}(#t170.{core::MapEntry::key}, #t170.{core::MapEntry::value});
#t168.{core::Map::[]=}{Invariant}(#t170.{core::MapEntry::key}, #t170.{core::MapEntry::value});
}
} =>#t168, block {
final core::Set<core::int> #t171 = col::LinkedHashSet::•<core::int>();
@ -657,7 +657,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t172.{core::Object::==}(null))
for (final dynamic #t173 in #t172{core::Iterable<dynamic>}) {
final core::int #t174 = #t173 as{TypeError,ForNonNullableByDefault} core::int;
#t171.{core::Set::add}(#t174);
#t171.{core::Set::add}{Invariant}(#t174);
}
}
} =>#t171, block {
@ -667,7 +667,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t176.{core::Object::==}(null))
for (final dynamic #t177 in #t176{core::Iterable<dynamic>}) {
final core::int #t178 = #t177 as{TypeError,ForNonNullableByDefault} core::int;
#t175.{core::Set::add}(#t178);
#t175.{core::Set::add}{Invariant}(#t178);
}
}
} =>#t175, block {
@ -677,7 +677,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t180.{core::Object::==}(null))
for (final dynamic #t181 in #t180{core::Iterable<dynamic>}) {
final core::int #t182 = #t181 as{TypeError,ForNonNullableByDefault} core::int;
#t179.{core::Set::add}(#t182);
#t179.{core::Set::add}{Invariant}(#t182);
}
}
} =>#t179, block {
@ -686,7 +686,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final core::Map<core::int, core::int>? #t184 = w;
if(!#t184.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t185 in #t184{core::Map<core::int, core::int>}.{core::Map::entries})
#t183.{core::Map::[]=}(#t185.{core::MapEntry::key}, #t185.{core::MapEntry::value});
#t183.{core::Map::[]=}{Invariant}(#t185.{core::MapEntry::key}, #t185.{core::MapEntry::value});
}
} =>#t183, block {
final core::Set<core::int> #t186 = col::LinkedHashSet::•<core::int>();
@ -695,7 +695,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t187.{core::Object::==}(null))
for (final dynamic #t188 in #t187{core::Iterable<dynamic>}) {
final core::int #t189 = #t188 as{TypeError,ForNonNullableByDefault} core::int;
#t186.{core::Set::add}(#t189);
#t186.{core::Set::add}{Invariant}(#t189);
}
}
} =>#t186, block {
@ -705,7 +705,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t191.{core::Object::==}(null))
for (final dynamic #t192 in #t191{core::Iterable<dynamic>}) {
final core::int #t193 = #t192 as{TypeError,ForNonNullableByDefault} core::int;
#t190.{core::Set::add}(#t193);
#t190.{core::Set::add}{Invariant}(#t193);
}
}
} =>#t190, block {
@ -715,7 +715,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t195.{core::Object::==}(null))
for (final dynamic #t196 in #t195{core::Iterable<dynamic>}) {
final core::int #t197 = #t196 as{TypeError,ForNonNullableByDefault} core::int;
#t194.{core::Set::add}(#t197);
#t194.{core::Set::add}{Invariant}(#t197);
}
}
} =>#t194, block {
@ -724,7 +724,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final core::Map<core::int, core::int>? #t199 = w;
if(!#t199.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t200 in #t199{core::Map<core::int, core::int>}.{core::Map::entries})
#t198.{core::Map::[]=}(#t200.{core::MapEntry::key}, #t200.{core::MapEntry::value});
#t198.{core::Map::[]=}{Invariant}(#t200.{core::MapEntry::key}, #t200.{core::MapEntry::value});
}
} =>#t198];
}

View file

@ -175,7 +175,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{...a}, // Error.
^") {
final core::int #t3 = #t2 as{TypeError,ForNonNullableByDefault} core::int;
#t1.{core::Set::add}(#t3);
#t1.{core::Set::add}{Invariant}(#t3);
}
} =>#t1, block {
final core::Set<core::int> #t4 = new col::_CompactLinkedHashSet::•<core::int>();
@ -183,7 +183,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{...b}, // Error.
^") {
final core::int #t6 = #t5 as{TypeError,ForNonNullableByDefault} core::int;
#t4.{core::Set::add}(#t6);
#t4.{core::Set::add}{Invariant}(#t6);
}
} =>#t4, block {
final core::Set<core::int> #t7 = new col::_CompactLinkedHashSet::•<core::int>();
@ -191,7 +191,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{...c}, // Error.
^") {
final core::int #t9 = #t8 as{TypeError,ForNonNullableByDefault} core::int;
#t7.{core::Set::add}(#t9);
#t7.{core::Set::add}{Invariant}(#t9);
}
} =>#t7, <core::int, core::int>{invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:11:9: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{...d}, // Error.
@ -200,7 +200,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
<int, int>{...a}, // Error.
^": null}, block {
final core::Set<core::int> #t10 = new col::_CompactLinkedHashSet::•<core::int>();
#t10.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:13:14: Error: Unexpected type 'Map<int, int>?' of a spread. Expected 'dynamic' or an Iterable.
#t10.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:13:14: Error: Unexpected type 'Map<int, int>?' of a spread. Expected 'dynamic' or an Iterable.
- 'Map' is from 'dart:core'.
<int>{...d}, // Error.
^");
@ -211,7 +211,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{if (condition) ...a}, // Error.
^") {
final core::int #t13 = #t12 as{TypeError,ForNonNullableByDefault} core::int;
#t11.{core::Set::add}(#t13);
#t11.{core::Set::add}{Invariant}(#t13);
}
} =>#t11, block {
final core::Set<core::int> #t14 = new col::_CompactLinkedHashSet::•<core::int>();
@ -220,7 +220,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{if (condition) ...b}, // Error.
^") {
final core::int #t16 = #t15 as{TypeError,ForNonNullableByDefault} core::int;
#t14.{core::Set::add}(#t16);
#t14.{core::Set::add}{Invariant}(#t16);
}
} =>#t14, block {
final core::Set<core::int> #t17 = new col::_CompactLinkedHashSet::•<core::int>();
@ -229,12 +229,12 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{if (condition) ...c}, // Error.
^") {
final core::int #t19 = #t18 as{TypeError,ForNonNullableByDefault} core::int;
#t17.{core::Set::add}(#t19);
#t17.{core::Set::add}{Invariant}(#t19);
}
} =>#t17, block {
final core::Map<core::int, core::int> #t20 = <core::int, core::int>{};
if(condition)
#t20.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:17:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t20.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:17:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{if (condition) ...d}, // Error.
^", null);
} =>#t20, block {
@ -247,7 +247,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (dynamic e in iterable) ...a}, // Error.
^") {
final core::int #t23 = #t22 as{TypeError,ForNonNullableByDefault} core::int;
#t21.{core::Set::add}(#t23);
#t21.{core::Set::add}{Invariant}(#t23);
}
}
}
@ -261,7 +261,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (dynamic e in iterable) ...b}, // Error.
^") {
final core::int #t26 = #t25 as{TypeError,ForNonNullableByDefault} core::int;
#t24.{core::Set::add}(#t26);
#t24.{core::Set::add}{Invariant}(#t26);
}
}
}
@ -275,7 +275,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (dynamic e in iterable) ...c}, // Error.
^") {
final core::int #t29 = #t28 as{TypeError,ForNonNullableByDefault} core::int;
#t27.{core::Set::add}(#t29);
#t27.{core::Set::add}{Invariant}(#t29);
}
}
}
@ -285,7 +285,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
core::Iterator<dynamic> :sync-for-iterator = iterable.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
dynamic e = :sync-for-iterator.{core::Iterator::current};
#t30.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:21:37: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t30.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:21:37: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{for (dynamic e in iterable) ...d}, // Error.
^", null);
}
@ -297,7 +297,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (int i = 0; i < 42; ++i) ...a}, // Error.
^") {
final core::int #t33 = #t32 as{TypeError,ForNonNullableByDefault} core::int;
#t31.{core::Set::add}(#t33);
#t31.{core::Set::add}{Invariant}(#t33);
}
} =>#t31, block {
final core::Set<core::int> #t34 = new col::_CompactLinkedHashSet::•<core::int>();
@ -306,7 +306,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (int i = 0; i < 42; ++i) ...b}, // Error.
^") {
final core::int #t36 = #t35 as{TypeError,ForNonNullableByDefault} core::int;
#t34.{core::Set::add}(#t36);
#t34.{core::Set::add}{Invariant}(#t36);
}
} =>#t34, block {
final core::Set<core::int> #t37 = new col::_CompactLinkedHashSet::•<core::int>();
@ -315,12 +315,12 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (int i = 0; i < 42; ++i) ...c}, // Error.
^") {
final core::int #t39 = #t38 as{TypeError,ForNonNullableByDefault} core::int;
#t37.{core::Set::add}(#t39);
#t37.{core::Set::add}{Invariant}(#t39);
}
} =>#t37, block {
final core::Map<core::int, core::int> #t40 = <core::int, core::int>{};
for (core::int i = 0; i.{core::num::<}(42); i = i.{core::num::+}(1))
#t40.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:25:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t40.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:25:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{for (int i = 0; i < 42; ++i) ...d}, // Error.
^", null);
} =>#t40, block {
@ -332,7 +332,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t43 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t44 = #t43 as{TypeError,ForNonNullableByDefault} core::int;
#t41.{core::Set::add}(#t44);
#t41.{core::Set::add}{Invariant}(#t44);
}
}
}
@ -345,7 +345,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t47 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t48 = #t47 as{TypeError,ForNonNullableByDefault} core::int;
#t45.{core::Set::add}(#t48);
#t45.{core::Set::add}{Invariant}(#t48);
}
}
}
@ -358,7 +358,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t51 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t52 = #t51 as{TypeError,ForNonNullableByDefault} core::int;
#t49.{core::Set::add}(#t52);
#t49.{core::Set::add}{Invariant}(#t52);
}
}
}
@ -369,7 +369,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t54{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t55 = :sync-for-iterator.{core::Iterator::current};
#t53.{core::Map::[]=}(#t55.{core::MapEntry::key}, #t55.{core::MapEntry::value});
#t53.{core::Map::[]=}{Invariant}(#t55.{core::MapEntry::key}, #t55.{core::MapEntry::value});
}
}
} =>#t53, block {
@ -382,7 +382,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t58 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t59 = #t58 as{TypeError,ForNonNullableByDefault} core::int;
#t56.{core::Set::add}(#t59);
#t56.{core::Set::add}{Invariant}(#t59);
}
}
}
@ -397,7 +397,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t62 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t63 = #t62 as{TypeError,ForNonNullableByDefault} core::int;
#t60.{core::Set::add}(#t63);
#t60.{core::Set::add}{Invariant}(#t63);
}
}
}
@ -412,7 +412,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t66 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t67 = #t66 as{TypeError,ForNonNullableByDefault} core::int;
#t64.{core::Set::add}(#t67);
#t64.{core::Set::add}{Invariant}(#t67);
}
}
}
@ -425,7 +425,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t69{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t70 = :sync-for-iterator.{core::Iterator::current};
#t68.{core::Map::[]=}(#t70.{core::MapEntry::key}, #t70.{core::MapEntry::value});
#t68.{core::Map::[]=}{Invariant}(#t70.{core::MapEntry::key}, #t70.{core::MapEntry::value});
}
}
}
@ -443,7 +443,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t73 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t74 = #t73 as{TypeError,ForNonNullableByDefault} core::int;
#t71.{core::Set::add}(#t74);
#t71.{core::Set::add}{Invariant}(#t74);
}
}
}
@ -464,7 +464,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t77 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t78 = #t77 as{TypeError,ForNonNullableByDefault} core::int;
#t75.{core::Set::add}(#t78);
#t75.{core::Set::add}{Invariant}(#t78);
}
}
}
@ -485,7 +485,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t81 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t82 = #t81 as{TypeError,ForNonNullableByDefault} core::int;
#t79.{core::Set::add}(#t82);
#t79.{core::Set::add}{Invariant}(#t82);
}
}
}
@ -504,7 +504,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t84{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t85 = :sync-for-iterator.{core::Iterator::current};
#t83.{core::Map::[]=}(#t85.{core::MapEntry::key}, #t85.{core::MapEntry::value});
#t83.{core::Map::[]=}{Invariant}(#t85.{core::MapEntry::key}, #t85.{core::MapEntry::value});
}
}
}
@ -520,7 +520,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t88 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t89 = #t88 as{TypeError,ForNonNullableByDefault} core::int;
#t86.{core::Set::add}(#t89);
#t86.{core::Set::add}{Invariant}(#t89);
}
}
}
@ -535,7 +535,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t92 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t93 = #t92 as{TypeError,ForNonNullableByDefault} core::int;
#t90.{core::Set::add}(#t93);
#t90.{core::Set::add}{Invariant}(#t93);
}
}
}
@ -550,7 +550,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t96 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t97 = #t96 as{TypeError,ForNonNullableByDefault} core::int;
#t94.{core::Set::add}(#t97);
#t94.{core::Set::add}{Invariant}(#t97);
}
}
}
@ -563,7 +563,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t99{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t100 = :sync-for-iterator.{core::Iterator::current};
#t98.{core::Map::[]=}(#t100.{core::MapEntry::key}, #t100.{core::MapEntry::value});
#t98.{core::Map::[]=}{Invariant}(#t100.{core::MapEntry::key}, #t100.{core::MapEntry::value});
}
}
}
@ -576,7 +576,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{...x}, // Error.
^") {
final core::int #t103 = #t102 as{TypeError,ForNonNullableByDefault} core::int;
#t101.{core::Set::add}(#t103);
#t101.{core::Set::add}{Invariant}(#t103);
}
} =>#t101, block {
final core::Set<core::int> #t104 = new col::_CompactLinkedHashSet::•<core::int>();
@ -584,7 +584,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{...y}, // Error.
^") {
final core::int #t106 = #t105 as{TypeError,ForNonNullableByDefault} core::int;
#t104.{core::Set::add}(#t106);
#t104.{core::Set::add}{Invariant}(#t106);
}
} =>#t104, block {
final core::Set<core::int> #t107 = new col::_CompactLinkedHashSet::•<core::int>();
@ -592,7 +592,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{...z}, // Error.
^") {
final core::int #t109 = #t108 as{TypeError,ForNonNullableByDefault} core::int;
#t107.{core::Set::add}(#t109);
#t107.{core::Set::add}{Invariant}(#t109);
}
} =>#t107, <core::int, core::int>{invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:53:9: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{...w}, // Error.
@ -600,7 +600,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
<int, int>{...x}, // Error.
^": null}, block {
final core::Set<core::int> #t110 = new col::_CompactLinkedHashSet::•<core::int>();
#t110.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:55:14: Error: Unexpected type 'W' of a spread. Expected 'dynamic' or an Iterable.
#t110.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:55:14: Error: Unexpected type 'W' of a spread. Expected 'dynamic' or an Iterable.
<int>{...w}, // Error.
^");
} =>#t110, block {
@ -610,7 +610,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{if (condition) ...x}, // Error.
^") {
final core::int #t113 = #t112 as{TypeError,ForNonNullableByDefault} core::int;
#t111.{core::Set::add}(#t113);
#t111.{core::Set::add}{Invariant}(#t113);
}
} =>#t111, block {
final core::Set<core::int> #t114 = new col::_CompactLinkedHashSet::•<core::int>();
@ -619,7 +619,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{if (condition) ...y}, // Error.
^") {
final core::int #t116 = #t115 as{TypeError,ForNonNullableByDefault} core::int;
#t114.{core::Set::add}(#t116);
#t114.{core::Set::add}{Invariant}(#t116);
}
} =>#t114, block {
final core::Set<core::int> #t117 = new col::_CompactLinkedHashSet::•<core::int>();
@ -628,12 +628,12 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{if (condition) ...z}, // Error.
^") {
final core::int #t119 = #t118 as{TypeError,ForNonNullableByDefault} core::int;
#t117.{core::Set::add}(#t119);
#t117.{core::Set::add}{Invariant}(#t119);
}
} =>#t117, block {
final core::Map<core::int, core::int> #t120 = <core::int, core::int>{};
if(condition)
#t120.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:59:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t120.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:59:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{if (condition) ...w}, // Error.
^", null);
} =>#t120, block {
@ -646,7 +646,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (dynamic e in iterable) ...x}, // Error.
^") {
final core::int #t123 = #t122 as{TypeError,ForNonNullableByDefault} core::int;
#t121.{core::Set::add}(#t123);
#t121.{core::Set::add}{Invariant}(#t123);
}
}
}
@ -660,7 +660,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (dynamic e in iterable) ...y}, // Error.
^") {
final core::int #t126 = #t125 as{TypeError,ForNonNullableByDefault} core::int;
#t124.{core::Set::add}(#t126);
#t124.{core::Set::add}{Invariant}(#t126);
}
}
}
@ -674,7 +674,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (dynamic e in iterable) ...z}, // Error.
^") {
final core::int #t129 = #t128 as{TypeError,ForNonNullableByDefault} core::int;
#t127.{core::Set::add}(#t129);
#t127.{core::Set::add}{Invariant}(#t129);
}
}
}
@ -684,7 +684,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
core::Iterator<dynamic> :sync-for-iterator = iterable.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
dynamic e = :sync-for-iterator.{core::Iterator::current};
#t130.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:63:37: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t130.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:63:37: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{for (dynamic e in iterable) ...w}, // Error.
^", null);
}
@ -696,7 +696,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (int i = 0; i < 42; ++i) ...x}, // Error.
^") {
final core::int #t133 = #t132 as{TypeError,ForNonNullableByDefault} core::int;
#t131.{core::Set::add}(#t133);
#t131.{core::Set::add}{Invariant}(#t133);
}
} =>#t131, block {
final core::Set<core::int> #t134 = new col::_CompactLinkedHashSet::•<core::int>();
@ -705,7 +705,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (int i = 0; i < 42; ++i) ...y}, // Error.
^") {
final core::int #t136 = #t135 as{TypeError,ForNonNullableByDefault} core::int;
#t134.{core::Set::add}(#t136);
#t134.{core::Set::add}{Invariant}(#t136);
}
} =>#t134, block {
final core::Set<core::int> #t137 = new col::_CompactLinkedHashSet::•<core::int>();
@ -714,12 +714,12 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (int i = 0; i < 42; ++i) ...z}, // Error.
^") {
final core::int #t139 = #t138 as{TypeError,ForNonNullableByDefault} core::int;
#t137.{core::Set::add}(#t139);
#t137.{core::Set::add}{Invariant}(#t139);
}
} =>#t137, block {
final core::Map<core::int, core::int> #t140 = <core::int, core::int>{};
for (core::int i = 0; i.{core::num::<}(42); i = i.{core::num::+}(1))
#t140.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:67:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t140.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:67:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{for (int i = 0; i < 42; ++i) ...w}, // Error.
^", null);
} =>#t140, block {
@ -731,7 +731,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t143 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t144 = #t143 as{TypeError,ForNonNullableByDefault} core::int;
#t141.{core::Set::add}(#t144);
#t141.{core::Set::add}{Invariant}(#t144);
}
}
}
@ -744,7 +744,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t147 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t148 = #t147 as{TypeError,ForNonNullableByDefault} core::int;
#t145.{core::Set::add}(#t148);
#t145.{core::Set::add}{Invariant}(#t148);
}
}
}
@ -757,7 +757,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t151 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t152 = #t151 as{TypeError,ForNonNullableByDefault} core::int;
#t149.{core::Set::add}(#t152);
#t149.{core::Set::add}{Invariant}(#t152);
}
}
}
@ -768,7 +768,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t154{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t155 = :sync-for-iterator.{core::Iterator::current};
#t153.{core::Map::[]=}(#t155.{core::MapEntry::key}, #t155.{core::MapEntry::value});
#t153.{core::Map::[]=}{Invariant}(#t155.{core::MapEntry::key}, #t155.{core::MapEntry::value});
}
}
} =>#t153, block {
@ -781,7 +781,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t158 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t159 = #t158 as{TypeError,ForNonNullableByDefault} core::int;
#t156.{core::Set::add}(#t159);
#t156.{core::Set::add}{Invariant}(#t159);
}
}
}
@ -796,7 +796,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t162 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t163 = #t162 as{TypeError,ForNonNullableByDefault} core::int;
#t160.{core::Set::add}(#t163);
#t160.{core::Set::add}{Invariant}(#t163);
}
}
}
@ -811,7 +811,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t166 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t167 = #t166 as{TypeError,ForNonNullableByDefault} core::int;
#t164.{core::Set::add}(#t167);
#t164.{core::Set::add}{Invariant}(#t167);
}
}
}
@ -824,7 +824,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t169{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t170 = :sync-for-iterator.{core::Iterator::current};
#t168.{core::Map::[]=}(#t170.{core::MapEntry::key}, #t170.{core::MapEntry::value});
#t168.{core::Map::[]=}{Invariant}(#t170.{core::MapEntry::key}, #t170.{core::MapEntry::value});
}
}
}
@ -842,7 +842,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t173 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t174 = #t173 as{TypeError,ForNonNullableByDefault} core::int;
#t171.{core::Set::add}(#t174);
#t171.{core::Set::add}{Invariant}(#t174);
}
}
}
@ -863,7 +863,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t177 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t178 = #t177 as{TypeError,ForNonNullableByDefault} core::int;
#t175.{core::Set::add}(#t178);
#t175.{core::Set::add}{Invariant}(#t178);
}
}
}
@ -884,7 +884,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t181 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t182 = #t181 as{TypeError,ForNonNullableByDefault} core::int;
#t179.{core::Set::add}(#t182);
#t179.{core::Set::add}{Invariant}(#t182);
}
}
}
@ -903,7 +903,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t184{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t185 = :sync-for-iterator.{core::Iterator::current};
#t183.{core::Map::[]=}(#t185.{core::MapEntry::key}, #t185.{core::MapEntry::value});
#t183.{core::Map::[]=}{Invariant}(#t185.{core::MapEntry::key}, #t185.{core::MapEntry::value});
}
}
}
@ -919,7 +919,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t188 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t189 = #t188 as{TypeError,ForNonNullableByDefault} core::int;
#t186.{core::Set::add}(#t189);
#t186.{core::Set::add}{Invariant}(#t189);
}
}
}
@ -934,7 +934,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t192 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t193 = #t192 as{TypeError,ForNonNullableByDefault} core::int;
#t190.{core::Set::add}(#t193);
#t190.{core::Set::add}{Invariant}(#t193);
}
}
}
@ -949,7 +949,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t196 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t197 = #t196 as{TypeError,ForNonNullableByDefault} core::int;
#t194.{core::Set::add}(#t197);
#t194.{core::Set::add}{Invariant}(#t197);
}
}
}
@ -962,7 +962,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t199{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t200 = :sync-for-iterator.{core::Iterator::current};
#t198.{core::Map::[]=}(#t200.{core::MapEntry::key}, #t200.{core::MapEntry::value});
#t198.{core::Map::[]=}{Invariant}(#t200.{core::MapEntry::key}, #t200.{core::MapEntry::value});
}
}
}

View file

@ -175,7 +175,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{...a}, // Error.
^") {
final core::int #t3 = #t2 as{TypeError,ForNonNullableByDefault} core::int;
#t1.{core::Set::add}(#t3);
#t1.{core::Set::add}{Invariant}(#t3);
}
} =>#t1, block {
final core::Set<core::int> #t4 = col::LinkedHashSet::•<core::int>();
@ -183,7 +183,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{...b}, // Error.
^") {
final core::int #t6 = #t5 as{TypeError,ForNonNullableByDefault} core::int;
#t4.{core::Set::add}(#t6);
#t4.{core::Set::add}{Invariant}(#t6);
}
} =>#t4, block {
final core::Set<core::int> #t7 = col::LinkedHashSet::•<core::int>();
@ -191,7 +191,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{...c}, // Error.
^") {
final core::int #t9 = #t8 as{TypeError,ForNonNullableByDefault} core::int;
#t7.{core::Set::add}(#t9);
#t7.{core::Set::add}{Invariant}(#t9);
}
} =>#t7, <core::int, core::int>{invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:11:9: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{...d}, // Error.
@ -200,7 +200,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
<int, int>{...a}, // Error.
^": null}, block {
final core::Set<core::int> #t10 = col::LinkedHashSet::•<core::int>();
#t10.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:13:14: Error: Unexpected type 'Map<int, int>?' of a spread. Expected 'dynamic' or an Iterable.
#t10.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:13:14: Error: Unexpected type 'Map<int, int>?' of a spread. Expected 'dynamic' or an Iterable.
- 'Map' is from 'dart:core'.
<int>{...d}, // Error.
^");
@ -211,7 +211,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{if (condition) ...a}, // Error.
^") {
final core::int #t13 = #t12 as{TypeError,ForNonNullableByDefault} core::int;
#t11.{core::Set::add}(#t13);
#t11.{core::Set::add}{Invariant}(#t13);
}
} =>#t11, block {
final core::Set<core::int> #t14 = col::LinkedHashSet::•<core::int>();
@ -220,7 +220,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{if (condition) ...b}, // Error.
^") {
final core::int #t16 = #t15 as{TypeError,ForNonNullableByDefault} core::int;
#t14.{core::Set::add}(#t16);
#t14.{core::Set::add}{Invariant}(#t16);
}
} =>#t14, block {
final core::Set<core::int> #t17 = col::LinkedHashSet::•<core::int>();
@ -229,12 +229,12 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{if (condition) ...c}, // Error.
^") {
final core::int #t19 = #t18 as{TypeError,ForNonNullableByDefault} core::int;
#t17.{core::Set::add}(#t19);
#t17.{core::Set::add}{Invariant}(#t19);
}
} =>#t17, block {
final core::Map<core::int, core::int> #t20 = <core::int, core::int>{};
if(condition)
#t20.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:17:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t20.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:17:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{if (condition) ...d}, // Error.
^", null);
} =>#t20, block {
@ -244,7 +244,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (dynamic e in iterable) ...a}, // Error.
^") {
final core::int #t23 = #t22 as{TypeError,ForNonNullableByDefault} core::int;
#t21.{core::Set::add}(#t23);
#t21.{core::Set::add}{Invariant}(#t23);
}
} =>#t21, block {
final core::Set<core::int> #t24 = col::LinkedHashSet::•<core::int>();
@ -253,7 +253,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (dynamic e in iterable) ...b}, // Error.
^") {
final core::int #t26 = #t25 as{TypeError,ForNonNullableByDefault} core::int;
#t24.{core::Set::add}(#t26);
#t24.{core::Set::add}{Invariant}(#t26);
}
} =>#t24, block {
final core::Set<core::int> #t27 = col::LinkedHashSet::•<core::int>();
@ -262,12 +262,12 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (dynamic e in iterable) ...c}, // Error.
^") {
final core::int #t29 = #t28 as{TypeError,ForNonNullableByDefault} core::int;
#t27.{core::Set::add}(#t29);
#t27.{core::Set::add}{Invariant}(#t29);
}
} =>#t27, block {
final core::Map<core::int, core::int> #t30 = <core::int, core::int>{};
for (dynamic e in iterable)
#t30.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:21:37: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t30.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:21:37: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{for (dynamic e in iterable) ...d}, // Error.
^", null);
} =>#t30, block {
@ -277,7 +277,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (int i = 0; i < 42; ++i) ...a}, // Error.
^") {
final core::int #t33 = #t32 as{TypeError,ForNonNullableByDefault} core::int;
#t31.{core::Set::add}(#t33);
#t31.{core::Set::add}{Invariant}(#t33);
}
} =>#t31, block {
final core::Set<core::int> #t34 = col::LinkedHashSet::•<core::int>();
@ -286,7 +286,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (int i = 0; i < 42; ++i) ...b}, // Error.
^") {
final core::int #t36 = #t35 as{TypeError,ForNonNullableByDefault} core::int;
#t34.{core::Set::add}(#t36);
#t34.{core::Set::add}{Invariant}(#t36);
}
} =>#t34, block {
final core::Set<core::int> #t37 = col::LinkedHashSet::•<core::int>();
@ -295,12 +295,12 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (int i = 0; i < 42; ++i) ...c}, // Error.
^") {
final core::int #t39 = #t38 as{TypeError,ForNonNullableByDefault} core::int;
#t37.{core::Set::add}(#t39);
#t37.{core::Set::add}{Invariant}(#t39);
}
} =>#t37, block {
final core::Map<core::int, core::int> #t40 = <core::int, core::int>{};
for (core::int i = 0; i.{core::num::<}(42); i = i.{core::num::+}(1))
#t40.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:25:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t40.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:25:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{for (int i = 0; i < 42; ++i) ...d}, // Error.
^", null);
} =>#t40, block {
@ -309,7 +309,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t42.{core::Object::==}(null))
for (final dynamic #t43 in #t42{core::Iterable<dynamic>}) {
final core::int #t44 = #t43 as{TypeError,ForNonNullableByDefault} core::int;
#t41.{core::Set::add}(#t44);
#t41.{core::Set::add}{Invariant}(#t44);
}
} =>#t41, block {
final core::Set<core::int> #t45 = col::LinkedHashSet::•<core::int>();
@ -317,7 +317,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t46.{core::Object::==}(null))
for (final dynamic #t47 in #t46{core::Iterable<dynamic>}) {
final core::int #t48 = #t47 as{TypeError,ForNonNullableByDefault} core::int;
#t45.{core::Set::add}(#t48);
#t45.{core::Set::add}{Invariant}(#t48);
}
} =>#t45, block {
final core::Set<core::int> #t49 = col::LinkedHashSet::•<core::int>();
@ -325,14 +325,14 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t50.{core::Object::==}(null))
for (final dynamic #t51 in #t50{core::Iterable<dynamic>}) {
final core::int #t52 = #t51 as{TypeError,ForNonNullableByDefault} core::int;
#t49.{core::Set::add}(#t52);
#t49.{core::Set::add}{Invariant}(#t52);
}
} =>#t49, block {
final core::Map<core::int, core::int> #t53 = <core::int, core::int>{};
final core::Map<core::int, core::int>? #t54 = d;
if(!#t54.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t55 in #t54{core::Map<core::int, core::int>}.{core::Map::entries})
#t53.{core::Map::[]=}(#t55.{core::MapEntry::key}, #t55.{core::MapEntry::value});
#t53.{core::Map::[]=}{Invariant}(#t55.{core::MapEntry::key}, #t55.{core::MapEntry::value});
} =>#t53, block {
final core::Set<core::int> #t56 = col::LinkedHashSet::•<core::int>();
if(condition) {
@ -340,7 +340,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t57.{core::Object::==}(null))
for (final dynamic #t58 in #t57{core::Iterable<dynamic>}) {
final core::int #t59 = #t58 as{TypeError,ForNonNullableByDefault} core::int;
#t56.{core::Set::add}(#t59);
#t56.{core::Set::add}{Invariant}(#t59);
}
}
} =>#t56, block {
@ -350,7 +350,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t61.{core::Object::==}(null))
for (final dynamic #t62 in #t61{core::Iterable<dynamic>}) {
final core::int #t63 = #t62 as{TypeError,ForNonNullableByDefault} core::int;
#t60.{core::Set::add}(#t63);
#t60.{core::Set::add}{Invariant}(#t63);
}
}
} =>#t60, block {
@ -360,7 +360,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t65.{core::Object::==}(null))
for (final dynamic #t66 in #t65{core::Iterable<dynamic>}) {
final core::int #t67 = #t66 as{TypeError,ForNonNullableByDefault} core::int;
#t64.{core::Set::add}(#t67);
#t64.{core::Set::add}{Invariant}(#t67);
}
}
} =>#t64, block {
@ -369,7 +369,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final core::Map<core::int, core::int>? #t69 = d;
if(!#t69.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t70 in #t69{core::Map<core::int, core::int>}.{core::Map::entries})
#t68.{core::Map::[]=}(#t70.{core::MapEntry::key}, #t70.{core::MapEntry::value});
#t68.{core::Map::[]=}{Invariant}(#t70.{core::MapEntry::key}, #t70.{core::MapEntry::value});
}
} =>#t68, block {
final core::Set<core::int> #t71 = col::LinkedHashSet::•<core::int>();
@ -378,7 +378,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t72.{core::Object::==}(null))
for (final dynamic #t73 in #t72{core::Iterable<dynamic>}) {
final core::int #t74 = #t73 as{TypeError,ForNonNullableByDefault} core::int;
#t71.{core::Set::add}(#t74);
#t71.{core::Set::add}{Invariant}(#t74);
}
}
} =>#t71, block {
@ -388,7 +388,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t76.{core::Object::==}(null))
for (final dynamic #t77 in #t76{core::Iterable<dynamic>}) {
final core::int #t78 = #t77 as{TypeError,ForNonNullableByDefault} core::int;
#t75.{core::Set::add}(#t78);
#t75.{core::Set::add}{Invariant}(#t78);
}
}
} =>#t75, block {
@ -398,7 +398,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t80.{core::Object::==}(null))
for (final dynamic #t81 in #t80{core::Iterable<dynamic>}) {
final core::int #t82 = #t81 as{TypeError,ForNonNullableByDefault} core::int;
#t79.{core::Set::add}(#t82);
#t79.{core::Set::add}{Invariant}(#t82);
}
}
} =>#t79, block {
@ -407,7 +407,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final core::Map<core::int, core::int>? #t84 = d;
if(!#t84.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t85 in #t84{core::Map<core::int, core::int>}.{core::Map::entries})
#t83.{core::Map::[]=}(#t85.{core::MapEntry::key}, #t85.{core::MapEntry::value});
#t83.{core::Map::[]=}{Invariant}(#t85.{core::MapEntry::key}, #t85.{core::MapEntry::value});
}
} =>#t83, block {
final core::Set<core::int> #t86 = col::LinkedHashSet::•<core::int>();
@ -416,7 +416,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t87.{core::Object::==}(null))
for (final dynamic #t88 in #t87{core::Iterable<dynamic>}) {
final core::int #t89 = #t88 as{TypeError,ForNonNullableByDefault} core::int;
#t86.{core::Set::add}(#t89);
#t86.{core::Set::add}{Invariant}(#t89);
}
}
} =>#t86, block {
@ -426,7 +426,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t91.{core::Object::==}(null))
for (final dynamic #t92 in #t91{core::Iterable<dynamic>}) {
final core::int #t93 = #t92 as{TypeError,ForNonNullableByDefault} core::int;
#t90.{core::Set::add}(#t93);
#t90.{core::Set::add}{Invariant}(#t93);
}
}
} =>#t90, block {
@ -436,7 +436,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
if(!#t95.{core::Object::==}(null))
for (final dynamic #t96 in #t95{core::Iterable<dynamic>}) {
final core::int #t97 = #t96 as{TypeError,ForNonNullableByDefault} core::int;
#t94.{core::Set::add}(#t97);
#t94.{core::Set::add}{Invariant}(#t97);
}
}
} =>#t94, block {
@ -445,7 +445,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final core::Map<core::int, core::int>? #t99 = d;
if(!#t99.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t100 in #t99{core::Map<core::int, core::int>}.{core::Map::entries})
#t98.{core::Map::[]=}(#t100.{core::MapEntry::key}, #t100.{core::MapEntry::value});
#t98.{core::Map::[]=}{Invariant}(#t100.{core::MapEntry::key}, #t100.{core::MapEntry::value});
}
} =>#t98];
}
@ -456,7 +456,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{...x}, // Error.
^") {
final core::int #t103 = #t102 as{TypeError,ForNonNullableByDefault} core::int;
#t101.{core::Set::add}(#t103);
#t101.{core::Set::add}{Invariant}(#t103);
}
} =>#t101, block {
final core::Set<core::int> #t104 = col::LinkedHashSet::•<core::int>();
@ -464,7 +464,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{...y}, // Error.
^") {
final core::int #t106 = #t105 as{TypeError,ForNonNullableByDefault} core::int;
#t104.{core::Set::add}(#t106);
#t104.{core::Set::add}{Invariant}(#t106);
}
} =>#t104, block {
final core::Set<core::int> #t107 = col::LinkedHashSet::•<core::int>();
@ -472,7 +472,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{...z}, // Error.
^") {
final core::int #t109 = #t108 as{TypeError,ForNonNullableByDefault} core::int;
#t107.{core::Set::add}(#t109);
#t107.{core::Set::add}{Invariant}(#t109);
}
} =>#t107, <core::int, core::int>{invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:53:9: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{...w}, // Error.
@ -480,7 +480,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
<int, int>{...x}, // Error.
^": null}, block {
final core::Set<core::int> #t110 = col::LinkedHashSet::•<core::int>();
#t110.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:55:14: Error: Unexpected type 'W' of a spread. Expected 'dynamic' or an Iterable.
#t110.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:55:14: Error: Unexpected type 'W' of a spread. Expected 'dynamic' or an Iterable.
<int>{...w}, // Error.
^");
} =>#t110, block {
@ -490,7 +490,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{if (condition) ...x}, // Error.
^") {
final core::int #t113 = #t112 as{TypeError,ForNonNullableByDefault} core::int;
#t111.{core::Set::add}(#t113);
#t111.{core::Set::add}{Invariant}(#t113);
}
} =>#t111, block {
final core::Set<core::int> #t114 = col::LinkedHashSet::•<core::int>();
@ -499,7 +499,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{if (condition) ...y}, // Error.
^") {
final core::int #t116 = #t115 as{TypeError,ForNonNullableByDefault} core::int;
#t114.{core::Set::add}(#t116);
#t114.{core::Set::add}{Invariant}(#t116);
}
} =>#t114, block {
final core::Set<core::int> #t117 = col::LinkedHashSet::•<core::int>();
@ -508,12 +508,12 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{if (condition) ...z}, // Error.
^") {
final core::int #t119 = #t118 as{TypeError,ForNonNullableByDefault} core::int;
#t117.{core::Set::add}(#t119);
#t117.{core::Set::add}{Invariant}(#t119);
}
} =>#t117, block {
final core::Map<core::int, core::int> #t120 = <core::int, core::int>{};
if(condition)
#t120.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:59:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t120.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:59:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{if (condition) ...w}, // Error.
^", null);
} =>#t120, block {
@ -523,7 +523,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (dynamic e in iterable) ...x}, // Error.
^") {
final core::int #t123 = #t122 as{TypeError,ForNonNullableByDefault} core::int;
#t121.{core::Set::add}(#t123);
#t121.{core::Set::add}{Invariant}(#t123);
}
} =>#t121, block {
final core::Set<core::int> #t124 = col::LinkedHashSet::•<core::int>();
@ -532,7 +532,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (dynamic e in iterable) ...y}, // Error.
^") {
final core::int #t126 = #t125 as{TypeError,ForNonNullableByDefault} core::int;
#t124.{core::Set::add}(#t126);
#t124.{core::Set::add}{Invariant}(#t126);
}
} =>#t124, block {
final core::Set<core::int> #t127 = col::LinkedHashSet::•<core::int>();
@ -541,12 +541,12 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (dynamic e in iterable) ...z}, // Error.
^") {
final core::int #t129 = #t128 as{TypeError,ForNonNullableByDefault} core::int;
#t127.{core::Set::add}(#t129);
#t127.{core::Set::add}{Invariant}(#t129);
}
} =>#t127, block {
final core::Map<core::int, core::int> #t130 = <core::int, core::int>{};
for (dynamic e in iterable)
#t130.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:63:37: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t130.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:63:37: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{for (dynamic e in iterable) ...w}, // Error.
^", null);
} =>#t130, block {
@ -556,7 +556,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (int i = 0; i < 42; ++i) ...x}, // Error.
^") {
final core::int #t133 = #t132 as{TypeError,ForNonNullableByDefault} core::int;
#t131.{core::Set::add}(#t133);
#t131.{core::Set::add}{Invariant}(#t133);
}
} =>#t131, block {
final core::Set<core::int> #t134 = col::LinkedHashSet::•<core::int>();
@ -565,7 +565,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (int i = 0; i < 42; ++i) ...y}, // Error.
^") {
final core::int #t136 = #t135 as{TypeError,ForNonNullableByDefault} core::int;
#t134.{core::Set::add}(#t136);
#t134.{core::Set::add}{Invariant}(#t136);
}
} =>#t134, block {
final core::Set<core::int> #t137 = col::LinkedHashSet::•<core::int>();
@ -574,12 +574,12 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (int i = 0; i < 42; ++i) ...z}, // Error.
^") {
final core::int #t139 = #t138 as{TypeError,ForNonNullableByDefault} core::int;
#t137.{core::Set::add}(#t139);
#t137.{core::Set::add}{Invariant}(#t139);
}
} =>#t137, block {
final core::Map<core::int, core::int> #t140 = <core::int, core::int>{};
for (core::int i = 0; i.{core::num::<}(42); i = i.{core::num::+}(1))
#t140.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:67:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t140.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:67:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{for (int i = 0; i < 42; ++i) ...w}, // Error.
^", null);
} =>#t140, block {
@ -588,7 +588,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t142.{core::Object::==}(null))
for (final dynamic #t143 in #t142{core::Iterable<dynamic>}) {
final core::int #t144 = #t143 as{TypeError,ForNonNullableByDefault} core::int;
#t141.{core::Set::add}(#t144);
#t141.{core::Set::add}{Invariant}(#t144);
}
} =>#t141, block {
final core::Set<core::int> #t145 = col::LinkedHashSet::•<core::int>();
@ -596,7 +596,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t146.{core::Object::==}(null))
for (final dynamic #t147 in #t146{core::Iterable<dynamic>}) {
final core::int #t148 = #t147 as{TypeError,ForNonNullableByDefault} core::int;
#t145.{core::Set::add}(#t148);
#t145.{core::Set::add}{Invariant}(#t148);
}
} =>#t145, block {
final core::Set<core::int> #t149 = col::LinkedHashSet::•<core::int>();
@ -604,14 +604,14 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t150.{core::Object::==}(null))
for (final dynamic #t151 in #t150{core::Iterable<dynamic>}) {
final core::int #t152 = #t151 as{TypeError,ForNonNullableByDefault} core::int;
#t149.{core::Set::add}(#t152);
#t149.{core::Set::add}{Invariant}(#t152);
}
} =>#t149, block {
final core::Map<core::int, core::int> #t153 = <core::int, core::int>{};
final core::Map<core::int, core::int>? #t154 = w;
if(!#t154.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t155 in #t154{core::Map<core::int, core::int>}.{core::Map::entries})
#t153.{core::Map::[]=}(#t155.{core::MapEntry::key}, #t155.{core::MapEntry::value});
#t153.{core::Map::[]=}{Invariant}(#t155.{core::MapEntry::key}, #t155.{core::MapEntry::value});
} =>#t153, block {
final core::Set<core::int> #t156 = col::LinkedHashSet::•<core::int>();
if(condition) {
@ -619,7 +619,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t157.{core::Object::==}(null))
for (final dynamic #t158 in #t157{core::Iterable<dynamic>}) {
final core::int #t159 = #t158 as{TypeError,ForNonNullableByDefault} core::int;
#t156.{core::Set::add}(#t159);
#t156.{core::Set::add}{Invariant}(#t159);
}
}
} =>#t156, block {
@ -629,7 +629,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t161.{core::Object::==}(null))
for (final dynamic #t162 in #t161{core::Iterable<dynamic>}) {
final core::int #t163 = #t162 as{TypeError,ForNonNullableByDefault} core::int;
#t160.{core::Set::add}(#t163);
#t160.{core::Set::add}{Invariant}(#t163);
}
}
} =>#t160, block {
@ -639,7 +639,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t165.{core::Object::==}(null))
for (final dynamic #t166 in #t165{core::Iterable<dynamic>}) {
final core::int #t167 = #t166 as{TypeError,ForNonNullableByDefault} core::int;
#t164.{core::Set::add}(#t167);
#t164.{core::Set::add}{Invariant}(#t167);
}
}
} =>#t164, block {
@ -648,7 +648,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final core::Map<core::int, core::int>? #t169 = w;
if(!#t169.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t170 in #t169{core::Map<core::int, core::int>}.{core::Map::entries})
#t168.{core::Map::[]=}(#t170.{core::MapEntry::key}, #t170.{core::MapEntry::value});
#t168.{core::Map::[]=}{Invariant}(#t170.{core::MapEntry::key}, #t170.{core::MapEntry::value});
}
} =>#t168, block {
final core::Set<core::int> #t171 = col::LinkedHashSet::•<core::int>();
@ -657,7 +657,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t172.{core::Object::==}(null))
for (final dynamic #t173 in #t172{core::Iterable<dynamic>}) {
final core::int #t174 = #t173 as{TypeError,ForNonNullableByDefault} core::int;
#t171.{core::Set::add}(#t174);
#t171.{core::Set::add}{Invariant}(#t174);
}
}
} =>#t171, block {
@ -667,7 +667,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t176.{core::Object::==}(null))
for (final dynamic #t177 in #t176{core::Iterable<dynamic>}) {
final core::int #t178 = #t177 as{TypeError,ForNonNullableByDefault} core::int;
#t175.{core::Set::add}(#t178);
#t175.{core::Set::add}{Invariant}(#t178);
}
}
} =>#t175, block {
@ -677,7 +677,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t180.{core::Object::==}(null))
for (final dynamic #t181 in #t180{core::Iterable<dynamic>}) {
final core::int #t182 = #t181 as{TypeError,ForNonNullableByDefault} core::int;
#t179.{core::Set::add}(#t182);
#t179.{core::Set::add}{Invariant}(#t182);
}
}
} =>#t179, block {
@ -686,7 +686,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final core::Map<core::int, core::int>? #t184 = w;
if(!#t184.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t185 in #t184{core::Map<core::int, core::int>}.{core::Map::entries})
#t183.{core::Map::[]=}(#t185.{core::MapEntry::key}, #t185.{core::MapEntry::value});
#t183.{core::Map::[]=}{Invariant}(#t185.{core::MapEntry::key}, #t185.{core::MapEntry::value});
}
} =>#t183, block {
final core::Set<core::int> #t186 = col::LinkedHashSet::•<core::int>();
@ -695,7 +695,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t187.{core::Object::==}(null))
for (final dynamic #t188 in #t187{core::Iterable<dynamic>}) {
final core::int #t189 = #t188 as{TypeError,ForNonNullableByDefault} core::int;
#t186.{core::Set::add}(#t189);
#t186.{core::Set::add}{Invariant}(#t189);
}
}
} =>#t186, block {
@ -705,7 +705,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t191.{core::Object::==}(null))
for (final dynamic #t192 in #t191{core::Iterable<dynamic>}) {
final core::int #t193 = #t192 as{TypeError,ForNonNullableByDefault} core::int;
#t190.{core::Set::add}(#t193);
#t190.{core::Set::add}{Invariant}(#t193);
}
}
} =>#t190, block {
@ -715,7 +715,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
if(!#t195.{core::Object::==}(null))
for (final dynamic #t196 in #t195{core::Iterable<dynamic>}) {
final core::int #t197 = #t196 as{TypeError,ForNonNullableByDefault} core::int;
#t194.{core::Set::add}(#t197);
#t194.{core::Set::add}{Invariant}(#t197);
}
}
} =>#t194, block {
@ -724,7 +724,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final core::Map<core::int, core::int>? #t199 = w;
if(!#t199.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t200 in #t199{core::Map<core::int, core::int>}.{core::Map::entries})
#t198.{core::Map::[]=}(#t200.{core::MapEntry::key}, #t200.{core::MapEntry::value});
#t198.{core::Map::[]=}{Invariant}(#t200.{core::MapEntry::key}, #t200.{core::MapEntry::value});
}
} =>#t198];
}

View file

@ -175,7 +175,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{...a}, // Error.
^") {
final core::int #t3 = #t2 as{TypeError,ForNonNullableByDefault} core::int;
#t1.{core::Set::add}(#t3);
#t1.{core::Set::add}{Invariant}(#t3);
}
} =>#t1, block {
final core::Set<core::int> #t4 = new col::_CompactLinkedHashSet::•<core::int>();
@ -183,7 +183,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{...b}, // Error.
^") {
final core::int #t6 = #t5 as{TypeError,ForNonNullableByDefault} core::int;
#t4.{core::Set::add}(#t6);
#t4.{core::Set::add}{Invariant}(#t6);
}
} =>#t4, block {
final core::Set<core::int> #t7 = new col::_CompactLinkedHashSet::•<core::int>();
@ -191,7 +191,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{...c}, // Error.
^") {
final core::int #t9 = #t8 as{TypeError,ForNonNullableByDefault} core::int;
#t7.{core::Set::add}(#t9);
#t7.{core::Set::add}{Invariant}(#t9);
}
} =>#t7, <core::int, core::int>{invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:11:9: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{...d}, // Error.
@ -200,7 +200,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
<int, int>{...a}, // Error.
^": null}, block {
final core::Set<core::int> #t10 = new col::_CompactLinkedHashSet::•<core::int>();
#t10.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:13:14: Error: Unexpected type 'Map<int, int>?' of a spread. Expected 'dynamic' or an Iterable.
#t10.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:13:14: Error: Unexpected type 'Map<int, int>?' of a spread. Expected 'dynamic' or an Iterable.
- 'Map' is from 'dart:core'.
<int>{...d}, // Error.
^");
@ -211,7 +211,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{if (condition) ...a}, // Error.
^") {
final core::int #t13 = #t12 as{TypeError,ForNonNullableByDefault} core::int;
#t11.{core::Set::add}(#t13);
#t11.{core::Set::add}{Invariant}(#t13);
}
} =>#t11, block {
final core::Set<core::int> #t14 = new col::_CompactLinkedHashSet::•<core::int>();
@ -220,7 +220,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{if (condition) ...b}, // Error.
^") {
final core::int #t16 = #t15 as{TypeError,ForNonNullableByDefault} core::int;
#t14.{core::Set::add}(#t16);
#t14.{core::Set::add}{Invariant}(#t16);
}
} =>#t14, block {
final core::Set<core::int> #t17 = new col::_CompactLinkedHashSet::•<core::int>();
@ -229,12 +229,12 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{if (condition) ...c}, // Error.
^") {
final core::int #t19 = #t18 as{TypeError,ForNonNullableByDefault} core::int;
#t17.{core::Set::add}(#t19);
#t17.{core::Set::add}{Invariant}(#t19);
}
} =>#t17, block {
final core::Map<core::int, core::int> #t20 = <core::int, core::int>{};
if(condition)
#t20.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:17:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t20.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:17:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{if (condition) ...d}, // Error.
^", null);
} =>#t20, block {
@ -247,7 +247,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (dynamic e in iterable) ...a}, // Error.
^") {
final core::int #t23 = #t22 as{TypeError,ForNonNullableByDefault} core::int;
#t21.{core::Set::add}(#t23);
#t21.{core::Set::add}{Invariant}(#t23);
}
}
}
@ -261,7 +261,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (dynamic e in iterable) ...b}, // Error.
^") {
final core::int #t26 = #t25 as{TypeError,ForNonNullableByDefault} core::int;
#t24.{core::Set::add}(#t26);
#t24.{core::Set::add}{Invariant}(#t26);
}
}
}
@ -275,7 +275,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (dynamic e in iterable) ...c}, // Error.
^") {
final core::int #t29 = #t28 as{TypeError,ForNonNullableByDefault} core::int;
#t27.{core::Set::add}(#t29);
#t27.{core::Set::add}{Invariant}(#t29);
}
}
}
@ -285,7 +285,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
core::Iterator<dynamic> :sync-for-iterator = iterable.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
dynamic e = :sync-for-iterator.{core::Iterator::current};
#t30.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:21:37: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t30.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:21:37: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{for (dynamic e in iterable) ...d}, // Error.
^", null);
}
@ -297,7 +297,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (int i = 0; i < 42; ++i) ...a}, // Error.
^") {
final core::int #t33 = #t32 as{TypeError,ForNonNullableByDefault} core::int;
#t31.{core::Set::add}(#t33);
#t31.{core::Set::add}{Invariant}(#t33);
}
} =>#t31, block {
final core::Set<core::int> #t34 = new col::_CompactLinkedHashSet::•<core::int>();
@ -306,7 +306,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (int i = 0; i < 42; ++i) ...b}, // Error.
^") {
final core::int #t36 = #t35 as{TypeError,ForNonNullableByDefault} core::int;
#t34.{core::Set::add}(#t36);
#t34.{core::Set::add}{Invariant}(#t36);
}
} =>#t34, block {
final core::Set<core::int> #t37 = new col::_CompactLinkedHashSet::•<core::int>();
@ -315,12 +315,12 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
{for (int i = 0; i < 42; ++i) ...c}, // Error.
^") {
final core::int #t39 = #t38 as{TypeError,ForNonNullableByDefault} core::int;
#t37.{core::Set::add}(#t39);
#t37.{core::Set::add}{Invariant}(#t39);
}
} =>#t37, block {
final core::Map<core::int, core::int> #t40 = <core::int, core::int>{};
for (core::int i = 0; i.{core::num::<}(42); i = i.{core::num::+}(1))
#t40.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:25:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t40.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:25:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{for (int i = 0; i < 42; ++i) ...d}, // Error.
^", null);
} =>#t40, block {
@ -332,7 +332,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t43 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t44 = #t43 as{TypeError,ForNonNullableByDefault} core::int;
#t41.{core::Set::add}(#t44);
#t41.{core::Set::add}{Invariant}(#t44);
}
}
}
@ -345,7 +345,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t47 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t48 = #t47 as{TypeError,ForNonNullableByDefault} core::int;
#t45.{core::Set::add}(#t48);
#t45.{core::Set::add}{Invariant}(#t48);
}
}
}
@ -358,7 +358,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t51 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t52 = #t51 as{TypeError,ForNonNullableByDefault} core::int;
#t49.{core::Set::add}(#t52);
#t49.{core::Set::add}{Invariant}(#t52);
}
}
}
@ -369,7 +369,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t54{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t55 = :sync-for-iterator.{core::Iterator::current};
#t53.{core::Map::[]=}(#t55.{core::MapEntry::key}, #t55.{core::MapEntry::value});
#t53.{core::Map::[]=}{Invariant}(#t55.{core::MapEntry::key}, #t55.{core::MapEntry::value});
}
}
} =>#t53, block {
@ -382,7 +382,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t58 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t59 = #t58 as{TypeError,ForNonNullableByDefault} core::int;
#t56.{core::Set::add}(#t59);
#t56.{core::Set::add}{Invariant}(#t59);
}
}
}
@ -397,7 +397,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t62 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t63 = #t62 as{TypeError,ForNonNullableByDefault} core::int;
#t60.{core::Set::add}(#t63);
#t60.{core::Set::add}{Invariant}(#t63);
}
}
}
@ -412,7 +412,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t66 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t67 = #t66 as{TypeError,ForNonNullableByDefault} core::int;
#t64.{core::Set::add}(#t67);
#t64.{core::Set::add}{Invariant}(#t67);
}
}
}
@ -425,7 +425,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t69{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t70 = :sync-for-iterator.{core::Iterator::current};
#t68.{core::Map::[]=}(#t70.{core::MapEntry::key}, #t70.{core::MapEntry::value});
#t68.{core::Map::[]=}{Invariant}(#t70.{core::MapEntry::key}, #t70.{core::MapEntry::value});
}
}
}
@ -443,7 +443,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t73 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t74 = #t73 as{TypeError,ForNonNullableByDefault} core::int;
#t71.{core::Set::add}(#t74);
#t71.{core::Set::add}{Invariant}(#t74);
}
}
}
@ -464,7 +464,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t77 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t78 = #t77 as{TypeError,ForNonNullableByDefault} core::int;
#t75.{core::Set::add}(#t78);
#t75.{core::Set::add}{Invariant}(#t78);
}
}
}
@ -485,7 +485,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t81 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t82 = #t81 as{TypeError,ForNonNullableByDefault} core::int;
#t79.{core::Set::add}(#t82);
#t79.{core::Set::add}{Invariant}(#t82);
}
}
}
@ -504,7 +504,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t84{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t85 = :sync-for-iterator.{core::Iterator::current};
#t83.{core::Map::[]=}(#t85.{core::MapEntry::key}, #t85.{core::MapEntry::value});
#t83.{core::Map::[]=}{Invariant}(#t85.{core::MapEntry::key}, #t85.{core::MapEntry::value});
}
}
}
@ -520,7 +520,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t88 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t89 = #t88 as{TypeError,ForNonNullableByDefault} core::int;
#t86.{core::Set::add}(#t89);
#t86.{core::Set::add}{Invariant}(#t89);
}
}
}
@ -535,7 +535,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t92 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t93 = #t92 as{TypeError,ForNonNullableByDefault} core::int;
#t90.{core::Set::add}(#t93);
#t90.{core::Set::add}{Invariant}(#t93);
}
}
}
@ -550,7 +550,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
final dynamic #t96 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t97 = #t96 as{TypeError,ForNonNullableByDefault} core::int;
#t94.{core::Set::add}(#t97);
#t94.{core::Set::add}{Invariant}(#t97);
}
}
}
@ -563,7 +563,7 @@ static method foo(core::bool condition, core::Iterable<dynamic> iterable, core::
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t99{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t100 = :sync-for-iterator.{core::Iterator::current};
#t98.{core::Map::[]=}(#t100.{core::MapEntry::key}, #t100.{core::MapEntry::value});
#t98.{core::Map::[]=}{Invariant}(#t100.{core::MapEntry::key}, #t100.{core::MapEntry::value});
}
}
}
@ -576,7 +576,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{...x}, // Error.
^") {
final core::int #t103 = #t102 as{TypeError,ForNonNullableByDefault} core::int;
#t101.{core::Set::add}(#t103);
#t101.{core::Set::add}{Invariant}(#t103);
}
} =>#t101, block {
final core::Set<core::int> #t104 = new col::_CompactLinkedHashSet::•<core::int>();
@ -584,7 +584,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{...y}, // Error.
^") {
final core::int #t106 = #t105 as{TypeError,ForNonNullableByDefault} core::int;
#t104.{core::Set::add}(#t106);
#t104.{core::Set::add}{Invariant}(#t106);
}
} =>#t104, block {
final core::Set<core::int> #t107 = new col::_CompactLinkedHashSet::•<core::int>();
@ -592,7 +592,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{...z}, // Error.
^") {
final core::int #t109 = #t108 as{TypeError,ForNonNullableByDefault} core::int;
#t107.{core::Set::add}(#t109);
#t107.{core::Set::add}{Invariant}(#t109);
}
} =>#t107, <core::int, core::int>{invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:53:9: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{...w}, // Error.
@ -600,7 +600,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
<int, int>{...x}, // Error.
^": null}, block {
final core::Set<core::int> #t110 = new col::_CompactLinkedHashSet::•<core::int>();
#t110.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:55:14: Error: Unexpected type 'W' of a spread. Expected 'dynamic' or an Iterable.
#t110.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:55:14: Error: Unexpected type 'W' of a spread. Expected 'dynamic' or an Iterable.
<int>{...w}, // Error.
^");
} =>#t110, block {
@ -610,7 +610,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{if (condition) ...x}, // Error.
^") {
final core::int #t113 = #t112 as{TypeError,ForNonNullableByDefault} core::int;
#t111.{core::Set::add}(#t113);
#t111.{core::Set::add}{Invariant}(#t113);
}
} =>#t111, block {
final core::Set<core::int> #t114 = new col::_CompactLinkedHashSet::•<core::int>();
@ -619,7 +619,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{if (condition) ...y}, // Error.
^") {
final core::int #t116 = #t115 as{TypeError,ForNonNullableByDefault} core::int;
#t114.{core::Set::add}(#t116);
#t114.{core::Set::add}{Invariant}(#t116);
}
} =>#t114, block {
final core::Set<core::int> #t117 = new col::_CompactLinkedHashSet::•<core::int>();
@ -628,12 +628,12 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{if (condition) ...z}, // Error.
^") {
final core::int #t119 = #t118 as{TypeError,ForNonNullableByDefault} core::int;
#t117.{core::Set::add}(#t119);
#t117.{core::Set::add}{Invariant}(#t119);
}
} =>#t117, block {
final core::Map<core::int, core::int> #t120 = <core::int, core::int>{};
if(condition)
#t120.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:59:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t120.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:59:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{if (condition) ...w}, // Error.
^", null);
} =>#t120, block {
@ -646,7 +646,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (dynamic e in iterable) ...x}, // Error.
^") {
final core::int #t123 = #t122 as{TypeError,ForNonNullableByDefault} core::int;
#t121.{core::Set::add}(#t123);
#t121.{core::Set::add}{Invariant}(#t123);
}
}
}
@ -660,7 +660,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (dynamic e in iterable) ...y}, // Error.
^") {
final core::int #t126 = #t125 as{TypeError,ForNonNullableByDefault} core::int;
#t124.{core::Set::add}(#t126);
#t124.{core::Set::add}{Invariant}(#t126);
}
}
}
@ -674,7 +674,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (dynamic e in iterable) ...z}, // Error.
^") {
final core::int #t129 = #t128 as{TypeError,ForNonNullableByDefault} core::int;
#t127.{core::Set::add}(#t129);
#t127.{core::Set::add}{Invariant}(#t129);
}
}
}
@ -684,7 +684,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
core::Iterator<dynamic> :sync-for-iterator = iterable.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
dynamic e = :sync-for-iterator.{core::Iterator::current};
#t130.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:63:37: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t130.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:63:37: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{for (dynamic e in iterable) ...w}, // Error.
^", null);
}
@ -696,7 +696,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (int i = 0; i < 42; ++i) ...x}, // Error.
^") {
final core::int #t133 = #t132 as{TypeError,ForNonNullableByDefault} core::int;
#t131.{core::Set::add}(#t133);
#t131.{core::Set::add}{Invariant}(#t133);
}
} =>#t131, block {
final core::Set<core::int> #t134 = new col::_CompactLinkedHashSet::•<core::int>();
@ -705,7 +705,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (int i = 0; i < 42; ++i) ...y}, // Error.
^") {
final core::int #t136 = #t135 as{TypeError,ForNonNullableByDefault} core::int;
#t134.{core::Set::add}(#t136);
#t134.{core::Set::add}{Invariant}(#t136);
}
} =>#t134, block {
final core::Set<core::int> #t137 = new col::_CompactLinkedHashSet::•<core::int>();
@ -714,12 +714,12 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
{for (int i = 0; i < 42; ++i) ...z}, // Error.
^") {
final core::int #t139 = #t138 as{TypeError,ForNonNullableByDefault} core::int;
#t137.{core::Set::add}(#t139);
#t137.{core::Set::add}{Invariant}(#t139);
}
} =>#t137, block {
final core::Map<core::int, core::int> #t140 = <core::int, core::int>{};
for (core::int i = 0; i.{core::num::<}(42); i = i.{core::num::+}(1))
#t140.{core::Map::[]=}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:67:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
#t140.{core::Map::[]=}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:67:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
{for (int i = 0; i < 42; ++i) ...w}, // Error.
^", null);
} =>#t140, block {
@ -731,7 +731,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t143 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t144 = #t143 as{TypeError,ForNonNullableByDefault} core::int;
#t141.{core::Set::add}(#t144);
#t141.{core::Set::add}{Invariant}(#t144);
}
}
}
@ -744,7 +744,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t147 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t148 = #t147 as{TypeError,ForNonNullableByDefault} core::int;
#t145.{core::Set::add}(#t148);
#t145.{core::Set::add}{Invariant}(#t148);
}
}
}
@ -757,7 +757,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t151 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t152 = #t151 as{TypeError,ForNonNullableByDefault} core::int;
#t149.{core::Set::add}(#t152);
#t149.{core::Set::add}{Invariant}(#t152);
}
}
}
@ -768,7 +768,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t154{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t155 = :sync-for-iterator.{core::Iterator::current};
#t153.{core::Map::[]=}(#t155.{core::MapEntry::key}, #t155.{core::MapEntry::value});
#t153.{core::Map::[]=}{Invariant}(#t155.{core::MapEntry::key}, #t155.{core::MapEntry::value});
}
}
} =>#t153, block {
@ -781,7 +781,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t158 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t159 = #t158 as{TypeError,ForNonNullableByDefault} core::int;
#t156.{core::Set::add}(#t159);
#t156.{core::Set::add}{Invariant}(#t159);
}
}
}
@ -796,7 +796,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t162 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t163 = #t162 as{TypeError,ForNonNullableByDefault} core::int;
#t160.{core::Set::add}(#t163);
#t160.{core::Set::add}{Invariant}(#t163);
}
}
}
@ -811,7 +811,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t166 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t167 = #t166 as{TypeError,ForNonNullableByDefault} core::int;
#t164.{core::Set::add}(#t167);
#t164.{core::Set::add}{Invariant}(#t167);
}
}
}
@ -824,7 +824,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t169{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t170 = :sync-for-iterator.{core::Iterator::current};
#t168.{core::Map::[]=}(#t170.{core::MapEntry::key}, #t170.{core::MapEntry::value});
#t168.{core::Map::[]=}{Invariant}(#t170.{core::MapEntry::key}, #t170.{core::MapEntry::value});
}
}
}
@ -842,7 +842,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t173 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t174 = #t173 as{TypeError,ForNonNullableByDefault} core::int;
#t171.{core::Set::add}(#t174);
#t171.{core::Set::add}{Invariant}(#t174);
}
}
}
@ -863,7 +863,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t177 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t178 = #t177 as{TypeError,ForNonNullableByDefault} core::int;
#t175.{core::Set::add}(#t178);
#t175.{core::Set::add}{Invariant}(#t178);
}
}
}
@ -884,7 +884,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t181 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t182 = #t181 as{TypeError,ForNonNullableByDefault} core::int;
#t179.{core::Set::add}(#t182);
#t179.{core::Set::add}{Invariant}(#t182);
}
}
}
@ -903,7 +903,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t184{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t185 = :sync-for-iterator.{core::Iterator::current};
#t183.{core::Map::[]=}(#t185.{core::MapEntry::key}, #t185.{core::MapEntry::value});
#t183.{core::Map::[]=}{Invariant}(#t185.{core::MapEntry::key}, #t185.{core::MapEntry::value});
}
}
}
@ -919,7 +919,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t188 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t189 = #t188 as{TypeError,ForNonNullableByDefault} core::int;
#t186.{core::Set::add}(#t189);
#t186.{core::Set::add}{Invariant}(#t189);
}
}
}
@ -934,7 +934,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t192 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t193 = #t192 as{TypeError,ForNonNullableByDefault} core::int;
#t190.{core::Set::add}(#t193);
#t190.{core::Set::add}{Invariant}(#t193);
}
}
}
@ -949,7 +949,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
final dynamic #t196 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t197 = #t196 as{TypeError,ForNonNullableByDefault} core::int;
#t194.{core::Set::add}(#t197);
#t194.{core::Set::add}{Invariant}(#t197);
}
}
}
@ -962,7 +962,7 @@ static method bar<X extends core::List<core::int>? = core::List<core::int>?, Y e
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t199{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t200 = :sync-for-iterator.{core::Iterator::current};
#t198.{core::Map::[]=}(#t200.{core::MapEntry::key}, #t200.{core::MapEntry::value});
#t198.{core::Map::[]=}{Invariant}(#t200.{core::MapEntry::key}, #t200.{core::MapEntry::value});
}
}
}

View file

@ -113,7 +113,7 @@ No types are needed, the first is given by 'on', the second is always 'StackTrac
block {
final core::List<core::int> #t1 = <core::int>[];
for (core::int i = 0; i.{core::num::<}(10); i = i.{core::num::+}(1))
#t1.{core::List::add}(i);
#t1.{core::List::add}{Invariant}(i);
} =>#t1;
}
static method hest() → dynamic async {

View file

@ -120,7 +120,7 @@ No types are needed, the first is given by 'on', the second is always 'StackTrac
block {
final core::List<core::int> #t1 = <core::int>[];
for (core::int i = 0; i.{core::num::<}(10); i = i.{core::num::+}(1))
#t1.{core::List::add}(i);
#t1.{core::List::add}{Invariant}(i);
} =>#t1;
}
static method hest() → dynamic /* originally async */ {

View file

@ -113,7 +113,7 @@ No types are needed, the first is given by 'on', the second is always 'StackTrac
block {
final core::List<core::int> #t1 = <core::int>[];
for (core::int i = 0; i.{core::num::<}(10); i = i.{core::num::+}(1))
#t1.{core::List::add}(i);
#t1.{core::List::add}{Invariant}(i);
} =>#t1;
}
static method hest() → dynamic async {

View file

@ -120,7 +120,7 @@ No types are needed, the first is given by 'on', the second is always 'StackTrac
block {
final core::List<core::int> #t1 = <core::int>[];
for (core::int i = 0; i.{core::num::<}(10); i = i.{core::num::+}(1))
#t1.{core::List::add}(i);
#t1.{core::List::add}{Invariant}(i);
} =>#t1;
}
static method hest() → dynamic /* originally async */ {

View file

@ -7,78 +7,78 @@ static method main() → dynamic {
core::List<core::int>? list = null;
core::print( block {
final core::List<core::int> #t1 = <core::int>[];
#t1.{core::List::add}(1);
#t1.{core::List::add}(2);
#t1.{core::List::add}{Invariant}(1);
#t1.{core::List::add}{Invariant}(2);
final core::Iterable<core::int>? #t2 = list;
if(!#t2.{core::Object::==}(null))
for (final core::int #t3 in #t2{core::Iterable<core::int>})
#t1.{core::List::add}(#t3);
#t1.{core::List::add}(3);
#t1.{core::List::add}{Invariant}(#t3);
#t1.{core::List::add}{Invariant}(3);
} =>#t1);
core::print( block {
final core::List<core::int> #t4 = <core::int>[];
#t4.{core::List::add}(1);
#t4.{core::List::add}(2);
#t4.{core::List::add}{Invariant}(1);
#t4.{core::List::add}{Invariant}(2);
final core::Iterable<core::int>? #t5 = null;
if(!#t5.{core::Object::==}(null))
for (final core::int #t6 in #t5{core::Iterable<core::int>})
#t4.{core::List::add}(#t6);
#t4.{core::List::add}(3);
#t4.{core::List::add}{Invariant}(#t6);
#t4.{core::List::add}{Invariant}(3);
} =>#t4);
core::List<core::int> list1 = block {
final core::List<core::int> #t7 = <core::int>[];
final core::Iterable<core::int>? #t8 = list;
if(!#t8.{core::Object::==}(null))
for (final core::int #t9 in #t8{core::Iterable<core::int>})
#t7.{core::List::add}(#t9);
#t7.{core::List::add}{Invariant}(#t9);
} =>#t7;
core::List<Never> list2 = block {
final core::List<Never> #t10 = <Never>[];
final core::Iterable<Never>? #t11 = null;
if(!#t11.{core::Object::==}(null))
for (final Never #t12 in #t11{core::Iterable<Never>})
#t10.{core::List::add}(#t12);
#t10.{core::List::add}{Invariant}(#t12);
} =>#t10;
core::List<core::int> list3 = block {
final core::List<core::int> #t13 = <core::int>[];
#t13.{core::List::add}(1);
#t13.{core::List::add}(2);
#t13.{core::List::add}{Invariant}(1);
#t13.{core::List::add}{Invariant}(2);
final core::Iterable<core::int>? #t14 = list;
if(!#t14.{core::Object::==}(null))
for (final core::int #t15 in #t14{core::Iterable<core::int>})
#t13.{core::List::add}(#t15);
#t13.{core::List::add}(3);
#t13.{core::List::add}{Invariant}(#t15);
#t13.{core::List::add}{Invariant}(3);
} =>#t13;
core::List<core::int> list4 = block {
final core::List<core::int> #t16 = <core::int>[];
#t16.{core::List::add}(1);
#t16.{core::List::add}(2);
#t16.{core::List::add}{Invariant}(1);
#t16.{core::List::add}{Invariant}(2);
final core::Iterable<core::int>? #t17 = null;
if(!#t17.{core::Object::==}(null))
for (final core::int #t18 in #t17{core::Iterable<core::int>})
#t16.{core::List::add}(#t18);
#t16.{core::List::add}(3);
#t16.{core::List::add}{Invariant}(#t18);
#t16.{core::List::add}{Invariant}(3);
} =>#t16;
core::Set<core::int>? set = null;
core::print( block {
final core::Set<core::int> #t19 = col::LinkedHashSet::•<core::int>();
#t19.{core::Set::add}(1);
#t19.{core::Set::add}(2);
#t19.{core::Set::add}{Invariant}(1);
#t19.{core::Set::add}{Invariant}(2);
final core::Iterable<core::int>? #t20 = set;
if(!#t20.{core::Object::==}(null))
for (final core::int #t21 in #t20{core::Iterable<core::int>})
#t19.{core::Set::add}(#t21);
#t19.{core::Set::add}(3);
#t19.{core::Set::add}{Invariant}(#t21);
#t19.{core::Set::add}{Invariant}(3);
} =>#t19);
core::print( block {
final core::Set<core::int> #t22 = col::LinkedHashSet::•<core::int>();
#t22.{core::Set::add}(1);
#t22.{core::Set::add}(2);
#t22.{core::Set::add}{Invariant}(1);
#t22.{core::Set::add}{Invariant}(2);
final core::Iterable<core::int>? #t23 = null;
if(!#t23.{core::Object::==}(null))
for (final core::int #t24 in #t23{core::Iterable<core::int>})
#t22.{core::Set::add}(#t24);
#t22.{core::Set::add}(3);
#t22.{core::Set::add}{Invariant}(#t24);
#t22.{core::Set::add}{Invariant}(3);
} =>#t22);
core::Set<core::int> set1 = block {
final core::Set<core::int> #t25 = col::LinkedHashSet::•<core::int>();
@ -86,75 +86,75 @@ static method main() → dynamic {
if(!#t26.{core::Object::==}(null))
for (final dynamic #t27 in #t26{core::Iterable<dynamic>}) {
final core::int #t28 = #t27 as{TypeError,ForNonNullableByDefault} core::int;
#t25.{core::Set::add}(#t28);
#t25.{core::Set::add}{Invariant}(#t28);
}
} =>#t25;
core::Set<core::int> set3 = block {
final core::Set<core::int> #t29 = col::LinkedHashSet::•<core::int>();
#t29.{core::Set::add}(1);
#t29.{core::Set::add}(2);
#t29.{core::Set::add}{Invariant}(1);
#t29.{core::Set::add}{Invariant}(2);
final core::Iterable<core::int>? #t30 = set;
if(!#t30.{core::Object::==}(null))
for (final core::int #t31 in #t30{core::Iterable<core::int>})
#t29.{core::Set::add}(#t31);
#t29.{core::Set::add}(3);
#t29.{core::Set::add}{Invariant}(#t31);
#t29.{core::Set::add}{Invariant}(3);
} =>#t29;
core::Set<core::int> set4 = block {
final core::Set<core::int> #t32 = col::LinkedHashSet::•<core::int>();
#t32.{core::Set::add}(1);
#t32.{core::Set::add}(2);
#t32.{core::Set::add}{Invariant}(1);
#t32.{core::Set::add}{Invariant}(2);
final core::Iterable<core::int>? #t33 = null;
if(!#t33.{core::Object::==}(null))
for (final core::int #t34 in #t33{core::Iterable<core::int>})
#t32.{core::Set::add}(#t34);
#t32.{core::Set::add}(3);
#t32.{core::Set::add}{Invariant}(#t34);
#t32.{core::Set::add}{Invariant}(3);
} =>#t32;
core::Map<core::int, core::int>? map = null;
core::print( block {
final core::Map<core::int, core::int> #t35 = <core::int, core::int>{};
#t35.{core::Map::[]=}(1, 1);
#t35.{core::Map::[]=}(2, 2);
#t35.{core::Map::[]=}{Invariant}(1, 1);
#t35.{core::Map::[]=}{Invariant}(2, 2);
final core::Map<core::int, core::int>? #t36 = map;
if(!#t36.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t37 in #t36{core::Map<core::int, core::int>}.{core::Map::entries})
#t35.{core::Map::[]=}(#t37.{core::MapEntry::key}, #t37.{core::MapEntry::value});
#t35.{core::Map::[]=}(3, 3);
#t35.{core::Map::[]=}{Invariant}(#t37.{core::MapEntry::key}, #t37.{core::MapEntry::value});
#t35.{core::Map::[]=}{Invariant}(3, 3);
} =>#t35);
core::print( block {
final core::Map<core::int, core::int> #t38 = <core::int, core::int>{};
#t38.{core::Map::[]=}(1, 1);
#t38.{core::Map::[]=}(2, 2);
#t38.{core::Map::[]=}{Invariant}(1, 1);
#t38.{core::Map::[]=}{Invariant}(2, 2);
final core::Map<core::int, core::int>? #t39 = null;
if(!#t39.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t40 in #t39{core::Map<core::int, core::int>}.{core::Map::entries})
#t38.{core::Map::[]=}(#t40.{core::MapEntry::key}, #t40.{core::MapEntry::value});
#t38.{core::Map::[]=}(3, 3);
#t38.{core::Map::[]=}{Invariant}(#t40.{core::MapEntry::key}, #t40.{core::MapEntry::value});
#t38.{core::Map::[]=}{Invariant}(3, 3);
} =>#t38);
core::Map<core::int, core::int> map1 = block {
final core::Map<core::int, core::int> #t41 = <core::int, core::int>{};
final core::Map<core::int, core::int>? #t42 = map;
if(!#t42.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t43 in #t42{core::Map<core::int, core::int>}.{core::Map::entries})
#t41.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
#t41.{core::Map::[]=}{Invariant}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
} =>#t41;
core::Map<core::int, core::int> map3 = block {
final core::Map<core::int, core::int> #t44 = <core::int, core::int>{};
#t44.{core::Map::[]=}(1, 1);
#t44.{core::Map::[]=}(2, 2);
#t44.{core::Map::[]=}{Invariant}(1, 1);
#t44.{core::Map::[]=}{Invariant}(2, 2);
final core::Map<core::int, core::int>? #t45 = map;
if(!#t45.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t46 in #t45{core::Map<core::int, core::int>}.{core::Map::entries})
#t44.{core::Map::[]=}(#t46.{core::MapEntry::key}, #t46.{core::MapEntry::value});
#t44.{core::Map::[]=}(3, 3);
#t44.{core::Map::[]=}{Invariant}(#t46.{core::MapEntry::key}, #t46.{core::MapEntry::value});
#t44.{core::Map::[]=}{Invariant}(3, 3);
} =>#t44;
core::Map<core::int, core::int> map4 = block {
final core::Map<core::int, core::int> #t47 = <core::int, core::int>{};
#t47.{core::Map::[]=}(1, 1);
#t47.{core::Map::[]=}(2, 2);
#t47.{core::Map::[]=}{Invariant}(1, 1);
#t47.{core::Map::[]=}{Invariant}(2, 2);
final core::Map<core::int, core::int>? #t48 = null;
if(!#t48.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t49 in #t48{core::Map<core::int, core::int>}.{core::Map::entries})
#t47.{core::Map::[]=}(#t49.{core::MapEntry::key}, #t49.{core::MapEntry::value});
#t47.{core::Map::[]=}(3, 3);
#t47.{core::Map::[]=}{Invariant}(#t49.{core::MapEntry::key}, #t49.{core::MapEntry::value});
#t47.{core::Map::[]=}{Invariant}(3, 3);
} =>#t47;
}

View file

@ -7,31 +7,31 @@ static method main() → dynamic {
core::List<core::int>? list = null;
core::print( block {
final core::List<core::int> #t1 = <core::int>[];
#t1.{core::List::add}(1);
#t1.{core::List::add}(2);
#t1.{core::List::add}{Invariant}(1);
#t1.{core::List::add}{Invariant}(2);
final core::Iterable<core::int>? #t2 = list;
if(!#t2.{core::Object::==}(null)) {
core::Iterator<core::int> :sync-for-iterator = #t2{core::Iterable<core::int>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int #t3 = :sync-for-iterator.{core::Iterator::current};
#t1.{core::List::add}(#t3);
#t1.{core::List::add}{Invariant}(#t3);
}
}
#t1.{core::List::add}(3);
#t1.{core::List::add}{Invariant}(3);
} =>#t1);
core::print( block {
final core::List<core::int> #t4 = <core::int>[];
#t4.{core::List::add}(1);
#t4.{core::List::add}(2);
#t4.{core::List::add}{Invariant}(1);
#t4.{core::List::add}{Invariant}(2);
final core::Iterable<core::int>? #t5 = null;
if(!#t5.{core::Object::==}(null)) {
core::Iterator<core::int> :sync-for-iterator = #t5{core::Iterable<core::int>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int #t6 = :sync-for-iterator.{core::Iterator::current};
#t4.{core::List::add}(#t6);
#t4.{core::List::add}{Invariant}(#t6);
}
}
#t4.{core::List::add}(3);
#t4.{core::List::add}{Invariant}(3);
} =>#t4);
core::List<core::int> list1 = block {
final core::List<core::int> #t7 = <core::int>[];
@ -40,7 +40,7 @@ static method main() → dynamic {
core::Iterator<core::int> :sync-for-iterator = #t8{core::Iterable<core::int>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int #t9 = :sync-for-iterator.{core::Iterator::current};
#t7.{core::List::add}(#t9);
#t7.{core::List::add}{Invariant}(#t9);
}
}
} =>#t7;
@ -51,66 +51,66 @@ static method main() → dynamic {
core::Iterator<Never> :sync-for-iterator = #t11{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t12 = :sync-for-iterator.{core::Iterator::current};
#t10.{core::List::add}(#t12);
#t10.{core::List::add}{Invariant}(#t12);
}
}
} =>#t10;
core::List<core::int> list3 = block {
final core::List<core::int> #t13 = <core::int>[];
#t13.{core::List::add}(1);
#t13.{core::List::add}(2);
#t13.{core::List::add}{Invariant}(1);
#t13.{core::List::add}{Invariant}(2);
final core::Iterable<core::int>? #t14 = list;
if(!#t14.{core::Object::==}(null)) {
core::Iterator<core::int> :sync-for-iterator = #t14{core::Iterable<core::int>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int #t15 = :sync-for-iterator.{core::Iterator::current};
#t13.{core::List::add}(#t15);
#t13.{core::List::add}{Invariant}(#t15);
}
}
#t13.{core::List::add}(3);
#t13.{core::List::add}{Invariant}(3);
} =>#t13;
core::List<core::int> list4 = block {
final core::List<core::int> #t16 = <core::int>[];
#t16.{core::List::add}(1);
#t16.{core::List::add}(2);
#t16.{core::List::add}{Invariant}(1);
#t16.{core::List::add}{Invariant}(2);
final core::Iterable<core::int>? #t17 = null;
if(!#t17.{core::Object::==}(null)) {
core::Iterator<core::int> :sync-for-iterator = #t17{core::Iterable<core::int>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int #t18 = :sync-for-iterator.{core::Iterator::current};
#t16.{core::List::add}(#t18);
#t16.{core::List::add}{Invariant}(#t18);
}
}
#t16.{core::List::add}(3);
#t16.{core::List::add}{Invariant}(3);
} =>#t16;
core::Set<core::int>? set = null;
core::print( block {
final core::Set<core::int> #t19 = new col::_CompactLinkedHashSet::•<core::int>();
#t19.{core::Set::add}(1);
#t19.{core::Set::add}(2);
#t19.{core::Set::add}{Invariant}(1);
#t19.{core::Set::add}{Invariant}(2);
final core::Iterable<core::int>? #t20 = set;
if(!#t20.{core::Object::==}(null)) {
core::Iterator<core::int> :sync-for-iterator = #t20{core::Iterable<core::int>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int #t21 = :sync-for-iterator.{core::Iterator::current};
#t19.{core::Set::add}(#t21);
#t19.{core::Set::add}{Invariant}(#t21);
}
}
#t19.{core::Set::add}(3);
#t19.{core::Set::add}{Invariant}(3);
} =>#t19);
core::print( block {
final core::Set<core::int> #t22 = new col::_CompactLinkedHashSet::•<core::int>();
#t22.{core::Set::add}(1);
#t22.{core::Set::add}(2);
#t22.{core::Set::add}{Invariant}(1);
#t22.{core::Set::add}{Invariant}(2);
final core::Iterable<core::int>? #t23 = null;
if(!#t23.{core::Object::==}(null)) {
core::Iterator<core::int> :sync-for-iterator = #t23{core::Iterable<core::int>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int #t24 = :sync-for-iterator.{core::Iterator::current};
#t22.{core::Set::add}(#t24);
#t22.{core::Set::add}{Invariant}(#t24);
}
}
#t22.{core::Set::add}(3);
#t22.{core::Set::add}{Invariant}(3);
} =>#t22);
core::Set<core::int> set1 = block {
final core::Set<core::int> #t25 = new col::_CompactLinkedHashSet::•<core::int>();
@ -121,67 +121,67 @@ static method main() → dynamic {
final dynamic #t27 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t28 = #t27 as{TypeError,ForNonNullableByDefault} core::int;
#t25.{core::Set::add}(#t28);
#t25.{core::Set::add}{Invariant}(#t28);
}
}
}
} =>#t25;
core::Set<core::int> set3 = block {
final core::Set<core::int> #t29 = new col::_CompactLinkedHashSet::•<core::int>();
#t29.{core::Set::add}(1);
#t29.{core::Set::add}(2);
#t29.{core::Set::add}{Invariant}(1);
#t29.{core::Set::add}{Invariant}(2);
final core::Iterable<core::int>? #t30 = set;
if(!#t30.{core::Object::==}(null)) {
core::Iterator<core::int> :sync-for-iterator = #t30{core::Iterable<core::int>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int #t31 = :sync-for-iterator.{core::Iterator::current};
#t29.{core::Set::add}(#t31);
#t29.{core::Set::add}{Invariant}(#t31);
}
}
#t29.{core::Set::add}(3);
#t29.{core::Set::add}{Invariant}(3);
} =>#t29;
core::Set<core::int> set4 = block {
final core::Set<core::int> #t32 = new col::_CompactLinkedHashSet::•<core::int>();
#t32.{core::Set::add}(1);
#t32.{core::Set::add}(2);
#t32.{core::Set::add}{Invariant}(1);
#t32.{core::Set::add}{Invariant}(2);
final core::Iterable<core::int>? #t33 = null;
if(!#t33.{core::Object::==}(null)) {
core::Iterator<core::int> :sync-for-iterator = #t33{core::Iterable<core::int>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int #t34 = :sync-for-iterator.{core::Iterator::current};
#t32.{core::Set::add}(#t34);
#t32.{core::Set::add}{Invariant}(#t34);
}
}
#t32.{core::Set::add}(3);
#t32.{core::Set::add}{Invariant}(3);
} =>#t32;
core::Map<core::int, core::int>? map = null;
core::print( block {
final core::Map<core::int, core::int> #t35 = <core::int, core::int>{};
#t35.{core::Map::[]=}(1, 1);
#t35.{core::Map::[]=}(2, 2);
#t35.{core::Map::[]=}{Invariant}(1, 1);
#t35.{core::Map::[]=}{Invariant}(2, 2);
final core::Map<core::int, core::int>? #t36 = map;
if(!#t36.{core::Object::==}(null)) {
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t36{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t37 = :sync-for-iterator.{core::Iterator::current};
#t35.{core::Map::[]=}(#t37.{core::MapEntry::key}, #t37.{core::MapEntry::value});
#t35.{core::Map::[]=}{Invariant}(#t37.{core::MapEntry::key}, #t37.{core::MapEntry::value});
}
}
#t35.{core::Map::[]=}(3, 3);
#t35.{core::Map::[]=}{Invariant}(3, 3);
} =>#t35);
core::print( block {
final core::Map<core::int, core::int> #t38 = <core::int, core::int>{};
#t38.{core::Map::[]=}(1, 1);
#t38.{core::Map::[]=}(2, 2);
#t38.{core::Map::[]=}{Invariant}(1, 1);
#t38.{core::Map::[]=}{Invariant}(2, 2);
final core::Map<core::int, core::int>? #t39 = null;
if(!#t39.{core::Object::==}(null)) {
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t39{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t40 = :sync-for-iterator.{core::Iterator::current};
#t38.{core::Map::[]=}(#t40.{core::MapEntry::key}, #t40.{core::MapEntry::value});
#t38.{core::Map::[]=}{Invariant}(#t40.{core::MapEntry::key}, #t40.{core::MapEntry::value});
}
}
#t38.{core::Map::[]=}(3, 3);
#t38.{core::Map::[]=}{Invariant}(3, 3);
} =>#t38);
core::Map<core::int, core::int> map1 = block {
final core::Map<core::int, core::int> #t41 = <core::int, core::int>{};
@ -190,36 +190,36 @@ static method main() → dynamic {
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t42{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t43 = :sync-for-iterator.{core::Iterator::current};
#t41.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
#t41.{core::Map::[]=}{Invariant}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
}
}
} =>#t41;
core::Map<core::int, core::int> map3 = block {
final core::Map<core::int, core::int> #t44 = <core::int, core::int>{};
#t44.{core::Map::[]=}(1, 1);
#t44.{core::Map::[]=}(2, 2);
#t44.{core::Map::[]=}{Invariant}(1, 1);
#t44.{core::Map::[]=}{Invariant}(2, 2);
final core::Map<core::int, core::int>? #t45 = map;
if(!#t45.{core::Object::==}(null)) {
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t45{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t46 = :sync-for-iterator.{core::Iterator::current};
#t44.{core::Map::[]=}(#t46.{core::MapEntry::key}, #t46.{core::MapEntry::value});
#t44.{core::Map::[]=}{Invariant}(#t46.{core::MapEntry::key}, #t46.{core::MapEntry::value});
}
}
#t44.{core::Map::[]=}(3, 3);
#t44.{core::Map::[]=}{Invariant}(3, 3);
} =>#t44;
core::Map<core::int, core::int> map4 = block {
final core::Map<core::int, core::int> #t47 = <core::int, core::int>{};
#t47.{core::Map::[]=}(1, 1);
#t47.{core::Map::[]=}(2, 2);
#t47.{core::Map::[]=}{Invariant}(1, 1);
#t47.{core::Map::[]=}{Invariant}(2, 2);
final core::Map<core::int, core::int>? #t48 = null;
if(!#t48.{core::Object::==}(null)) {
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t48{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t49 = :sync-for-iterator.{core::Iterator::current};
#t47.{core::Map::[]=}(#t49.{core::MapEntry::key}, #t49.{core::MapEntry::value});
#t47.{core::Map::[]=}{Invariant}(#t49.{core::MapEntry::key}, #t49.{core::MapEntry::value});
}
}
#t47.{core::Map::[]=}(3, 3);
#t47.{core::Map::[]=}{Invariant}(3, 3);
} =>#t47;
}

View file

@ -7,78 +7,78 @@ static method main() → dynamic {
core::List<core::int>? list = null;
core::print( block {
final core::List<core::int> #t1 = <core::int>[];
#t1.{core::List::add}(1);
#t1.{core::List::add}(2);
#t1.{core::List::add}{Invariant}(1);
#t1.{core::List::add}{Invariant}(2);
final core::Iterable<core::int>? #t2 = list;
if(!#t2.{core::Object::==}(null))
for (final core::int #t3 in #t2{core::Iterable<core::int>})
#t1.{core::List::add}(#t3);
#t1.{core::List::add}(3);
#t1.{core::List::add}{Invariant}(#t3);
#t1.{core::List::add}{Invariant}(3);
} =>#t1);
core::print( block {
final core::List<core::int> #t4 = <core::int>[];
#t4.{core::List::add}(1);
#t4.{core::List::add}(2);
#t4.{core::List::add}{Invariant}(1);
#t4.{core::List::add}{Invariant}(2);
final core::Iterable<core::int>? #t5 = null;
if(!#t5.{core::Object::==}(null))
for (final core::int #t6 in #t5{core::Iterable<core::int>})
#t4.{core::List::add}(#t6);
#t4.{core::List::add}(3);
#t4.{core::List::add}{Invariant}(#t6);
#t4.{core::List::add}{Invariant}(3);
} =>#t4);
core::List<core::int> list1 = block {
final core::List<core::int> #t7 = <core::int>[];
final core::Iterable<core::int>? #t8 = list;
if(!#t8.{core::Object::==}(null))
for (final core::int #t9 in #t8{core::Iterable<core::int>})
#t7.{core::List::add}(#t9);
#t7.{core::List::add}{Invariant}(#t9);
} =>#t7;
core::List<Never> list2 = block {
final core::List<Never> #t10 = <Never>[];
final core::Iterable<Never>? #t11 = null;
if(!#t11.{core::Object::==}(null))
for (final Never #t12 in #t11{core::Iterable<Never>})
#t10.{core::List::add}(#t12);
#t10.{core::List::add}{Invariant}(#t12);
} =>#t10;
core::List<core::int> list3 = block {
final core::List<core::int> #t13 = <core::int>[];
#t13.{core::List::add}(1);
#t13.{core::List::add}(2);
#t13.{core::List::add}{Invariant}(1);
#t13.{core::List::add}{Invariant}(2);
final core::Iterable<core::int>? #t14 = list;
if(!#t14.{core::Object::==}(null))
for (final core::int #t15 in #t14{core::Iterable<core::int>})
#t13.{core::List::add}(#t15);
#t13.{core::List::add}(3);
#t13.{core::List::add}{Invariant}(#t15);
#t13.{core::List::add}{Invariant}(3);
} =>#t13;
core::List<core::int> list4 = block {
final core::List<core::int> #t16 = <core::int>[];
#t16.{core::List::add}(1);
#t16.{core::List::add}(2);
#t16.{core::List::add}{Invariant}(1);
#t16.{core::List::add}{Invariant}(2);
final core::Iterable<core::int>? #t17 = null;
if(!#t17.{core::Object::==}(null))
for (final core::int #t18 in #t17{core::Iterable<core::int>})
#t16.{core::List::add}(#t18);
#t16.{core::List::add}(3);
#t16.{core::List::add}{Invariant}(#t18);
#t16.{core::List::add}{Invariant}(3);
} =>#t16;
core::Set<core::int>? set = null;
core::print( block {
final core::Set<core::int> #t19 = col::LinkedHashSet::•<core::int>();
#t19.{core::Set::add}(1);
#t19.{core::Set::add}(2);
#t19.{core::Set::add}{Invariant}(1);
#t19.{core::Set::add}{Invariant}(2);
final core::Iterable<core::int>? #t20 = set;
if(!#t20.{core::Object::==}(null))
for (final core::int #t21 in #t20{core::Iterable<core::int>})
#t19.{core::Set::add}(#t21);
#t19.{core::Set::add}(3);
#t19.{core::Set::add}{Invariant}(#t21);
#t19.{core::Set::add}{Invariant}(3);
} =>#t19);
core::print( block {
final core::Set<core::int> #t22 = col::LinkedHashSet::•<core::int>();
#t22.{core::Set::add}(1);
#t22.{core::Set::add}(2);
#t22.{core::Set::add}{Invariant}(1);
#t22.{core::Set::add}{Invariant}(2);
final core::Iterable<core::int>? #t23 = null;
if(!#t23.{core::Object::==}(null))
for (final core::int #t24 in #t23{core::Iterable<core::int>})
#t22.{core::Set::add}(#t24);
#t22.{core::Set::add}(3);
#t22.{core::Set::add}{Invariant}(#t24);
#t22.{core::Set::add}{Invariant}(3);
} =>#t22);
core::Set<core::int> set1 = block {
final core::Set<core::int> #t25 = col::LinkedHashSet::•<core::int>();
@ -86,75 +86,75 @@ static method main() → dynamic {
if(!#t26.{core::Object::==}(null))
for (final dynamic #t27 in #t26{core::Iterable<dynamic>}) {
final core::int #t28 = #t27 as{TypeError,ForNonNullableByDefault} core::int;
#t25.{core::Set::add}(#t28);
#t25.{core::Set::add}{Invariant}(#t28);
}
} =>#t25;
core::Set<core::int> set3 = block {
final core::Set<core::int> #t29 = col::LinkedHashSet::•<core::int>();
#t29.{core::Set::add}(1);
#t29.{core::Set::add}(2);
#t29.{core::Set::add}{Invariant}(1);
#t29.{core::Set::add}{Invariant}(2);
final core::Iterable<core::int>? #t30 = set;
if(!#t30.{core::Object::==}(null))
for (final core::int #t31 in #t30{core::Iterable<core::int>})
#t29.{core::Set::add}(#t31);
#t29.{core::Set::add}(3);
#t29.{core::Set::add}{Invariant}(#t31);
#t29.{core::Set::add}{Invariant}(3);
} =>#t29;
core::Set<core::int> set4 = block {
final core::Set<core::int> #t32 = col::LinkedHashSet::•<core::int>();
#t32.{core::Set::add}(1);
#t32.{core::Set::add}(2);
#t32.{core::Set::add}{Invariant}(1);
#t32.{core::Set::add}{Invariant}(2);
final core::Iterable<core::int>? #t33 = null;
if(!#t33.{core::Object::==}(null))
for (final core::int #t34 in #t33{core::Iterable<core::int>})
#t32.{core::Set::add}(#t34);
#t32.{core::Set::add}(3);
#t32.{core::Set::add}{Invariant}(#t34);
#t32.{core::Set::add}{Invariant}(3);
} =>#t32;
core::Map<core::int, core::int>? map = null;
core::print( block {
final core::Map<core::int, core::int> #t35 = <core::int, core::int>{};
#t35.{core::Map::[]=}(1, 1);
#t35.{core::Map::[]=}(2, 2);
#t35.{core::Map::[]=}{Invariant}(1, 1);
#t35.{core::Map::[]=}{Invariant}(2, 2);
final core::Map<core::int, core::int>? #t36 = map;
if(!#t36.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t37 in #t36{core::Map<core::int, core::int>}.{core::Map::entries})
#t35.{core::Map::[]=}(#t37.{core::MapEntry::key}, #t37.{core::MapEntry::value});
#t35.{core::Map::[]=}(3, 3);
#t35.{core::Map::[]=}{Invariant}(#t37.{core::MapEntry::key}, #t37.{core::MapEntry::value});
#t35.{core::Map::[]=}{Invariant}(3, 3);
} =>#t35);
core::print( block {
final core::Map<core::int, core::int> #t38 = <core::int, core::int>{};
#t38.{core::Map::[]=}(1, 1);
#t38.{core::Map::[]=}(2, 2);
#t38.{core::Map::[]=}{Invariant}(1, 1);
#t38.{core::Map::[]=}{Invariant}(2, 2);
final core::Map<core::int, core::int>? #t39 = null;
if(!#t39.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t40 in #t39{core::Map<core::int, core::int>}.{core::Map::entries})
#t38.{core::Map::[]=}(#t40.{core::MapEntry::key}, #t40.{core::MapEntry::value});
#t38.{core::Map::[]=}(3, 3);
#t38.{core::Map::[]=}{Invariant}(#t40.{core::MapEntry::key}, #t40.{core::MapEntry::value});
#t38.{core::Map::[]=}{Invariant}(3, 3);
} =>#t38);
core::Map<core::int, core::int> map1 = block {
final core::Map<core::int, core::int> #t41 = <core::int, core::int>{};
final core::Map<core::int, core::int>? #t42 = map;
if(!#t42.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t43 in #t42{core::Map<core::int, core::int>}.{core::Map::entries})
#t41.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
#t41.{core::Map::[]=}{Invariant}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
} =>#t41;
core::Map<core::int, core::int> map3 = block {
final core::Map<core::int, core::int> #t44 = <core::int, core::int>{};
#t44.{core::Map::[]=}(1, 1);
#t44.{core::Map::[]=}(2, 2);
#t44.{core::Map::[]=}{Invariant}(1, 1);
#t44.{core::Map::[]=}{Invariant}(2, 2);
final core::Map<core::int, core::int>? #t45 = map;
if(!#t45.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t46 in #t45{core::Map<core::int, core::int>}.{core::Map::entries})
#t44.{core::Map::[]=}(#t46.{core::MapEntry::key}, #t46.{core::MapEntry::value});
#t44.{core::Map::[]=}(3, 3);
#t44.{core::Map::[]=}{Invariant}(#t46.{core::MapEntry::key}, #t46.{core::MapEntry::value});
#t44.{core::Map::[]=}{Invariant}(3, 3);
} =>#t44;
core::Map<core::int, core::int> map4 = block {
final core::Map<core::int, core::int> #t47 = <core::int, core::int>{};
#t47.{core::Map::[]=}(1, 1);
#t47.{core::Map::[]=}(2, 2);
#t47.{core::Map::[]=}{Invariant}(1, 1);
#t47.{core::Map::[]=}{Invariant}(2, 2);
final core::Map<core::int, core::int>? #t48 = null;
if(!#t48.{core::Object::==}(null))
for (final core::MapEntry<core::int, core::int> #t49 in #t48{core::Map<core::int, core::int>}.{core::Map::entries})
#t47.{core::Map::[]=}(#t49.{core::MapEntry::key}, #t49.{core::MapEntry::value});
#t47.{core::Map::[]=}(3, 3);
#t47.{core::Map::[]=}{Invariant}(#t49.{core::MapEntry::key}, #t49.{core::MapEntry::value});
#t47.{core::Map::[]=}{Invariant}(3, 3);
} =>#t47;
}

View file

@ -7,31 +7,31 @@ static method main() → dynamic {
core::List<core::int>? list = null;
core::print( block {
final core::List<core::int> #t1 = <core::int>[];
#t1.{core::List::add}(1);
#t1.{core::List::add}(2);
#t1.{core::List::add}{Invariant}(1);
#t1.{core::List::add}{Invariant}(2);
final core::Iterable<core::int>? #t2 = list;
if(!#t2.{core::Object::==}(null)) {
core::Iterator<core::int> :sync-for-iterator = #t2{core::Iterable<core::int>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int #t3 = :sync-for-iterator.{core::Iterator::current};
#t1.{core::List::add}(#t3);
#t1.{core::List::add}{Invariant}(#t3);
}
}
#t1.{core::List::add}(3);
#t1.{core::List::add}{Invariant}(3);
} =>#t1);
core::print( block {
final core::List<core::int> #t4 = <core::int>[];
#t4.{core::List::add}(1);
#t4.{core::List::add}(2);
#t4.{core::List::add}{Invariant}(1);
#t4.{core::List::add}{Invariant}(2);
final core::Iterable<core::int>? #t5 = null;
if(!#t5.{core::Object::==}(null)) {
core::Iterator<core::int> :sync-for-iterator = #t5{core::Iterable<core::int>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int #t6 = :sync-for-iterator.{core::Iterator::current};
#t4.{core::List::add}(#t6);
#t4.{core::List::add}{Invariant}(#t6);
}
}
#t4.{core::List::add}(3);
#t4.{core::List::add}{Invariant}(3);
} =>#t4);
core::List<core::int> list1 = block {
final core::List<core::int> #t7 = <core::int>[];
@ -40,7 +40,7 @@ static method main() → dynamic {
core::Iterator<core::int> :sync-for-iterator = #t8{core::Iterable<core::int>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int #t9 = :sync-for-iterator.{core::Iterator::current};
#t7.{core::List::add}(#t9);
#t7.{core::List::add}{Invariant}(#t9);
}
}
} =>#t7;
@ -51,66 +51,66 @@ static method main() → dynamic {
core::Iterator<Never> :sync-for-iterator = #t11{core::Iterable<Never>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final Never #t12 = :sync-for-iterator.{core::Iterator::current};
#t10.{core::List::add}(#t12);
#t10.{core::List::add}{Invariant}(#t12);
}
}
} =>#t10;
core::List<core::int> list3 = block {
final core::List<core::int> #t13 = <core::int>[];
#t13.{core::List::add}(1);
#t13.{core::List::add}(2);
#t13.{core::List::add}{Invariant}(1);
#t13.{core::List::add}{Invariant}(2);
final core::Iterable<core::int>? #t14 = list;
if(!#t14.{core::Object::==}(null)) {
core::Iterator<core::int> :sync-for-iterator = #t14{core::Iterable<core::int>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int #t15 = :sync-for-iterator.{core::Iterator::current};
#t13.{core::List::add}(#t15);
#t13.{core::List::add}{Invariant}(#t15);
}
}
#t13.{core::List::add}(3);
#t13.{core::List::add}{Invariant}(3);
} =>#t13;
core::List<core::int> list4 = block {
final core::List<core::int> #t16 = <core::int>[];
#t16.{core::List::add}(1);
#t16.{core::List::add}(2);
#t16.{core::List::add}{Invariant}(1);
#t16.{core::List::add}{Invariant}(2);
final core::Iterable<core::int>? #t17 = null;
if(!#t17.{core::Object::==}(null)) {
core::Iterator<core::int> :sync-for-iterator = #t17{core::Iterable<core::int>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int #t18 = :sync-for-iterator.{core::Iterator::current};
#t16.{core::List::add}(#t18);
#t16.{core::List::add}{Invariant}(#t18);
}
}
#t16.{core::List::add}(3);
#t16.{core::List::add}{Invariant}(3);
} =>#t16;
core::Set<core::int>? set = null;
core::print( block {
final core::Set<core::int> #t19 = new col::_CompactLinkedHashSet::•<core::int>();
#t19.{core::Set::add}(1);
#t19.{core::Set::add}(2);
#t19.{core::Set::add}{Invariant}(1);
#t19.{core::Set::add}{Invariant}(2);
final core::Iterable<core::int>? #t20 = set;
if(!#t20.{core::Object::==}(null)) {
core::Iterator<core::int> :sync-for-iterator = #t20{core::Iterable<core::int>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int #t21 = :sync-for-iterator.{core::Iterator::current};
#t19.{core::Set::add}(#t21);
#t19.{core::Set::add}{Invariant}(#t21);
}
}
#t19.{core::Set::add}(3);
#t19.{core::Set::add}{Invariant}(3);
} =>#t19);
core::print( block {
final core::Set<core::int> #t22 = new col::_CompactLinkedHashSet::•<core::int>();
#t22.{core::Set::add}(1);
#t22.{core::Set::add}(2);
#t22.{core::Set::add}{Invariant}(1);
#t22.{core::Set::add}{Invariant}(2);
final core::Iterable<core::int>? #t23 = null;
if(!#t23.{core::Object::==}(null)) {
core::Iterator<core::int> :sync-for-iterator = #t23{core::Iterable<core::int>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int #t24 = :sync-for-iterator.{core::Iterator::current};
#t22.{core::Set::add}(#t24);
#t22.{core::Set::add}{Invariant}(#t24);
}
}
#t22.{core::Set::add}(3);
#t22.{core::Set::add}{Invariant}(3);
} =>#t22);
core::Set<core::int> set1 = block {
final core::Set<core::int> #t25 = new col::_CompactLinkedHashSet::•<core::int>();
@ -121,67 +121,67 @@ static method main() → dynamic {
final dynamic #t27 = :sync-for-iterator.{core::Iterator::current};
{
final core::int #t28 = #t27 as{TypeError,ForNonNullableByDefault} core::int;
#t25.{core::Set::add}(#t28);
#t25.{core::Set::add}{Invariant}(#t28);
}
}
}
} =>#t25;
core::Set<core::int> set3 = block {
final core::Set<core::int> #t29 = new col::_CompactLinkedHashSet::•<core::int>();
#t29.{core::Set::add}(1);
#t29.{core::Set::add}(2);
#t29.{core::Set::add}{Invariant}(1);
#t29.{core::Set::add}{Invariant}(2);
final core::Iterable<core::int>? #t30 = set;
if(!#t30.{core::Object::==}(null)) {
core::Iterator<core::int> :sync-for-iterator = #t30{core::Iterable<core::int>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int #t31 = :sync-for-iterator.{core::Iterator::current};
#t29.{core::Set::add}(#t31);
#t29.{core::Set::add}{Invariant}(#t31);
}
}
#t29.{core::Set::add}(3);
#t29.{core::Set::add}{Invariant}(3);
} =>#t29;
core::Set<core::int> set4 = block {
final core::Set<core::int> #t32 = new col::_CompactLinkedHashSet::•<core::int>();
#t32.{core::Set::add}(1);
#t32.{core::Set::add}(2);
#t32.{core::Set::add}{Invariant}(1);
#t32.{core::Set::add}{Invariant}(2);
final core::Iterable<core::int>? #t33 = null;
if(!#t33.{core::Object::==}(null)) {
core::Iterator<core::int> :sync-for-iterator = #t33{core::Iterable<core::int>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int #t34 = :sync-for-iterator.{core::Iterator::current};
#t32.{core::Set::add}(#t34);
#t32.{core::Set::add}{Invariant}(#t34);
}
}
#t32.{core::Set::add}(3);
#t32.{core::Set::add}{Invariant}(3);
} =>#t32;
core::Map<core::int, core::int>? map = null;
core::print( block {
final core::Map<core::int, core::int> #t35 = <core::int, core::int>{};
#t35.{core::Map::[]=}(1, 1);
#t35.{core::Map::[]=}(2, 2);
#t35.{core::Map::[]=}{Invariant}(1, 1);
#t35.{core::Map::[]=}{Invariant}(2, 2);
final core::Map<core::int, core::int>? #t36 = map;
if(!#t36.{core::Object::==}(null)) {
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t36{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t37 = :sync-for-iterator.{core::Iterator::current};
#t35.{core::Map::[]=}(#t37.{core::MapEntry::key}, #t37.{core::MapEntry::value});
#t35.{core::Map::[]=}{Invariant}(#t37.{core::MapEntry::key}, #t37.{core::MapEntry::value});
}
}
#t35.{core::Map::[]=}(3, 3);
#t35.{core::Map::[]=}{Invariant}(3, 3);
} =>#t35);
core::print( block {
final core::Map<core::int, core::int> #t38 = <core::int, core::int>{};
#t38.{core::Map::[]=}(1, 1);
#t38.{core::Map::[]=}(2, 2);
#t38.{core::Map::[]=}{Invariant}(1, 1);
#t38.{core::Map::[]=}{Invariant}(2, 2);
final core::Map<core::int, core::int>? #t39 = null;
if(!#t39.{core::Object::==}(null)) {
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t39{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t40 = :sync-for-iterator.{core::Iterator::current};
#t38.{core::Map::[]=}(#t40.{core::MapEntry::key}, #t40.{core::MapEntry::value});
#t38.{core::Map::[]=}{Invariant}(#t40.{core::MapEntry::key}, #t40.{core::MapEntry::value});
}
}
#t38.{core::Map::[]=}(3, 3);
#t38.{core::Map::[]=}{Invariant}(3, 3);
} =>#t38);
core::Map<core::int, core::int> map1 = block {
final core::Map<core::int, core::int> #t41 = <core::int, core::int>{};
@ -190,36 +190,36 @@ static method main() → dynamic {
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t42{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t43 = :sync-for-iterator.{core::Iterator::current};
#t41.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
#t41.{core::Map::[]=}{Invariant}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
}
}
} =>#t41;
core::Map<core::int, core::int> map3 = block {
final core::Map<core::int, core::int> #t44 = <core::int, core::int>{};
#t44.{core::Map::[]=}(1, 1);
#t44.{core::Map::[]=}(2, 2);
#t44.{core::Map::[]=}{Invariant}(1, 1);
#t44.{core::Map::[]=}{Invariant}(2, 2);
final core::Map<core::int, core::int>? #t45 = map;
if(!#t45.{core::Object::==}(null)) {
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t45{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t46 = :sync-for-iterator.{core::Iterator::current};
#t44.{core::Map::[]=}(#t46.{core::MapEntry::key}, #t46.{core::MapEntry::value});
#t44.{core::Map::[]=}{Invariant}(#t46.{core::MapEntry::key}, #t46.{core::MapEntry::value});
}
}
#t44.{core::Map::[]=}(3, 3);
#t44.{core::Map::[]=}{Invariant}(3, 3);
} =>#t44;
core::Map<core::int, core::int> map4 = block {
final core::Map<core::int, core::int> #t47 = <core::int, core::int>{};
#t47.{core::Map::[]=}(1, 1);
#t47.{core::Map::[]=}(2, 2);
#t47.{core::Map::[]=}{Invariant}(1, 1);
#t47.{core::Map::[]=}{Invariant}(2, 2);
final core::Map<core::int, core::int>? #t48 = null;
if(!#t48.{core::Object::==}(null)) {
core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t48{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int, core::int> #t49 = :sync-for-iterator.{core::Iterator::current};
#t47.{core::Map::[]=}(#t49.{core::MapEntry::key}, #t49.{core::MapEntry::value});
#t47.{core::Map::[]=}{Invariant}(#t49.{core::MapEntry::key}, #t49.{core::MapEntry::value});
}
}
#t47.{core::Map::[]=}(3, 3);
#t47.{core::Map::[]=}{Invariant}(3, 3);
} =>#t47;
}

View file

@ -142,7 +142,7 @@ static method warning(core::String s, core::List<core::String> l, core::Map<core
final core::Iterable<core::String>? #t6 = l;
if(!#t6.{core::Object::==}(null))
for (final core::String #t7 in #t6{core::Iterable<core::String>})
#t5.{core::List::add}(#t7);
#t5.{core::List::add}{Invariant}(#t7);
} =>#t5;
core::Set<core::String> a = block {
final core::Set<core::String> #t8 = col::LinkedHashSet::•<core::String>();
@ -150,7 +150,7 @@ static method warning(core::String s, core::List<core::String> l, core::Map<core
if(!#t9.{core::Object::==}(null))
for (final dynamic #t10 in #t9{core::Iterable<dynamic>}) {
final core::String #t11 = #t10 as{TypeError,ForNonNullableByDefault} core::String;
#t8.{core::Set::add}(#t11);
#t8.{core::Set::add}{Invariant}(#t11);
}
} =>#t8;
block {
@ -158,21 +158,21 @@ static method warning(core::String s, core::List<core::String> l, core::Map<core
final core::Iterable<core::String>? #t13 = l;
if(!#t13.{core::Object::==}(null))
for (final core::String #t14 in #t13{core::Iterable<core::String>})
#t12.{core::Set::add}(#t14);
#t12.{core::Set::add}{Invariant}(#t14);
} =>#t12;
core::Map<core::String, core::int> b = block {
final core::Map<core::String, core::int> #t15 = <core::String, core::int>{};
final core::Map<core::String, core::int>? #t16 = m;
if(!#t16.{core::Object::==}(null))
for (final core::MapEntry<core::String, core::int> #t17 in #t16{core::Map<core::String, core::int>}.{core::Map::entries})
#t15.{core::Map::[]=}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
#t15.{core::Map::[]=}{Invariant}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
} =>#t15;
block {
final core::Map<core::String, core::int> #t18 = <core::String, core::int>{};
final core::Map<core::String, core::int>? #t19 = m;
if(!#t19.{core::Object::==}(null))
for (final core::MapEntry<core::String, core::int> #t20 in #t19{core::Map<core::String, core::int>}.{core::Map::entries})
#t18.{core::Map::[]=}(#t20.{core::MapEntry::key}, #t20.{core::MapEntry::value});
#t18.{core::Map::[]=}{Invariant}(#t20.{core::MapEntry::key}, #t20.{core::MapEntry::value});
} =>#t18;
s!;
let final core::String #t21 = s in #t21.{core::String::==}(null) ?{core::String?} null : #t21.{core::String::substring}(0, 0);

View file

@ -144,7 +144,7 @@ static method warning(core::String s, core::List<core::String> l, core::Map<core
core::Iterator<core::String> :sync-for-iterator = #t6{core::Iterable<core::String>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::String #t7 = :sync-for-iterator.{core::Iterator::current};
#t5.{core::List::add}(#t7);
#t5.{core::List::add}{Invariant}(#t7);
}
}
} =>#t5;
@ -157,7 +157,7 @@ static method warning(core::String s, core::List<core::String> l, core::Map<core
final dynamic #t10 = :sync-for-iterator.{core::Iterator::current};
{
final core::String #t11 = #t10 as{TypeError,ForNonNullableByDefault} core::String;
#t8.{core::Set::add}(#t11);
#t8.{core::Set::add}{Invariant}(#t11);
}
}
}
@ -169,7 +169,7 @@ static method warning(core::String s, core::List<core::String> l, core::Map<core
core::Iterator<core::String> :sync-for-iterator = #t13{core::Iterable<core::String>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::String #t14 = :sync-for-iterator.{core::Iterator::current};
#t12.{core::Set::add}(#t14);
#t12.{core::Set::add}{Invariant}(#t14);
}
}
} =>#t12;
@ -180,7 +180,7 @@ static method warning(core::String s, core::List<core::String> l, core::Map<core
core::Iterator<core::MapEntry<core::String, core::int>> :sync-for-iterator = #t16{core::Map<core::String, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String, core::int> #t17 = :sync-for-iterator.{core::Iterator::current};
#t15.{core::Map::[]=}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
#t15.{core::Map::[]=}{Invariant}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
}
}
} =>#t15;
@ -191,7 +191,7 @@ static method warning(core::String s, core::List<core::String> l, core::Map<core
core::Iterator<core::MapEntry<core::String, core::int>> :sync-for-iterator = #t19{core::Map<core::String, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String, core::int> #t20 = :sync-for-iterator.{core::Iterator::current};
#t18.{core::Map::[]=}(#t20.{core::MapEntry::key}, #t20.{core::MapEntry::value});
#t18.{core::Map::[]=}{Invariant}(#t20.{core::MapEntry::key}, #t20.{core::MapEntry::value});
}
}
} =>#t18;

View file

@ -142,7 +142,7 @@ static method warning(core::String s, core::List<core::String> l, core::Map<core
final core::Iterable<core::String>? #t6 = l;
if(!#t6.{core::Object::==}(null))
for (final core::String #t7 in #t6{core::Iterable<core::String>})
#t5.{core::List::add}(#t7);
#t5.{core::List::add}{Invariant}(#t7);
} =>#t5;
core::Set<core::String> a = block {
final core::Set<core::String> #t8 = col::LinkedHashSet::•<core::String>();
@ -150,7 +150,7 @@ static method warning(core::String s, core::List<core::String> l, core::Map<core
if(!#t9.{core::Object::==}(null))
for (final dynamic #t10 in #t9{core::Iterable<dynamic>}) {
final core::String #t11 = #t10 as{TypeError,ForNonNullableByDefault} core::String;
#t8.{core::Set::add}(#t11);
#t8.{core::Set::add}{Invariant}(#t11);
}
} =>#t8;
block {
@ -158,21 +158,21 @@ static method warning(core::String s, core::List<core::String> l, core::Map<core
final core::Iterable<core::String>? #t13 = l;
if(!#t13.{core::Object::==}(null))
for (final core::String #t14 in #t13{core::Iterable<core::String>})
#t12.{core::Set::add}(#t14);
#t12.{core::Set::add}{Invariant}(#t14);
} =>#t12;
core::Map<core::String, core::int> b = block {
final core::Map<core::String, core::int> #t15 = <core::String, core::int>{};
final core::Map<core::String, core::int>? #t16 = m;
if(!#t16.{core::Object::==}(null))
for (final core::MapEntry<core::String, core::int> #t17 in #t16{core::Map<core::String, core::int>}.{core::Map::entries})
#t15.{core::Map::[]=}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
#t15.{core::Map::[]=}{Invariant}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
} =>#t15;
block {
final core::Map<core::String, core::int> #t18 = <core::String, core::int>{};
final core::Map<core::String, core::int>? #t19 = m;
if(!#t19.{core::Object::==}(null))
for (final core::MapEntry<core::String, core::int> #t20 in #t19{core::Map<core::String, core::int>}.{core::Map::entries})
#t18.{core::Map::[]=}(#t20.{core::MapEntry::key}, #t20.{core::MapEntry::value});
#t18.{core::Map::[]=}{Invariant}(#t20.{core::MapEntry::key}, #t20.{core::MapEntry::value});
} =>#t18;
s!;
let final core::String #t21 = s in #t21.{core::String::==}(null) ?{core::String?} null : #t21.{core::String::substring}(0, 0);

View file

@ -144,7 +144,7 @@ static method warning(core::String s, core::List<core::String> l, core::Map<core
core::Iterator<core::String> :sync-for-iterator = #t6{core::Iterable<core::String>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::String #t7 = :sync-for-iterator.{core::Iterator::current};
#t5.{core::List::add}(#t7);
#t5.{core::List::add}{Invariant}(#t7);
}
}
} =>#t5;
@ -157,7 +157,7 @@ static method warning(core::String s, core::List<core::String> l, core::Map<core
final dynamic #t10 = :sync-for-iterator.{core::Iterator::current};
{
final core::String #t11 = #t10 as{TypeError,ForNonNullableByDefault} core::String;
#t8.{core::Set::add}(#t11);
#t8.{core::Set::add}{Invariant}(#t11);
}
}
}
@ -169,7 +169,7 @@ static method warning(core::String s, core::List<core::String> l, core::Map<core
core::Iterator<core::String> :sync-for-iterator = #t13{core::Iterable<core::String>}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::String #t14 = :sync-for-iterator.{core::Iterator::current};
#t12.{core::Set::add}(#t14);
#t12.{core::Set::add}{Invariant}(#t14);
}
}
} =>#t12;
@ -180,7 +180,7 @@ static method warning(core::String s, core::List<core::String> l, core::Map<core
core::Iterator<core::MapEntry<core::String, core::int>> :sync-for-iterator = #t16{core::Map<core::String, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String, core::int> #t17 = :sync-for-iterator.{core::Iterator::current};
#t15.{core::Map::[]=}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
#t15.{core::Map::[]=}{Invariant}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
}
}
} =>#t15;
@ -191,7 +191,7 @@ static method warning(core::String s, core::List<core::String> l, core::Map<core
core::Iterator<core::MapEntry<core::String, core::int>> :sync-for-iterator = #t19{core::Map<core::String, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::String, core::int> #t20 = :sync-for-iterator.{core::Iterator::current};
#t18.{core::Map::[]=}(#t20.{core::MapEntry::key}, #t20.{core::MapEntry::value});
#t18.{core::Map::[]=}{Invariant}(#t20.{core::MapEntry::key}, #t20.{core::MapEntry::value});
}
}
} =>#t18;

View file

@ -37,83 +37,83 @@ static method main() → dynamic {
core::List<Null>* local1i = <Null>[null];
core::Set<inf::C<dynamic>*>* local2a = block {
final core::Set<inf::C<dynamic>*>* #t1 = col::LinkedHashSet::•<inf::C<dynamic>*>();
#t1.{core::Set::add}(inf::field1);
#t1.{core::Set::add}(null);
#t1.{core::Set::add}{Invariant}(inf::field1);
#t1.{core::Set::add}{Invariant}(null);
} =>#t1;
core::Set<inf::C<dynamic>*>* local2b = block {
final core::Set<inf::C<dynamic>*>* #t2 = col::LinkedHashSet::•<inf::C<dynamic>*>();
#t2.{core::Set::add}(inf::field2);
#t2.{core::Set::add}(null);
#t2.{core::Set::add}{Invariant}(inf::field2);
#t2.{core::Set::add}{Invariant}(null);
} =>#t2;
core::Set<inf::C<core::int*>*>* local2c = block {
final core::Set<inf::C<core::int*>*>* #t3 = col::LinkedHashSet::•<inf::C<core::int*>*>();
#t3.{core::Set::add}(inf::field3);
#t3.{core::Set::add}(null);
#t3.{core::Set::add}{Invariant}(inf::field3);
#t3.{core::Set::add}{Invariant}(null);
} =>#t3;
core::Set<inf::C<core::int*>*>* local2d = block {
final core::Set<inf::C<core::int*>*>* #t4 = col::LinkedHashSet::•<inf::C<core::int*>*>();
#t4.{core::Set::add}(inf::field4);
#t4.{core::Set::add}(null);
#t4.{core::Set::add}{Invariant}(inf::field4);
#t4.{core::Set::add}{Invariant}(null);
} =>#t4;
core::Set<inf::C<core::int*>*>* local2e = block {
final core::Set<inf::C<core::int*>*>* #t5 = col::LinkedHashSet::•<inf::C<core::int*>*>();
#t5.{core::Set::add}(inf::field5);
#t5.{core::Set::add}(null);
#t5.{core::Set::add}{Invariant}(inf::field5);
#t5.{core::Set::add}{Invariant}(null);
} =>#t5;
core::Set<inf::C<core::int*>*>* local2f = block {
final core::Set<inf::C<core::int*>*>* #t6 = col::LinkedHashSet::•<inf::C<core::int*>*>();
#t6.{core::Set::add}(inf::field6);
#t6.{core::Set::add}(null);
#t6.{core::Set::add}{Invariant}(inf::field6);
#t6.{core::Set::add}{Invariant}(null);
} =>#t6;
core::Set<core::int*>* local2g = block {
final core::Set<core::int*>* #t7 = col::LinkedHashSet::•<core::int*>();
#t7.{core::Set::add}(inf::field7);
#t7.{core::Set::add}(null);
#t7.{core::Set::add}{Invariant}(inf::field7);
#t7.{core::Set::add}{Invariant}(null);
} =>#t7;
core::Set<core::int*>* local2h = block {
final core::Set<core::int*>* #t8 = col::LinkedHashSet::•<core::int*>();
#t8.{core::Set::add}(inf::field8);
#t8.{core::Set::add}(null);
#t8.{core::Set::add}{Invariant}(inf::field8);
#t8.{core::Set::add}{Invariant}(null);
} =>#t8;
core::Set<inf::C<dynamic>*>* local3a = block {
final core::Set<inf::C<dynamic>*>* #t9 = col::LinkedHashSet::•<inf::C<dynamic>*>();
#t9.{core::Set::add}(null);
#t9.{core::Set::add}(inf::field1);
#t9.{core::Set::add}{Invariant}(null);
#t9.{core::Set::add}{Invariant}(inf::field1);
} =>#t9;
core::Set<inf::C<dynamic>*>* local3b = block {
final core::Set<inf::C<dynamic>*>* #t10 = col::LinkedHashSet::•<inf::C<dynamic>*>();
#t10.{core::Set::add}(null);
#t10.{core::Set::add}(inf::field2);
#t10.{core::Set::add}{Invariant}(null);
#t10.{core::Set::add}{Invariant}(inf::field2);
} =>#t10;
core::Set<inf::C<core::int*>*>* local3c = block {
final core::Set<inf::C<core::int*>*>* #t11 = col::LinkedHashSet::•<inf::C<core::int*>*>();
#t11.{core::Set::add}(null);
#t11.{core::Set::add}(inf::field3);
#t11.{core::Set::add}{Invariant}(null);
#t11.{core::Set::add}{Invariant}(inf::field3);
} =>#t11;
core::Set<inf::C<core::int*>*>* local3d = block {
final core::Set<inf::C<core::int*>*>* #t12 = col::LinkedHashSet::•<inf::C<core::int*>*>();
#t12.{core::Set::add}(null);
#t12.{core::Set::add}(inf::field4);
#t12.{core::Set::add}{Invariant}(null);
#t12.{core::Set::add}{Invariant}(inf::field4);
} =>#t12;
core::Set<inf::C<core::int*>*>* local3e = block {
final core::Set<inf::C<core::int*>*>* #t13 = col::LinkedHashSet::•<inf::C<core::int*>*>();
#t13.{core::Set::add}(null);
#t13.{core::Set::add}(inf::field5);
#t13.{core::Set::add}{Invariant}(null);
#t13.{core::Set::add}{Invariant}(inf::field5);
} =>#t13;
core::Set<inf::C<core::int*>*>* local3f = block {
final core::Set<inf::C<core::int*>*>* #t14 = col::LinkedHashSet::•<inf::C<core::int*>*>();
#t14.{core::Set::add}(null);
#t14.{core::Set::add}(inf::field6);
#t14.{core::Set::add}{Invariant}(null);
#t14.{core::Set::add}{Invariant}(inf::field6);
} =>#t14;
core::Set<core::int*>* local3g = block {
final core::Set<core::int*>* #t15 = col::LinkedHashSet::•<core::int*>();
#t15.{core::Set::add}(null);
#t15.{core::Set::add}(inf::field7);
#t15.{core::Set::add}{Invariant}(null);
#t15.{core::Set::add}{Invariant}(inf::field7);
} =>#t15;
core::Set<core::int*>* local3h = block {
final core::Set<core::int*>* #t16 = col::LinkedHashSet::•<core::int*>();
#t16.{core::Set::add}(null);
#t16.{core::Set::add}(inf::field8);
#t16.{core::Set::add}{Invariant}(null);
#t16.{core::Set::add}{Invariant}(inf::field8);
} =>#t16;
}
@ -167,82 +167,82 @@ static method method() → dynamic {
core::List<Null> local1i = <Null>[null];
core::Set<inf::C<dynamic>?> local2a = block {
final core::Set<inf::C<dynamic>?> #t17 = col::LinkedHashSet::•<inf::C<dynamic>?>();
#t17.{core::Set::add}(inf::field1);
#t17.{core::Set::add}(null);
#t17.{core::Set::add}{Invariant}(inf::field1);
#t17.{core::Set::add}{Invariant}(null);
} =>#t17;
core::Set<inf::C<dynamic>?> local2b = block {
final core::Set<inf::C<dynamic>?> #t18 = col::LinkedHashSet::•<inf::C<dynamic>?>();
#t18.{core::Set::add}(inf::field2);
#t18.{core::Set::add}(null);
#t18.{core::Set::add}{Invariant}(inf::field2);
#t18.{core::Set::add}{Invariant}(null);
} =>#t18;
core::Set<inf::C<core::int>?> local2c = block {
final core::Set<inf::C<core::int>?> #t19 = col::LinkedHashSet::•<inf::C<core::int>?>();
#t19.{core::Set::add}(inf::field3);
#t19.{core::Set::add}(null);
#t19.{core::Set::add}{Invariant}(inf::field3);
#t19.{core::Set::add}{Invariant}(null);
} =>#t19;
core::Set<inf::C<core::int>?> local2d = block {
final core::Set<inf::C<core::int>?> #t20 = col::LinkedHashSet::•<inf::C<core::int>?>();
#t20.{core::Set::add}(inf::field4);
#t20.{core::Set::add}(null);
#t20.{core::Set::add}{Invariant}(inf::field4);
#t20.{core::Set::add}{Invariant}(null);
} =>#t20;
core::Set<inf::C<core::int?>?> local2e = block {
final core::Set<inf::C<core::int?>?> #t21 = col::LinkedHashSet::•<inf::C<core::int?>?>();
#t21.{core::Set::add}(inf::field5);
#t21.{core::Set::add}(null);
#t21.{core::Set::add}{Invariant}(inf::field5);
#t21.{core::Set::add}{Invariant}(null);
} =>#t21;
core::Set<inf::C<core::int?>?> local2f = block {
final core::Set<inf::C<core::int?>?> #t22 = col::LinkedHashSet::•<inf::C<core::int?>?>();
#t22.{core::Set::add}(inf::field6);
#t22.{core::Set::add}(null);
#t22.{core::Set::add}{Invariant}(inf::field6);
#t22.{core::Set::add}{Invariant}(null);
} =>#t22;
core::Set<core::int?> local2g = block {
final core::Set<core::int?> #t23 = col::LinkedHashSet::•<core::int?>();
#t23.{core::Set::add}(inf::field7);
#t23.{core::Set::add}(null);
#t23.{core::Set::add}{Invariant}(inf::field7);
#t23.{core::Set::add}{Invariant}(null);
} =>#t23;
core::Set<core::int?> local2h = block {
final core::Set<core::int?> #t24 = col::LinkedHashSet::•<core::int?>();
#t24.{core::Set::add}(inf::field8);
#t24.{core::Set::add}(null);
#t24.{core::Set::add}{Invariant}(inf::field8);
#t24.{core::Set::add}{Invariant}(null);
} =>#t24;
core::Set<inf::C<dynamic>?> local3a = block {
final core::Set<inf::C<dynamic>?> #t25 = col::LinkedHashSet::•<inf::C<dynamic>?>();
#t25.{core::Set::add}(null);
#t25.{core::Set::add}(inf::field1);
#t25.{core::Set::add}{Invariant}(null);
#t25.{core::Set::add}{Invariant}(inf::field1);
} =>#t25;
core::Set<inf::C<dynamic>?> local3b = block {
final core::Set<inf::C<dynamic>?> #t26 = col::LinkedHashSet::•<inf::C<dynamic>?>();
#t26.{core::Set::add}(null);
#t26.{core::Set::add}(inf::field2);
#t26.{core::Set::add}{Invariant}(null);
#t26.{core::Set::add}{Invariant}(inf::field2);
} =>#t26;
core::Set<inf::C<core::int>?> local3c = block {
final core::Set<inf::C<core::int>?> #t27 = col::LinkedHashSet::•<inf::C<core::int>?>();
#t27.{core::Set::add}(null);
#t27.{core::Set::add}(inf::field3);
#t27.{core::Set::add}{Invariant}(null);
#t27.{core::Set::add}{Invariant}(inf::field3);
} =>#t27;
core::Set<inf::C<core::int>?> local3d = block {
final core::Set<inf::C<core::int>?> #t28 = col::LinkedHashSet::•<inf::C<core::int>?>();
#t28.{core::Set::add}(null);
#t28.{core::Set::add}(inf::field4);
#t28.{core::Set::add}{Invariant}(null);
#t28.{core::Set::add}{Invariant}(inf::field4);
} =>#t28;
core::Set<inf::C<core::int?>?> local3e = block {
final core::Set<inf::C<core::int?>?> #t29 = col::LinkedHashSet::•<inf::C<core::int?>?>();
#t29.{core::Set::add}(null);
#t29.{core::Set::add}(inf::field5);
#t29.{core::Set::add}{Invariant}(null);
#t29.{core::Set::add}{Invariant}(inf::field5);
} =>#t29;
core::Set<inf::C<core::int?>?> local3f = block {
final core::Set<inf::C<core::int?>?> #t30 = col::LinkedHashSet::•<inf::C<core::int?>?>();
#t30.{core::Set::add}(null);
#t30.{core::Set::add}(inf::field6);
#t30.{core::Set::add}{Invariant}(null);
#t30.{core::Set::add}{Invariant}(inf::field6);
} =>#t30;
core::Set<core::int?> local3g = block {
final core::Set<core::int?> #t31 = col::LinkedHashSet::•<core::int?>();
#t31.{core::Set::add}(null);
#t31.{core::Set::add}(inf::field7);
#t31.{core::Set::add}{Invariant}(null);
#t31.{core::Set::add}{Invariant}(inf::field7);
} =>#t31;
core::Set<core::int?> local3h = block {
final core::Set<core::int?> #t32 = col::LinkedHashSet::•<core::int?>();
#t32.{core::Set::add}(null);
#t32.{core::Set::add}(inf::field8);
#t32.{core::Set::add}{Invariant}(null);
#t32.{core::Set::add}{Invariant}(inf::field8);
} =>#t32;
}

View file

@ -37,83 +37,83 @@ static method main() → dynamic {
core::List<Null>* local1i = <Null>[null];
core::Set<inf::C<dynamic>*>* local2a = block {
final core::Set<inf::C<dynamic>*>* #t1 = new col::_CompactLinkedHashSet::•<inf::C<dynamic>*>();
#t1.{core::Set::add}(inf::field1);
#t1.{core::Set::add}(null);
#t1.{core::Set::add}{Invariant}(inf::field1);
#t1.{core::Set::add}{Invariant}(null);
} =>#t1;
core::Set<inf::C<dynamic>*>* local2b = block {
final core::Set<inf::C<dynamic>*>* #t2 = new col::_CompactLinkedHashSet::•<inf::C<dynamic>*>();
#t2.{core::Set::add}(inf::field2);
#t2.{core::Set::add}(null);
#t2.{core::Set::add}{Invariant}(inf::field2);
#t2.{core::Set::add}{Invariant}(null);
} =>#t2;
core::Set<inf::C<core::int*>*>* local2c = block {
final core::Set<inf::C<core::int*>*>* #t3 = new col::_CompactLinkedHashSet::•<inf::C<core::int*>*>();
#t3.{core::Set::add}(inf::field3);
#t3.{core::Set::add}(null);
#t3.{core::Set::add}{Invariant}(inf::field3);
#t3.{core::Set::add}{Invariant}(null);
} =>#t3;
core::Set<inf::C<core::int*>*>* local2d = block {
final core::Set<inf::C<core::int*>*>* #t4 = new col::_CompactLinkedHashSet::•<inf::C<core::int*>*>();
#t4.{core::Set::add}(inf::field4);
#t4.{core::Set::add}(null);
#t4.{core::Set::add}{Invariant}(inf::field4);
#t4.{core::Set::add}{Invariant}(null);
} =>#t4;
core::Set<inf::C<core::int*>*>* local2e = block {
final core::Set<inf::C<core::int*>*>* #t5 = new col::_CompactLinkedHashSet::•<inf::C<core::int*>*>();
#t5.{core::Set::add}(inf::field5);
#t5.{core::Set::add}(null);
#t5.{core::Set::add}{Invariant}(inf::field5);
#t5.{core::Set::add}{Invariant}(null);
} =>#t5;
core::Set<inf::C<core::int*>*>* local2f = block {
final core::Set<inf::C<core::int*>*>* #t6 = new col::_CompactLinkedHashSet::•<inf::C<core::int*>*>();
#t6.{core::Set::add}(inf::field6);
#t6.{core::Set::add}(null);
#t6.{core::Set::add}{Invariant}(inf::field6);
#t6.{core::Set::add}{Invariant}(null);
} =>#t6;
core::Set<core::int*>* local2g = block {
final core::Set<core::int*>* #t7 = new col::_CompactLinkedHashSet::•<core::int*>();
#t7.{core::Set::add}(inf::field7);
#t7.{core::Set::add}(null);
#t7.{core::Set::add}{Invariant}(inf::field7);
#t7.{core::Set::add}{Invariant}(null);
} =>#t7;
core::Set<core::int*>* local2h = block {
final core::Set<core::int*>* #t8 = new col::_CompactLinkedHashSet::•<core::int*>();
#t8.{core::Set::add}(inf::field8);
#t8.{core::Set::add}(null);
#t8.{core::Set::add}{Invariant}(inf::field8);
#t8.{core::Set::add}{Invariant}(null);
} =>#t8;
core::Set<inf::C<dynamic>*>* local3a = block {
final core::Set<inf::C<dynamic>*>* #t9 = new col::_CompactLinkedHashSet::•<inf::C<dynamic>*>();
#t9.{core::Set::add}(null);
#t9.{core::Set::add}(inf::field1);
#t9.{core::Set::add}{Invariant}(null);
#t9.{core::Set::add}{Invariant}(inf::field1);
} =>#t9;
core::Set<inf::C<dynamic>*>* local3b = block {
final core::Set<inf::C<dynamic>*>* #t10 = new col::_CompactLinkedHashSet::•<inf::C<dynamic>*>();
#t10.{core::Set::add}(null);
#t10.{core::Set::add}(inf::field2);
#t10.{core::Set::add}{Invariant}(null);
#t10.{core::Set::add}{Invariant}(inf::field2);
} =>#t10;
core::Set<inf::C<core::int*>*>* local3c = block {
final core::Set<inf::C<core::int*>*>* #t11 = new col::_CompactLinkedHashSet::•<inf::C<core::int*>*>();
#t11.{core::Set::add}(null);
#t11.{core::Set::add}(inf::field3);
#t11.{core::Set::add}{Invariant}(null);
#t11.{core::Set::add}{Invariant}(inf::field3);
} =>#t11;
core::Set<inf::C<core::int*>*>* local3d = block {
final core::Set<inf::C<core::int*>*>* #t12 = new col::_CompactLinkedHashSet::•<inf::C<core::int*>*>();
#t12.{core::Set::add}(null);
#t12.{core::Set::add}(inf::field4);
#t12.{core::Set::add}{Invariant}(null);
#t12.{core::Set::add}{Invariant}(inf::field4);
} =>#t12;
core::Set<inf::C<core::int*>*>* local3e = block {
final core::Set<inf::C<core::int*>*>* #t13 = new col::_CompactLinkedHashSet::•<inf::C<core::int*>*>();
#t13.{core::Set::add}(null);
#t13.{core::Set::add}(inf::field5);
#t13.{core::Set::add}{Invariant}(null);
#t13.{core::Set::add}{Invariant}(inf::field5);
} =>#t13;
core::Set<inf::C<core::int*>*>* local3f = block {
final core::Set<inf::C<core::int*>*>* #t14 = new col::_CompactLinkedHashSet::•<inf::C<core::int*>*>();
#t14.{core::Set::add}(null);
#t14.{core::Set::add}(inf::field6);
#t14.{core::Set::add}{Invariant}(null);
#t14.{core::Set::add}{Invariant}(inf::field6);
} =>#t14;
core::Set<core::int*>* local3g = block {
final core::Set<core::int*>* #t15 = new col::_CompactLinkedHashSet::•<core::int*>();
#t15.{core::Set::add}(null);
#t15.{core::Set::add}(inf::field7);
#t15.{core::Set::add}{Invariant}(null);
#t15.{core::Set::add}{Invariant}(inf::field7);
} =>#t15;
core::Set<core::int*>* local3h = block {
final core::Set<core::int*>* #t16 = new col::_CompactLinkedHashSet::•<core::int*>();
#t16.{core::Set::add}(null);
#t16.{core::Set::add}(inf::field8);
#t16.{core::Set::add}{Invariant}(null);
#t16.{core::Set::add}{Invariant}(inf::field8);
} =>#t16;
}
@ -167,82 +167,82 @@ static method method() → dynamic {
core::List<Null> local1i = <Null>[null];
core::Set<inf::C<dynamic>?> local2a = block {
final core::Set<inf::C<dynamic>?> #t17 = new col::_CompactLinkedHashSet::•<inf::C<dynamic>?>();
#t17.{core::Set::add}(inf::field1);
#t17.{core::Set::add}(null);
#t17.{core::Set::add}{Invariant}(inf::field1);
#t17.{core::Set::add}{Invariant}(null);
} =>#t17;
core::Set<inf::C<dynamic>?> local2b = block {
final core::Set<inf::C<dynamic>?> #t18 = new col::_CompactLinkedHashSet::•<inf::C<dynamic>?>();
#t18.{core::Set::add}(inf::field2);
#t18.{core::Set::add}(null);
#t18.{core::Set::add}{Invariant}(inf::field2);
#t18.{core::Set::add}{Invariant}(null);
} =>#t18;
core::Set<inf::C<core::int>?> local2c = block {
final core::Set<inf::C<core::int>?> #t19 = new col::_CompactLinkedHashSet::•<inf::C<core::int>?>();
#t19.{core::Set::add}(inf::field3);
#t19.{core::Set::add}(null);
#t19.{core::Set::add}{Invariant}(inf::field3);
#t19.{core::Set::add}{Invariant}(null);
} =>#t19;
core::Set<inf::C<core::int>?> local2d = block {
final core::Set<inf::C<core::int>?> #t20 = new col::_CompactLinkedHashSet::•<inf::C<core::int>?>();
#t20.{core::Set::add}(inf::field4);
#t20.{core::Set::add}(null);
#t20.{core::Set::add}{Invariant}(inf::field4);
#t20.{core::Set::add}{Invariant}(null);
} =>#t20;
core::Set<inf::C<core::int?>?> local2e = block {
final core::Set<inf::C<core::int?>?> #t21 = new col::_CompactLinkedHashSet::•<inf::C<core::int?>?>();
#t21.{core::Set::add}(inf::field5);
#t21.{core::Set::add}(null);
#t21.{core::Set::add}{Invariant}(inf::field5);
#t21.{core::Set::add}{Invariant}(null);
} =>#t21;
core::Set<inf::C<core::int?>?> local2f = block {
final core::Set<inf::C<core::int?>?> #t22 = new col::_CompactLinkedHashSet::•<inf::C<core::int?>?>();
#t22.{core::Set::add}(inf::field6);
#t22.{core::Set::add}(null);
#t22.{core::Set::add}{Invariant}(inf::field6);
#t22.{core::Set::add}{Invariant}(null);
} =>#t22;
core::Set<core::int?> local2g = block {
final core::Set<core::int?> #t23 = new col::_CompactLinkedHashSet::•<core::int?>();
#t23.{core::Set::add}(inf::field7);
#t23.{core::Set::add}(null);
#t23.{core::Set::add}{Invariant}(inf::field7);
#t23.{core::Set::add}{Invariant}(null);
} =>#t23;
core::Set<core::int?> local2h = block {
final core::Set<core::int?> #t24 = new col::_CompactLinkedHashSet::•<core::int?>();
#t24.{core::Set::add}(inf::field8);
#t24.{core::Set::add}(null);
#t24.{core::Set::add}{Invariant}(inf::field8);
#t24.{core::Set::add}{Invariant}(null);
} =>#t24;
core::Set<inf::C<dynamic>?> local3a = block {
final core::Set<inf::C<dynamic>?> #t25 = new col::_CompactLinkedHashSet::•<inf::C<dynamic>?>();
#t25.{core::Set::add}(null);
#t25.{core::Set::add}(inf::field1);
#t25.{core::Set::add}{Invariant}(null);
#t25.{core::Set::add}{Invariant}(inf::field1);
} =>#t25;
core::Set<inf::C<dynamic>?> local3b = block {
final core::Set<inf::C<dynamic>?> #t26 = new col::_CompactLinkedHashSet::•<inf::C<dynamic>?>();
#t26.{core::Set::add}(null);
#t26.{core::Set::add}(inf::field2);
#t26.{core::Set::add}{Invariant}(null);
#t26.{core::Set::add}{Invariant}(inf::field2);
} =>#t26;
core::Set<inf::C<core::int>?> local3c = block {
final core::Set<inf::C<core::int>?> #t27 = new col::_CompactLinkedHashSet::•<inf::C<core::int>?>();
#t27.{core::Set::add}(null);
#t27.{core::Set::add}(inf::field3);
#t27.{core::Set::add}{Invariant}(null);
#t27.{core::Set::add}{Invariant}(inf::field3);
} =>#t27;
core::Set<inf::C<core::int>?> local3d = block {
final core::Set<inf::C<core::int>?> #t28 = new col::_CompactLinkedHashSet::•<inf::C<core::int>?>();
#t28.{core::Set::add}(null);
#t28.{core::Set::add}(inf::field4);
#t28.{core::Set::add}{Invariant}(null);
#t28.{core::Set::add}{Invariant}(inf::field4);
} =>#t28;
core::Set<inf::C<core::int?>?> local3e = block {
final core::Set<inf::C<core::int?>?> #t29 = new col::_CompactLinkedHashSet::•<inf::C<core::int?>?>();
#t29.{core::Set::add}(null);
#t29.{core::Set::add}(inf::field5);
#t29.{core::Set::add}{Invariant}(null);
#t29.{core::Set::add}{Invariant}(inf::field5);
} =>#t29;
core::Set<inf::C<core::int?>?> local3f = block {
final core::Set<inf::C<core::int?>?> #t30 = new col::_CompactLinkedHashSet::•<inf::C<core::int?>?>();
#t30.{core::Set::add}(null);
#t30.{core::Set::add}(inf::field6);
#t30.{core::Set::add}{Invariant}(null);
#t30.{core::Set::add}{Invariant}(inf::field6);
} =>#t30;
core::Set<core::int?> local3g = block {
final core::Set<core::int?> #t31 = new col::_CompactLinkedHashSet::•<core::int?>();
#t31.{core::Set::add}(null);
#t31.{core::Set::add}(inf::field7);
#t31.{core::Set::add}{Invariant}(null);
#t31.{core::Set::add}{Invariant}(inf::field7);
} =>#t31;
core::Set<core::int?> local3h = block {
final core::Set<core::int?> #t32 = new col::_CompactLinkedHashSet::•<core::int?>();
#t32.{core::Set::add}(null);
#t32.{core::Set::add}(inf::field8);
#t32.{core::Set::add}{Invariant}(null);
#t32.{core::Set::add}{Invariant}(inf::field8);
} =>#t32;
}

View file

@ -11,11 +11,11 @@ class Class extends core::Object {
method method(core::String* node, core::Set<core::String*>* set) → core::List<core::String*>*
return set.{core::Set::add}(node) ?{core::List<core::String*>*} block {
final core::List<core::String*>* #t1 = <core::String*>[];
#t1.{core::List::add}(node);
#t1.{core::List::add}{Invariant}(node);
final core::Iterable<core::String*>* #t2 = let final core::Iterable<core::String*>* #t3 = let final core::Set<core::String*>* #t4 = this.{self::Class::map}.{core::Map::[]}(node) in #t4.{core::Object::==}(null) ?{core::Iterable<core::String*>*} null : #t4.{core::Iterable::expand}<core::String*>((core::String* node) → core::List<core::String*>* => this.{self::Class::method}(node, set)) in #t3.{core::Object::==}(null) ?{core::List<core::String*>*} null : #t3.{core::Iterable::toList}();
if(!#t2.{core::Object::==}(null))
for (final core::String* #t5 in #t2)
#t1.{core::List::add}(#t5);
#t1.{core::List::add}{Invariant}(#t5);
} =>#t1 : <core::String*>[];
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

View file

@ -11,13 +11,13 @@ class Class extends core::Object {
method method(core::String* node, core::Set<core::String*>* set) → core::List<core::String*>*
return set.{core::Set::add}(node) ?{core::List<core::String*>*} block {
final core::List<core::String*>* #t1 = <core::String*>[];
#t1.{core::List::add}(node);
#t1.{core::List::add}{Invariant}(node);
final core::Iterable<core::String*>* #t2 = let final core::Iterable<core::String*>* #t3 = let final core::Set<core::String*>* #t4 = this.{self::Class::map}.{core::Map::[]}(node) in #t4.{core::Object::==}(null) ?{core::Iterable<core::String*>*} null : #t4.{core::Iterable::expand}<core::String*>((core::String* node) → core::List<core::String*>* => this.{self::Class::method}(node, set)) in #t3.{core::Object::==}(null) ?{core::List<core::String*>*} null : #t3.{core::Iterable::toList}();
if(!#t2.{core::Object::==}(null)) {
core::Iterator<core::String*>* :sync-for-iterator = #t2.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::String* #t5 = :sync-for-iterator.{core::Iterator::current};
#t1.{core::List::add}(#t5);
#t1.{core::List::add}{Invariant}(#t5);
}
}
} =>#t1 : <core::String*>[];

View file

@ -13,7 +13,7 @@ static method test1(dynamic stringList) → dynamic {
if(!#t2.{core::Object::==}(null))
for (final dynamic #t3 in #t2) {
final core::int* #t4 = #t3 as{TypeError} core::int*;
#t1.{core::Set::add}(#t4);
#t1.{core::Set::add}{Invariant}(#t4);
}
} =>#t1;
}
@ -24,7 +24,7 @@ static method test2(dynamic stringList) → dynamic {
if(!#t6.{core::Object::==}(null))
for (final dynamic #t7 in #t6) {
final core::int* #t8 = #t7 as{TypeError} core::int*;
#t5.{core::List::add}(#t8);
#t5.{core::List::add}{Invariant}(#t8);
}
} =>#t5;
}
@ -36,7 +36,7 @@ static method test3(dynamic stringMap) → dynamic {
for (final core::MapEntry<dynamic, dynamic>* #t11 in #t10.{core::Map::entries}) {
final core::int* #t12 = #t11.{core::MapEntry::key} as{TypeError} core::int*;
final core::int* #t13 = #t11.{core::MapEntry::value} as{TypeError} core::int*;
#t9.{core::Map::[]=}(#t12, #t13);
#t9.{core::Map::[]=}{Invariant}(#t12, #t13);
}
} =>#t9;
}

View file

@ -16,7 +16,7 @@ static method test1(dynamic stringList) → dynamic {
final dynamic #t3 = :sync-for-iterator.{core::Iterator::current};
{
final core::int* #t4 = #t3 as{TypeError} core::int*;
#t1.{core::Set::add}(#t4);
#t1.{core::Set::add}{Invariant}(#t4);
}
}
}
@ -32,7 +32,7 @@ static method test2(dynamic stringList) → dynamic {
final dynamic #t7 = :sync-for-iterator.{core::Iterator::current};
{
final core::int* #t8 = #t7 as{TypeError} core::int*;
#t5.{core::List::add}(#t8);
#t5.{core::List::add}{Invariant}(#t8);
}
}
}
@ -49,7 +49,7 @@ static method test3(dynamic stringMap) → dynamic {
{
final core::int* #t12 = #t11.{core::MapEntry::key} as{TypeError} core::int*;
final core::int* #t13 = #t11.{core::MapEntry::value} as{TypeError} core::int*;
#t9.{core::Map::[]=}(#t12, #t13);
#t9.{core::Map::[]=}{Invariant}(#t12, #t13);
}
}
}

View file

@ -0,0 +1,28 @@
// 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
main() {
var list1 = <int>[0];
var list2 = <num>[0];
dynamic list3 = <int>[0];
var list = <int>[0, ...list1, ...list2, ...list3, if (true) 2];
var set1 = <int>{0};
var set2 = <num>{0};
dynamic set3 = <int>{0};
var set = <int>{0, ...set1, ...set2, ...set3, if (true) 2};
var map1 = <int, String>{0: 'foo'};
var map2 = <num, Object>{0: 'bar'};
dynamic map3 = <int, String>{0: 'baz'};
var map = <int, String>{
0: 'foo',
...map1,
...map2,
...map3,
if (true) 2: 'baz'
};
}

View file

@ -0,0 +1,5 @@
library;
import self as self;
static method main() → dynamic
;

View file

@ -0,0 +1,75 @@
library;
import self as self;
import "dart:core" as core;
import "dart:collection" as col;
static method main() → dynamic {
core::List<core::int*>* list1 = <core::int*>[0];
core::List<core::num*>* list2 = <core::num*>[0];
dynamic list3 = <core::int*>[0];
core::List<core::int*>* list = block {
final core::List<core::int*>* #t1 = <core::int*>[];
#t1.{core::List::add}{Invariant}(0);
for (final core::int* #t2 in list1)
#t1.{core::List::add}{Invariant}(#t2);
for (final dynamic #t3 in list2) {
final core::int* #t4 = #t3 as{TypeError} core::int*;
#t1.{core::List::add}{Invariant}(#t4);
}
for (final dynamic #t5 in list3 as{TypeError,ForDynamic} core::Iterable<dynamic>*) {
final core::int* #t6 = #t5 as{TypeError} core::int*;
#t1.{core::List::add}{Invariant}(#t6);
}
if(true)
#t1.{core::List::add}{Invariant}(2);
} =>#t1;
core::Set<core::int*>* set1 = block {
final core::Set<core::int*>* #t7 = col::LinkedHashSet::•<core::int*>();
#t7.{core::Set::add}{Invariant}(0);
} =>#t7;
core::Set<core::num*>* set2 = block {
final core::Set<core::num*>* #t8 = col::LinkedHashSet::•<core::num*>();
#t8.{core::Set::add}{Invariant}(0);
} =>#t8;
dynamic set3 = block {
final core::Set<core::int*>* #t9 = col::LinkedHashSet::•<core::int*>();
#t9.{core::Set::add}{Invariant}(0);
} =>#t9;
core::Set<core::int*>* set = block {
final core::Set<core::int*>* #t10 = col::LinkedHashSet::•<core::int*>();
#t10.{core::Set::add}{Invariant}(0);
for (final core::int* #t11 in set1)
#t10.{core::Set::add}{Invariant}(#t11);
for (final dynamic #t12 in set2) {
final core::int* #t13 = #t12 as{TypeError} core::int*;
#t10.{core::Set::add}{Invariant}(#t13);
}
for (final dynamic #t14 in set3 as{TypeError,ForDynamic} core::Iterable<dynamic>*) {
final core::int* #t15 = #t14 as{TypeError} core::int*;
#t10.{core::Set::add}{Invariant}(#t15);
}
if(true)
#t10.{core::Set::add}{Invariant}(2);
} =>#t10;
core::Map<core::int*, core::String*>* map1 = <core::int*, core::String*>{0: "foo"};
core::Map<core::num*, core::Object*>* map2 = <core::num*, core::Object*>{0: "bar"};
dynamic map3 = <core::int*, core::String*>{0: "baz"};
core::Map<core::int*, core::String*>* map = block {
final core::Map<core::int*, core::String*>* #t16 = <core::int*, core::String*>{};
#t16.{core::Map::[]=}{Invariant}(0, "foo");
for (final core::MapEntry<core::int*, core::String*>* #t17 in map1.{core::Map::entries})
#t16.{core::Map::[]=}{Invariant}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
for (final core::MapEntry<dynamic, dynamic>* #t18 in map2.{core::Map::entries}) {
final core::int* #t19 = #t18.{core::MapEntry::key} as{TypeError} core::int*;
final core::String* #t20 = #t18.{core::MapEntry::value} as{TypeError} core::String*;
#t16.{core::Map::[]=}{Invariant}(#t19, #t20);
}
for (final core::MapEntry<dynamic, dynamic>* #t21 in (map3 as{TypeError,ForDynamic} core::Map<dynamic, dynamic>*).{core::Map::entries}) {
final core::int* #t22 = #t21.{core::MapEntry::key} as{TypeError} core::int*;
final core::String* #t23 = #t21.{core::MapEntry::value} as{TypeError} core::String*;
#t16.{core::Map::[]=}{Invariant}(#t22, #t23);
}
if(true)
#t16.{core::Map::[]=}{Invariant}(2, "baz");
} =>#t16;
}

View file

@ -0,0 +1,126 @@
library;
import self as self;
import "dart:core" as core;
import "dart:collection" as col;
static method main() → dynamic {
core::List<core::int*>* list1 = <core::int*>[0];
core::List<core::num*>* list2 = <core::num*>[0];
dynamic list3 = <core::int*>[0];
core::List<core::int*>* list = block {
final core::List<core::int*>* #t1 = <core::int*>[];
#t1.{core::List::add}{Invariant}(0);
{
core::Iterator<core::int*>* :sync-for-iterator = list1.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t2 = :sync-for-iterator.{core::Iterator::current};
#t1.{core::List::add}{Invariant}(#t2);
}
}
{
core::Iterator<core::num*>* :sync-for-iterator = list2.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t3 = :sync-for-iterator.{core::Iterator::current};
{
final core::int* #t4 = #t3 as{TypeError} core::int*;
#t1.{core::List::add}{Invariant}(#t4);
}
}
}
{
core::Iterator<dynamic>* :sync-for-iterator = (list3 as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t5 = :sync-for-iterator.{core::Iterator::current};
{
final core::int* #t6 = #t5 as{TypeError} core::int*;
#t1.{core::List::add}{Invariant}(#t6);
}
}
}
if(true)
#t1.{core::List::add}{Invariant}(2);
} =>#t1;
core::Set<core::int*>* set1 = block {
final core::Set<core::int*>* #t7 = new col::_CompactLinkedHashSet::•<core::int*>();
#t7.{core::Set::add}{Invariant}(0);
} =>#t7;
core::Set<core::num*>* set2 = block {
final core::Set<core::num*>* #t8 = new col::_CompactLinkedHashSet::•<core::num*>();
#t8.{core::Set::add}{Invariant}(0);
} =>#t8;
dynamic set3 = block {
final core::Set<core::int*>* #t9 = new col::_CompactLinkedHashSet::•<core::int*>();
#t9.{core::Set::add}{Invariant}(0);
} =>#t9;
core::Set<core::int*>* set = block {
final core::Set<core::int*>* #t10 = new col::_CompactLinkedHashSet::•<core::int*>();
#t10.{core::Set::add}{Invariant}(0);
{
core::Iterator<core::int*>* :sync-for-iterator = set1.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::int* #t11 = :sync-for-iterator.{core::Iterator::current};
#t10.{core::Set::add}{Invariant}(#t11);
}
}
{
core::Iterator<core::num*>* :sync-for-iterator = set2.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t12 = :sync-for-iterator.{core::Iterator::current};
{
final core::int* #t13 = #t12 as{TypeError} core::int*;
#t10.{core::Set::add}{Invariant}(#t13);
}
}
}
{
core::Iterator<dynamic>* :sync-for-iterator = (set3 as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t14 = :sync-for-iterator.{core::Iterator::current};
{
final core::int* #t15 = #t14 as{TypeError} core::int*;
#t10.{core::Set::add}{Invariant}(#t15);
}
}
}
if(true)
#t10.{core::Set::add}{Invariant}(2);
} =>#t10;
core::Map<core::int*, core::String*>* map1 = <core::int*, core::String*>{0: "foo"};
core::Map<core::num*, core::Object*>* map2 = <core::num*, core::Object*>{0: "bar"};
dynamic map3 = <core::int*, core::String*>{0: "baz"};
core::Map<core::int*, core::String*>* map = block {
final core::Map<core::int*, core::String*>* #t16 = <core::int*, core::String*>{};
#t16.{core::Map::[]=}{Invariant}(0, "foo");
{
core::Iterator<core::MapEntry<core::int*, core::String*>>* :sync-for-iterator = map1.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int*, core::String*>* #t17 = :sync-for-iterator.{core::Iterator::current};
#t16.{core::Map::[]=}{Invariant}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
}
}
{
core::Iterator<core::MapEntry<core::num*, core::Object*>>* :sync-for-iterator = map2.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic>* #t18 = :sync-for-iterator.{core::Iterator::current};
{
final core::int* #t19 = #t18.{core::MapEntry::key} as{TypeError} core::int*;
final core::String* #t20 = #t18.{core::MapEntry::value} as{TypeError} core::String*;
#t16.{core::Map::[]=}{Invariant}(#t19, #t20);
}
}
}
{
core::Iterator<core::MapEntry<dynamic, dynamic>>* :sync-for-iterator = (map3 as{TypeError,ForDynamic} core::Map<dynamic, dynamic>*).{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic>* #t21 = :sync-for-iterator.{core::Iterator::current};
{
final core::int* #t22 = #t21.{core::MapEntry::key} as{TypeError} core::int*;
final core::String* #t23 = #t21.{core::MapEntry::value} as{TypeError} core::String*;
#t16.{core::Map::[]=}{Invariant}(#t22, #t23);
}
}
}
if(true)
#t16.{core::Map::[]=}{Invariant}(2, "baz");
} =>#t16;
}

View file

@ -0,0 +1,2 @@
// @dart = 2.9
main() {}

View file

@ -0,0 +1,2 @@
// @dart = 2.9
main() {}

View file

@ -47,104 +47,104 @@ static field core::Map<dynamic, dynamic>* map0 = <dynamic, dynamic>{};
static field core::Map<dynamic, dynamic>* map1 = block {
final core::Map<dynamic, dynamic>* #t1 = <dynamic, dynamic>{};
if(self::b)
#t1.{core::Map::[]=}(0, 1);
#t1.{core::Map::[]=}{Invariant}(0, 1);
else
for (final core::MapEntry<dynamic, dynamic>* #t2 in self::map0.{core::Map::entries})
#t1.{core::Map::[]=}(#t2.{core::MapEntry::key}, #t2.{core::MapEntry::value});
#t1.{core::Map::[]=}{Invariant}(#t2.{core::MapEntry::key}, #t2.{core::MapEntry::value});
} =>#t1;
static field core::Map<dynamic, dynamic>* map2 = block {
final core::Map<dynamic, dynamic>* #t3 = <dynamic, dynamic>{};
if(self::b)
for (final core::MapEntry<dynamic, dynamic>* #t4 in self::map0.{core::Map::entries})
#t3.{core::Map::[]=}(#t4.{core::MapEntry::key}, #t4.{core::MapEntry::value});
#t3.{core::Map::[]=}{Invariant}(#t4.{core::MapEntry::key}, #t4.{core::MapEntry::value});
else
#t3.{core::Map::[]=}(0, 1);
#t3.{core::Map::[]=}{Invariant}(0, 1);
} =>#t3;
static field core::Map<dynamic, dynamic>* map3 = block {
final core::Map<dynamic, dynamic>* #t5 = <dynamic, dynamic>{};
if(self::b)
for (final core::MapEntry<dynamic, dynamic>* #t6 in self::map0.{core::Map::entries})
#t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
#t5.{core::Map::[]=}{Invariant}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
else
for (final core::MapEntry<dynamic, dynamic>* #t7 in self::map0.{core::Map::entries})
#t5.{core::Map::[]=}(#t7.{core::MapEntry::key}, #t7.{core::MapEntry::value});
#t5.{core::Map::[]=}{Invariant}(#t7.{core::MapEntry::key}, #t7.{core::MapEntry::value});
} =>#t5;
static field core::Map<dynamic, core::int*>* map4 = block {
final core::Map<dynamic, core::int*>* #t8 = <dynamic, core::int*>{};
if(self::b)
#t8.{core::Map::[]=}(0, 1);
#t8.{core::Map::[]=}{Invariant}(0, 1);
else
for (dynamic a in self::list)
#t8.{core::Map::[]=}(a, 1);
#t8.{core::Map::[]=}{Invariant}(a, 1);
} =>#t8;
static field core::Map<dynamic, core::int*>* map5 = block {
final core::Map<dynamic, core::int*>* #t9 = <dynamic, core::int*>{};
if(self::b)
for (dynamic a in self::list)
#t9.{core::Map::[]=}(a, 1);
#t9.{core::Map::[]=}{Invariant}(a, 1);
else
#t9.{core::Map::[]=}(0, 1);
#t9.{core::Map::[]=}{Invariant}(0, 1);
} =>#t9;
static field core::Map<dynamic, core::int*>* map6 = block {
final core::Map<dynamic, core::int*>* #t10 = <dynamic, core::int*>{};
if(self::b)
#t10.{core::Map::[]=}(0, 1);
#t10.{core::Map::[]=}{Invariant}(0, 1);
else
for (dynamic a in self::list)
for (final core::MapEntry<dynamic, core::int*>* #t11 in <dynamic, core::int*>{a: 1}.{core::Map::entries})
#t10.{core::Map::[]=}(#t11.{core::MapEntry::key}, #t11.{core::MapEntry::value});
#t10.{core::Map::[]=}{Invariant}(#t11.{core::MapEntry::key}, #t11.{core::MapEntry::value});
} =>#t10;
static field core::Map<dynamic, core::int*>* map7 = block {
final core::Map<dynamic, core::int*>* #t12 = <dynamic, core::int*>{};
if(self::b)
for (dynamic a in self::list)
for (final core::MapEntry<dynamic, core::int*>* #t13 in <dynamic, core::int*>{a: 1}.{core::Map::entries})
#t12.{core::Map::[]=}(#t13.{core::MapEntry::key}, #t13.{core::MapEntry::value});
#t12.{core::Map::[]=}{Invariant}(#t13.{core::MapEntry::key}, #t13.{core::MapEntry::value});
else
#t12.{core::Map::[]=}(0, 1);
#t12.{core::Map::[]=}{Invariant}(0, 1);
} =>#t12;
static field core::Map<dynamic, core::int*>* map8 = block {
final core::Map<dynamic, core::int*>* #t14 = <dynamic, core::int*>{};
if(self::b)
#t14.{core::Map::[]=}(0, 1);
#t14.{core::Map::[]=}{Invariant}(0, 1);
else
for (core::int* i = 0; i.{core::num::<}(self::list.{core::List::length}); i = i.{core::num::+}(1))
#t14.{core::Map::[]=}(self::list.{core::List::[]}(i), 1);
#t14.{core::Map::[]=}{Invariant}(self::list.{core::List::[]}(i), 1);
} =>#t14;
static field core::Map<dynamic, core::int*>* map9 = block {
final core::Map<dynamic, core::int*>* #t15 = <dynamic, core::int*>{};
if(self::b)
for (core::int* i = 0; i.{core::num::<}(self::list.{core::List::length}); i = i.{core::num::+}(1))
#t15.{core::Map::[]=}(self::list.{core::List::[]}(i), 1);
#t15.{core::Map::[]=}{Invariant}(self::list.{core::List::[]}(i), 1);
else
#t15.{core::Map::[]=}(0, 1);
#t15.{core::Map::[]=}{Invariant}(0, 1);
} =>#t15;
static field core::Map<dynamic, core::int*>* map10 = block {
final core::Map<dynamic, core::int*>* #t16 = <dynamic, core::int*>{};
if(self::b)
#t16.{core::Map::[]=}(0, 1);
#t16.{core::Map::[]=}{Invariant}(0, 1);
else
for (core::int* i = 0; i.{core::num::<}(self::list.{core::List::length}); i = i.{core::num::+}(1))
for (final core::MapEntry<dynamic, core::int*>* #t17 in <dynamic, core::int*>{self::list.{core::List::[]}(i): 1}.{core::Map::entries})
#t16.{core::Map::[]=}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
#t16.{core::Map::[]=}{Invariant}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
} =>#t16;
static field core::Map<dynamic, core::int*>* map11 = block {
final core::Map<dynamic, core::int*>* #t18 = <dynamic, core::int*>{};
if(self::b)
for (core::int* i = 0; i.{core::num::<}(self::list.{core::List::length}); i = i.{core::num::+}(1))
for (final core::MapEntry<dynamic, core::int*>* #t19 in <dynamic, core::int*>{self::list.{core::List::[]}(i): 1}.{core::Map::entries})
#t18.{core::Map::[]=}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
#t18.{core::Map::[]=}{Invariant}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
else
#t18.{core::Map::[]=}(0, 1);
#t18.{core::Map::[]=}{Invariant}(0, 1);
} =>#t18;
static field core::Map<core::int*, core::int*>* map12 = block {
final core::Map<core::int*, core::int*>* #t20 = <core::int*, core::int*>{};
if(self::b)
#t20.{core::Map::[]=}(0, 1);
#t20.{core::Map::[]=}{Invariant}(0, 1);
else
if(self::b)
for (final core::MapEntry<core::int*, core::int*>* #t21 in <core::int*, core::int*>{0: 1}.{core::Map::entries})
#t20.{core::Map::[]=}(#t21.{core::MapEntry::key}, #t21.{core::MapEntry::value});
#t20.{core::Map::[]=}{Invariant}(#t21.{core::MapEntry::key}, #t21.{core::MapEntry::value});
} =>#t20;
static field core::Map<dynamic, Null>* error4 = <dynamic, Null>{invalid-expression "pkg/front_end/testcases/unified_collections/mixed_entries.dart:33:32: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
var error4 = {if (b) 0: 1 else for (var a in list) a};

View file

@ -47,12 +47,12 @@ static field core::Map<dynamic, dynamic>* map0 = <dynamic, dynamic>{};
static field core::Map<dynamic, dynamic>* map1 = block {
final core::Map<dynamic, dynamic>* #t1 = <dynamic, dynamic>{};
if(self::b)
#t1.{core::Map::[]=}(0, 1);
#t1.{core::Map::[]=}{Invariant}(0, 1);
else {
core::Iterator<core::MapEntry<dynamic, dynamic>>* :sync-for-iterator = self::map0.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic>* #t2 = :sync-for-iterator.{core::Iterator::current};
#t1.{core::Map::[]=}(#t2.{core::MapEntry::key}, #t2.{core::MapEntry::value});
#t1.{core::Map::[]=}{Invariant}(#t2.{core::MapEntry::key}, #t2.{core::MapEntry::value});
}
}
} =>#t1;
@ -62,11 +62,11 @@ static field core::Map<dynamic, dynamic>* map2 = block {
core::Iterator<core::MapEntry<dynamic, dynamic>>* :sync-for-iterator = self::map0.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic>* #t4 = :sync-for-iterator.{core::Iterator::current};
#t3.{core::Map::[]=}(#t4.{core::MapEntry::key}, #t4.{core::MapEntry::value});
#t3.{core::Map::[]=}{Invariant}(#t4.{core::MapEntry::key}, #t4.{core::MapEntry::value});
}
}
else
#t3.{core::Map::[]=}(0, 1);
#t3.{core::Map::[]=}{Invariant}(0, 1);
} =>#t3;
static field core::Map<dynamic, dynamic>* map3 = block {
final core::Map<dynamic, dynamic>* #t5 = <dynamic, dynamic>{};
@ -74,26 +74,26 @@ static field core::Map<dynamic, dynamic>* map3 = block {
core::Iterator<core::MapEntry<dynamic, dynamic>>* :sync-for-iterator = self::map0.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic>* #t6 = :sync-for-iterator.{core::Iterator::current};
#t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
#t5.{core::Map::[]=}{Invariant}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
}
}
else {
core::Iterator<core::MapEntry<dynamic, dynamic>>* :sync-for-iterator = self::map0.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, dynamic>* #t7 = :sync-for-iterator.{core::Iterator::current};
#t5.{core::Map::[]=}(#t7.{core::MapEntry::key}, #t7.{core::MapEntry::value});
#t5.{core::Map::[]=}{Invariant}(#t7.{core::MapEntry::key}, #t7.{core::MapEntry::value});
}
}
} =>#t5;
static field core::Map<dynamic, core::int*>* map4 = block {
final core::Map<dynamic, core::int*>* #t8 = <dynamic, core::int*>{};
if(self::b)
#t8.{core::Map::[]=}(0, 1);
#t8.{core::Map::[]=}{Invariant}(0, 1);
else {
core::Iterator<dynamic>* :sync-for-iterator = self::list.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
dynamic a = :sync-for-iterator.{core::Iterator::current};
#t8.{core::Map::[]=}(a, 1);
#t8.{core::Map::[]=}{Invariant}(a, 1);
}
}
} =>#t8;
@ -103,16 +103,16 @@ static field core::Map<dynamic, core::int*>* map5 = block {
core::Iterator<dynamic>* :sync-for-iterator = self::list.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
dynamic a = :sync-for-iterator.{core::Iterator::current};
#t9.{core::Map::[]=}(a, 1);
#t9.{core::Map::[]=}{Invariant}(a, 1);
}
}
else
#t9.{core::Map::[]=}(0, 1);
#t9.{core::Map::[]=}{Invariant}(0, 1);
} =>#t9;
static field core::Map<dynamic, core::int*>* map6 = block {
final core::Map<dynamic, core::int*>* #t10 = <dynamic, core::int*>{};
if(self::b)
#t10.{core::Map::[]=}(0, 1);
#t10.{core::Map::[]=}{Invariant}(0, 1);
else {
core::Iterator<dynamic>* :sync-for-iterator = self::list.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
@ -121,7 +121,7 @@ static field core::Map<dynamic, core::int*>* map6 = block {
core::Iterator<core::MapEntry<dynamic, core::int*>>* :sync-for-iterator = <dynamic, core::int*>{a: 1}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, core::int*>* #t11 = :sync-for-iterator.{core::Iterator::current};
#t10.{core::Map::[]=}(#t11.{core::MapEntry::key}, #t11.{core::MapEntry::value});
#t10.{core::Map::[]=}{Invariant}(#t11.{core::MapEntry::key}, #t11.{core::MapEntry::value});
}
}
}
@ -137,40 +137,40 @@ static field core::Map<dynamic, core::int*>* map7 = block {
core::Iterator<core::MapEntry<dynamic, core::int*>>* :sync-for-iterator = <dynamic, core::int*>{a: 1}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, core::int*>* #t13 = :sync-for-iterator.{core::Iterator::current};
#t12.{core::Map::[]=}(#t13.{core::MapEntry::key}, #t13.{core::MapEntry::value});
#t12.{core::Map::[]=}{Invariant}(#t13.{core::MapEntry::key}, #t13.{core::MapEntry::value});
}
}
}
}
else
#t12.{core::Map::[]=}(0, 1);
#t12.{core::Map::[]=}{Invariant}(0, 1);
} =>#t12;
static field core::Map<dynamic, core::int*>* map8 = block {
final core::Map<dynamic, core::int*>* #t14 = <dynamic, core::int*>{};
if(self::b)
#t14.{core::Map::[]=}(0, 1);
#t14.{core::Map::[]=}{Invariant}(0, 1);
else
for (core::int* i = 0; i.{core::num::<}(self::list.{core::List::length}); i = i.{core::num::+}(1))
#t14.{core::Map::[]=}(self::list.{core::List::[]}(i), 1);
#t14.{core::Map::[]=}{Invariant}(self::list.{core::List::[]}(i), 1);
} =>#t14;
static field core::Map<dynamic, core::int*>* map9 = block {
final core::Map<dynamic, core::int*>* #t15 = <dynamic, core::int*>{};
if(self::b)
for (core::int* i = 0; i.{core::num::<}(self::list.{core::List::length}); i = i.{core::num::+}(1))
#t15.{core::Map::[]=}(self::list.{core::List::[]}(i), 1);
#t15.{core::Map::[]=}{Invariant}(self::list.{core::List::[]}(i), 1);
else
#t15.{core::Map::[]=}(0, 1);
#t15.{core::Map::[]=}{Invariant}(0, 1);
} =>#t15;
static field core::Map<dynamic, core::int*>* map10 = block {
final core::Map<dynamic, core::int*>* #t16 = <dynamic, core::int*>{};
if(self::b)
#t16.{core::Map::[]=}(0, 1);
#t16.{core::Map::[]=}{Invariant}(0, 1);
else
for (core::int* i = 0; i.{core::num::<}(self::list.{core::List::length}); i = i.{core::num::+}(1)) {
core::Iterator<core::MapEntry<dynamic, core::int*>>* :sync-for-iterator = <dynamic, core::int*>{self::list.{core::List::[]}(i): 1}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, core::int*>* #t17 = :sync-for-iterator.{core::Iterator::current};
#t16.{core::Map::[]=}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
#t16.{core::Map::[]=}{Invariant}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
}
}
} =>#t16;
@ -181,22 +181,22 @@ static field core::Map<dynamic, core::int*>* map11 = block {
core::Iterator<core::MapEntry<dynamic, core::int*>>* :sync-for-iterator = <dynamic, core::int*>{self::list.{core::List::[]}(i): 1}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<dynamic, core::int*>* #t19 = :sync-for-iterator.{core::Iterator::current};
#t18.{core::Map::[]=}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
#t18.{core::Map::[]=}{Invariant}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
}
}
else
#t18.{core::Map::[]=}(0, 1);
#t18.{core::Map::[]=}{Invariant}(0, 1);
} =>#t18;
static field core::Map<core::int*, core::int*>* map12 = block {
final core::Map<core::int*, core::int*>* #t20 = <core::int*, core::int*>{};
if(self::b)
#t20.{core::Map::[]=}(0, 1);
#t20.{core::Map::[]=}{Invariant}(0, 1);
else
if(self::b) {
core::Iterator<core::MapEntry<core::int*, core::int*>>* :sync-for-iterator = <core::int*, core::int*>{0: 1}.{core::Map::entries}.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final core::MapEntry<core::int*, core::int*>* #t21 = :sync-for-iterator.{core::Iterator::current};
#t20.{core::Map::[]=}(#t21.{core::MapEntry::key}, #t21.{core::MapEntry::value});
#t20.{core::Map::[]=}{Invariant}(#t21.{core::MapEntry::key}, #t21.{core::MapEntry::value});
}
}
} =>#t20;

View file

@ -6,8 +6,8 @@ static method main() → dynamic {
core::bool* b = false;
block {
final core::List<core::String*>* #t1 = <core::String*>[];
#t1.{core::List::add}("ab");
#t1.{core::List::add}{Invariant}("ab");
if(b)
#t1.{core::List::add}("cd");
#t1.{core::List::add}{Invariant}("cd");
} =>#t1;
}

View file

@ -6,9 +6,9 @@ static method main() → dynamic {
core::bool* b = false;
block {
final core::List<core::String*>* #t1 = <core::String*>[];
#t1.{core::List::add}("ab");
#t1.{core::List::add}{Invariant}("ab");
if(b)
#t1.{core::List::add}("cd");
#t1.{core::List::add}{Invariant}("cd");
} =>#t1;
}

View file

@ -631,6 +631,7 @@ type NamedExpression {
type MethodInvocation extends Expression {
Byte tag = 28;
Byte flags;
FileOffset fileOffset;
Expression receiver;
Name name;
@ -1024,6 +1025,7 @@ type ExpressionStatement extends Statement {
type Block extends Statement {
Byte tag = 62;
FileOffset fileOffset;
FileOffset fileEndOffset;
List<Statement> statements;
}

View file

@ -3778,9 +3778,14 @@ abstract class InvocationExpression extends Expression {
/// Expression of form `x.foo(y)`.
class MethodInvocation extends InvocationExpression {
// Must match serialized bit positions.
static const int FlagInvariant = 1 << 0;
static const int FlagBoundsSafe = 1 << 1;
Expression receiver;
Name name;
Arguments arguments;
int flags = 0;
Reference interfaceTargetReference;
@ -3806,6 +3811,41 @@ class MethodInvocation extends InvocationExpression {
interfaceTargetReference = getMemberReferenceGetter(target);
}
/// If `true`, this call is known to be safe wrt. parameter covariance checks.
///
/// This is for instance the case in code patterns like this
///
/// List<int> list = <int>[];
/// list.add(0);
///
/// where the `list` variable is known to hold a value of the same type as
/// the static type. In contrast the would not be the case in code patterns
/// like this
///
/// List<num> list = <double>[];
/// list.add(0); // Runtime error `int` is not a subtype of `double`.
///
bool get isInvariant => flags & FlagInvariant != 0;
void set isInvariant(bool value) {
flags = value ? (flags | FlagInvariant) : (flags & ~FlagInvariant);
}
/// If `true`, this call is known to be safe wrt. parameter covariance checks.
///
/// This is for instance the case in code patterns like this
///
/// List list = new List.filled(2, 0);
/// list[1] = 42;
///
/// where the `list` is known to have a sufficient length for the update
/// in `list[1] = 42`.
bool get isBoundsSafe => flags & FlagBoundsSafe != 0;
void set isBoundsSafe(bool value) {
flags = value ? (flags | FlagBoundsSafe) : (flags & ~FlagBoundsSafe);
}
DartType getStaticTypeInternal(StaticTypeContext context) {
var interfaceTarget = this.interfaceTarget;
if (interfaceTarget != null) {
@ -5879,6 +5919,11 @@ class ExpressionStatement extends Statement {
class Block extends Statement {
final List<Statement> statements;
/// End offset in the source file it comes from. Valid values are from 0 and
/// up, or -1 ([TreeNode.noOffset]) if the file end offset is not available
/// (this is the default if none is specifically set).
int fileEndOffset = TreeNode.noOffset;
Block(this.statements) {
// Ensure statements is mutable.
assert((statements

View file

@ -1711,10 +1711,12 @@ class BinaryBuilder {
readMemberReference(), readExpression())
..fileOffset = offset;
case Tag.MethodInvocation:
int flags = readByte();
int offset = readOffset();
return new MethodInvocation.byReference(readExpression(), readName(),
readArguments(), readInstanceMemberReference(allowNull: true))
..fileOffset = offset;
..fileOffset = offset
..flags = flags;
case Tag.SuperMethodInvocation:
int offset = readOffset();
addTransformerFlag(TransformerFlag.superCalls);
@ -2106,9 +2108,12 @@ class BinaryBuilder {
Block readBlock() {
int stackHeight = variableStack.length;
var offset = readOffset();
var endOffset = readOffset();
var body = readStatementList();
variableStack.length = stackHeight;
return new Block(body)..fileOffset = offset;
return new Block(body)
..fileOffset = offset
..fileEndOffset = endOffset;
}
AssertBlock readAssertBlock() {

View file

@ -1466,6 +1466,7 @@ class BinaryPrinter implements Visitor<void>, BinarySink {
@override
void visitMethodInvocation(MethodInvocation node) {
writeByte(Tag.MethodInvocation);
writeByte(node.flags);
writeOffset(node.fileOffset);
writeNode(node.receiver);
writeName(node.name);
@ -1812,6 +1813,7 @@ class BinaryPrinter implements Visitor<void>, BinarySink {
_variableIndexer.pushScope();
writeByte(Tag.Block);
writeOffset(node.fileOffset);
writeOffset(node.fileEndOffset);
writeNodeList(node.statements);
_variableIndexer.popScope();
}

View file

@ -158,7 +158,8 @@ class CloneVisitorNotMembers implements TreeVisitor<TreeNode> {
visitMethodInvocation(MethodInvocation node) {
return new MethodInvocation.byReference(clone(node.receiver), node.name,
clone(node.arguments), node.interfaceTargetReference);
clone(node.arguments), node.interfaceTargetReference)
..flags = node.flags;
}
visitSuperMethodInvocation(SuperMethodInvocation node) {

View file

@ -1349,6 +1349,16 @@ class Printer extends Visitor<Null> {
writeExpression(node.receiver, Precedence.PRIMARY);
writeSymbol('.');
writeInterfaceTarget(node.name, node.interfaceTargetReference);
List<String> flags = <String>[];
if (node.isInvariant) {
flags.add('Invariant');
}
if (node.isBoundsSafe) {
flags.add('BoundsSafe');
}
if (flags.isNotEmpty) {
write('{${flags.join(',')}}');
}
writeNode(node.arguments);
}

View file

@ -2687,6 +2687,7 @@ Fragment StreamingFlowGraphBuilder::BuildStaticSet(TokenPosition* p) {
Fragment StreamingFlowGraphBuilder::BuildMethodInvocation(TokenPosition* p) {
const intptr_t offset = ReaderOffset() - 1; // Include the tag.
ReadFlags(); // read flags.
const TokenPosition position = ReadPosition(); // read position.
if (p != NULL) *p = position;
@ -3927,7 +3928,8 @@ Fragment StreamingFlowGraphBuilder::BuildBlock() {
Fragment instructions;
instructions += EnterScope(offset);
ReadPosition();
ReadPosition(); // read file offset.
ReadPosition(); // read file end offset.
intptr_t list_length = ReadListLength(); // read number of statements.
for (intptr_t i = 0; i < list_length; ++i) {
if (instructions.is_open()) {

View file

@ -410,6 +410,7 @@ void KernelFingerprintHelper::CalculateExpressionFingerprint() {
CalculateExpressionFingerprint(); // read expression.
return;
case kMethodInvocation:
ReadFlags(); // read flags.
ReadPosition(); // read position.
CalculateExpressionFingerprint(); // read receiver.
BuildHash(ReadNameAsMethodName().Hash()); // read name.
@ -583,7 +584,8 @@ void KernelFingerprintHelper::CalculateStatementFingerprint() {
CalculateExpressionFingerprint(); // read expression.
return;
case kBlock:
ReadPosition();
ReadPosition(); // read file offset.
ReadPosition(); // read file end offset.
CalculateStatementListFingerprint();
return;
case kEmptyStatement:

Some files were not shown because too many files have changed in this diff Show more