| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/nnbd/issue42758.dart:7:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null. |
| // var l2 = [...?n1]; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue42758.dart:8:16: Error: Can't spread a value with static type 'Never?'. |
| // var l3 = [...n2]; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue42758.dart:10:16: Error: Can't spread a value with static type 'Null'. |
| // var l5 = [...n3]; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue42758.dart:13:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null. |
| // var s2 = {...?n1, n1}; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'. |
| // var s3 = {...n2, n1}; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue42758.dart:16:16: Error: Can't spread a value with static type 'Null'. |
| // var s5 = {...n3, n1}; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue42758.dart:19:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null. |
| // var m2 = {...?n1, n1: n1}; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue42758.dart:20:16: Error: Can't spread a value with static type 'Never?'. |
| // var m3 = {...n2, n1: n1}; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue42758.dart:22:16: Error: Can't spread a value with static type 'Null'. |
| // var m5 = {...n3, n1: n1}; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue42758.dart:29:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null. |
| // var l2 = [...?n1]; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue42758.dart:30:16: Error: Can't spread a value with static type 'N2'. |
| // var l3 = [...n2]; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue42758.dart:32:16: Error: Can't spread a value with static type 'N3'. |
| // var l5 = [...n3]; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue42758.dart:35:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null. |
| // var s2 = {...?n1, n1}; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'. |
| // var s3 = {...n2, n1}; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue42758.dart:38:16: Error: Can't spread a value with static type 'N3'. |
| // var s5 = {...n3, n1}; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue42758.dart:41:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null. |
| // var m2 = {...?n1, n1: n1}; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue42758.dart:42:16: Error: Can't spread a value with static type 'N2'. |
| // var m3 = {...n2, n1: n1}; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue42758.dart:44:16: Error: Can't spread a value with static type 'N3'. |
| // var m5 = {...n3, n1: n1}; |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| import "dart:_internal" as _in; |
| import "dart:collection" as col; |
| |
| static method test1(Never n1, Never? n2, Null n3) → dynamic { |
| core::List<Never> l1 = block { |
| final core::List<Never> #t1 = core::List::of<Never>(let final Never #t2 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")); |
| } =>#t1; |
| core::List<Never> l2 = block { |
| final core::List<Never> #t3 = core::_GrowableList::•<Never>(0); |
| final core::Iterable<Never>? #t4 = let final Never #t5 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."); |
| if(!(#t4 == null)) |
| #t3.{core::List::addAll}{Invariant}(#t4{core::Iterable<Never>}){(core::Iterable<Never>) → void}; |
| } =>#t3; |
| core::List<dynamic> l3 = core::_GrowableList::_literal1<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]; |
| ^"); |
| core::List<Never> l4 = block { |
| final core::List<Never> #t6 = core::_GrowableList::•<Never>(0); |
| final core::Iterable<Never>? #t7 = n2; |
| if(!(#t7 == null)) |
| #t6.{core::List::addAll}{Invariant}(#t7{core::Iterable<Never>}){(core::Iterable<Never>) → void}; |
| } =>#t6; |
| core::List<dynamic> l5 = core::_GrowableList::_literal1<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]; |
| ^"); |
| core::List<Never> l6 = block { |
| final core::List<Never> #t8 = core::_GrowableList::•<Never>(0); |
| final core::Iterable<Never>? #t9 = n3; |
| if(!(#t9 == null)) |
| #t8.{core::List::addAll}{Invariant}(#t9{core::Iterable<Never>}){(core::Iterable<Never>) → void}; |
| } =>#t8; |
| core::Set<Never> s1 = block { |
| final core::Set<Never> #t10 = col::LinkedHashSet::of<Never>(let final Never #t11 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")); |
| #t10.{core::Set::add}{Invariant}(let final Never #t12 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(Never) → core::bool}; |
| } =>#t10; |
| core::Set<Never> s2 = block { |
| final core::Set<Never> #t13 = new col::_CompactLinkedHashSet::•<Never>(); |
| final core::Iterable<Never>? #t14 = let final Never #t15 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."); |
| if(!(#t14 == null)) |
| #t13.{core::Set::addAll}{Invariant}(#t14{core::Iterable<Never>}){(core::Iterable<Never>) → void}; |
| #t13.{core::Set::add}{Invariant}(let final Never #t16 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(Never) → core::bool}; |
| } =>#t13; |
| core::Set<dynamic> s3 = block { |
| final core::Set<dynamic> #t17 = new col::_CompactLinkedHashSet::•<dynamic>(); |
| #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}; |
| ^"){(dynamic) → core::bool}; |
| #t17.{core::Set::add}{Invariant}(let final Never #t18 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(dynamic) → core::bool}; |
| } =>#t17; |
| core::Set<Never> s4 = block { |
| final core::Set<Never> #t19 = new col::_CompactLinkedHashSet::•<Never>(); |
| final core::Iterable<Never>? #t20 = n2; |
| if(!(#t20 == null)) |
| #t19.{core::Set::addAll}{Invariant}(#t20{core::Iterable<Never>}){(core::Iterable<Never>) → void}; |
| #t19.{core::Set::add}{Invariant}(let final Never #t21 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(Never) → core::bool}; |
| } =>#t19; |
| core::Set<dynamic> s5 = block { |
| final core::Set<dynamic> #t22 = new col::_CompactLinkedHashSet::•<dynamic>(); |
| #t22.{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}; |
| ^"){(dynamic) → core::bool}; |
| #t22.{core::Set::add}{Invariant}(let final Never #t23 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(dynamic) → core::bool}; |
| } =>#t22; |
| core::Set<Never> s6 = block { |
| final core::Set<Never> #t24 = new col::_CompactLinkedHashSet::•<Never>(); |
| final core::Iterable<Never>? #t25 = n3; |
| if(!(#t25 == null)) |
| #t24.{core::Set::addAll}{Invariant}(#t25{core::Iterable<Never>}){(core::Iterable<Never>) → void}; |
| #t24.{core::Set::add}{Invariant}(let final Never #t26 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(Never) → core::bool}; |
| } =>#t24; |
| core::Map<Never, Never> m1 = block { |
| final core::Map<Never, Never> #t27 = col::LinkedHashMap::of<Never, Never>(let final Never #t28 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")); |
| #t27.{core::Map::[]=}{Invariant}(let final Never #t29 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t30 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(Never, Never) → void}; |
| } =>#t27; |
| core::Map<Never, Never> m2 = block { |
| final core::Map<Never, Never> #t31 = <Never, Never>{}; |
| final core::Map<Never, Never>? #t32 = let final Never #t33 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."); |
| if(!(#t32 == null)) |
| #t31.{core::Map::addAll}{Invariant}(#t32{core::Map<Never, Never>}){(core::Map<Never, Never>) → void}; |
| #t31.{core::Map::[]=}{Invariant}(let final Never #t34 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t35 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(Never, Never) → void}; |
| } =>#t31; |
| 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}; |
| ^": null, let final Never #t36 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."): let final Never #t37 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")}; |
| core::Map<Never, Never> m4 = block { |
| final core::Map<Never, Never> #t38 = <Never, Never>{}; |
| final core::Map<Never, Never>? #t39 = n2; |
| if(!(#t39 == null)) |
| #t38.{core::Map::addAll}{Invariant}(#t39{core::Map<Never, Never>}){(core::Map<Never, Never>) → void}; |
| #t38.{core::Map::[]=}{Invariant}(let final Never #t40 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t41 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(Never, Never) → void}; |
| } =>#t38; |
| 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}; |
| ^": null, let final Never #t42 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."): let final Never #t43 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")}; |
| core::Map<Never, Never> m6 = block { |
| final core::Map<Never, Never> #t44 = <Never, Never>{}; |
| final core::Map<Never, Never>? #t45 = n3; |
| if(!(#t45 == null)) |
| #t44.{core::Map::addAll}{Invariant}(#t45{core::Map<Never, Never>}){(core::Map<Never, Never>) → void}; |
| #t44.{core::Map::[]=}{Invariant}(let final Never #t46 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final Never #t47 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(Never, Never) → void}; |
| } =>#t44; |
| } |
| static method test2<N1 extends Never, N2 extends Never?, N3 extends Null>(self::test2::N1 n1, self::test2::N2% n2, self::test2::N3% n3) → dynamic { |
| core::List<Never> l1 = block { |
| final core::List<Never> #t48 = core::List::of<Never>(let final self::test2::N1 #t49 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")); |
| } =>#t48; |
| core::List<Never> l2 = block { |
| final core::List<Never> #t50 = core::_GrowableList::•<Never>(0); |
| final core::Iterable<Never>? #t51 = let final self::test2::N1 #t52 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."); |
| if(!(#t51 == null)) |
| #t50.{core::List::addAll}{Invariant}(#t51{core::Iterable<Never>}){(core::Iterable<Never>) → void}; |
| } =>#t50; |
| core::List<dynamic> l3 = core::_GrowableList::_literal1<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]; |
| ^"); |
| core::List<Never> l4 = block { |
| final core::List<Never> #t53 = core::_GrowableList::•<Never>(0); |
| final core::Iterable<Never>? #t54 = n2; |
| if(!(#t54 == null)) |
| #t53.{core::List::addAll}{Invariant}(#t54{core::Iterable<Never>}){(core::Iterable<Never>) → void}; |
| } =>#t53; |
| core::List<dynamic> l5 = core::_GrowableList::_literal1<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]; |
| ^"); |
| core::List<Never> l6 = block { |
| final core::List<Never> #t55 = core::_GrowableList::•<Never>(0); |
| final core::Iterable<Never>? #t56 = n3; |
| if(!(#t56 == null)) |
| #t55.{core::List::addAll}{Invariant}(#t56{core::Iterable<Never>}){(core::Iterable<Never>) → void}; |
| } =>#t55; |
| core::Set<self::test2::N1> s1 = block { |
| final core::Set<self::test2::N1> #t57 = col::LinkedHashSet::of<self::test2::N1>(let final self::test2::N1 #t58 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")); |
| #t57.{core::Set::add}{Invariant}(let final self::test2::N1 #t59 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(self::test2::N1) → core::bool}; |
| } =>#t57; |
| core::Set<self::test2::N1> s2 = block { |
| final core::Set<self::test2::N1> #t60 = new col::_CompactLinkedHashSet::•<self::test2::N1>(); |
| final core::Iterable<self::test2::N1>? #t61 = let final self::test2::N1 #t62 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."); |
| if(!(#t61 == null)) |
| #t60.{core::Set::addAll}{Invariant}(#t61{core::Iterable<self::test2::N1>}){(core::Iterable<self::test2::N1>) → void}; |
| #t60.{core::Set::add}{Invariant}(let final self::test2::N1 #t63 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(self::test2::N1) → core::bool}; |
| } =>#t60; |
| core::Set<dynamic> s3 = block { |
| final core::Set<dynamic> #t64 = new col::_CompactLinkedHashSet::•<dynamic>(); |
| #t64.{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}; |
| ^"){(dynamic) → core::bool}; |
| #t64.{core::Set::add}{Invariant}(let final self::test2::N1 #t65 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(dynamic) → core::bool}; |
| } =>#t64; |
| core::Set<self::test2::N1> s4 = block { |
| final core::Set<self::test2::N1> #t66 = new col::_CompactLinkedHashSet::•<self::test2::N1>(); |
| final core::Iterable<self::test2::N1>? #t67 = n2; |
| if(!(#t67 == null)) |
| #t66.{core::Set::addAll}{Invariant}(#t67{core::Iterable<self::test2::N1>}){(core::Iterable<self::test2::N1>) → void}; |
| #t66.{core::Set::add}{Invariant}(let final self::test2::N1 #t68 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(self::test2::N1) → core::bool}; |
| } =>#t66; |
| core::Set<dynamic> s5 = block { |
| final core::Set<dynamic> #t69 = new col::_CompactLinkedHashSet::•<dynamic>(); |
| #t69.{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}; |
| ^"){(dynamic) → core::bool}; |
| #t69.{core::Set::add}{Invariant}(let final self::test2::N1 #t70 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(dynamic) → core::bool}; |
| } =>#t69; |
| core::Set<self::test2::N1> s6 = block { |
| final core::Set<self::test2::N1> #t71 = new col::_CompactLinkedHashSet::•<self::test2::N1>(); |
| final core::Iterable<self::test2::N1>? #t72 = n3; |
| if(!(#t72 == null)) |
| #t71.{core::Set::addAll}{Invariant}(#t72{core::Iterable<self::test2::N1>}){(core::Iterable<self::test2::N1>) → void}; |
| #t71.{core::Set::add}{Invariant}(let final self::test2::N1 #t73 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(self::test2::N1) → core::bool}; |
| } =>#t71; |
| core::Map<self::test2::N1, self::test2::N1> m1 = block { |
| final core::Map<self::test2::N1, self::test2::N1> #t74 = col::LinkedHashMap::of<self::test2::N1, self::test2::N1>(let final self::test2::N1 #t75 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")); |
| #t74.{core::Map::[]=}{Invariant}(let final self::test2::N1 #t76 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t77 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(self::test2::N1, self::test2::N1) → void}; |
| } =>#t74; |
| core::Map<self::test2::N1, self::test2::N1> m2 = block { |
| final core::Map<self::test2::N1, self::test2::N1> #t78 = <self::test2::N1, self::test2::N1>{}; |
| final core::Map<self::test2::N1, self::test2::N1>? #t79 = let final self::test2::N1 #t80 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."); |
| if(!(#t79 == null)) |
| #t78.{core::Map::addAll}{Invariant}(#t79{core::Map<self::test2::N1, self::test2::N1>}){(core::Map<self::test2::N1, self::test2::N1>) → void}; |
| #t78.{core::Map::[]=}{Invariant}(let final self::test2::N1 #t81 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t82 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(self::test2::N1, self::test2::N1) → void}; |
| } =>#t78; |
| 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}; |
| ^": null, let final self::test2::N1 #t83 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."): let final self::test2::N1 #t84 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")}; |
| core::Map<self::test2::N1, self::test2::N1> m4 = block { |
| final core::Map<self::test2::N1, self::test2::N1> #t85 = <self::test2::N1, self::test2::N1>{}; |
| final core::Map<self::test2::N1, self::test2::N1>? #t86 = n2; |
| if(!(#t86 == null)) |
| #t85.{core::Map::addAll}{Invariant}(#t86{core::Map<self::test2::N1, self::test2::N1>}){(core::Map<self::test2::N1, self::test2::N1>) → void}; |
| #t85.{core::Map::[]=}{Invariant}(let final self::test2::N1 #t87 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t88 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(self::test2::N1, self::test2::N1) → void}; |
| } =>#t85; |
| 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}; |
| ^": null, let final self::test2::N1 #t89 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."): let final self::test2::N1 #t90 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")}; |
| core::Map<self::test2::N1, self::test2::N1> m6 = block { |
| final core::Map<self::test2::N1, self::test2::N1> #t91 = <self::test2::N1, self::test2::N1>{}; |
| final core::Map<self::test2::N1, self::test2::N1>? #t92 = n3; |
| if(!(#t92 == null)) |
| #t91.{core::Map::addAll}{Invariant}(#t92{core::Map<self::test2::N1, self::test2::N1>}){(core::Map<self::test2::N1, self::test2::N1>) → void}; |
| #t91.{core::Map::[]=}{Invariant}(let final self::test2::N1 #t93 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."), let final self::test2::N1 #t94 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(self::test2::N1, self::test2::N1) → void}; |
| } =>#t91; |
| } |
| static method main() → dynamic {} |