blob: 25cda9563acc12b89a7c1d1a79216eed2d63c19e [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object' because 'X?' is nullable and 'Object' isn't.
// - 'Object' is from 'dart:core'.
// Object o = x;
// ^
//
// pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object' because 'X?' is nullable and 'Object' isn't.
// - 'Object' is from 'dart:core'.
// o = x;
// ^
//
import self as self;
import "dart:core" as core;
static method test<X extends core::Object? = dynamic>(self::test::X? x) dynamic {
if(x is{ForNonNullableByDefault} core::String?) {
core::Object o = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object' because 'X?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
Object o = x;
^" in let self::test::X? & core::String? /* '?' & '?' = '?' */ #t2 = x{self::test::X? & core::String? /* '?' & '?' = '?' */} in #t2.==(null) ?{core::Object} #t2 as{TypeError,ForNonNullableByDefault} core::Object : #t2{core::Object};
o = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object' because 'X?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
o = x;
^" in let self::test::X? & core::String? /* '?' & '?' = '?' */ #t4 = x{self::test::X? & core::String? /* '?' & '?' = '?' */} in #t4.==(null) ?{core::Object} #t4 as{TypeError,ForNonNullableByDefault} core::Object : #t4{core::Object};
}
}
static method main() → dynamic {}