blob: 2601d3d8f355b2e2dfe9b92c12c671caf91633b1 [file] [log] [blame] [edit]
library;
//
// 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'.
// - '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'.
// - '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 core::String?) {
core::Object o = 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'.
- 'Object' is from 'dart:core'.
Object o = x;
^" in x{self::test::X? & core::String? /* '?' & '?' = '?' */} as{TypeError} core::Object;
o = 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'.
- 'Object' is from 'dart:core'.
o = x;
^" in x{self::test::X? & core::String? /* '?' & '?' = '?' */} as{TypeError} core::Object;
}
}
static method main() dynamic {}