fdc765faad
TEST=existing Change-Id: I0a8fdf09f742b55357411f12dc6164d4050bb83c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196283 Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
47 lines
1.7 KiB
Plaintext
47 lines
1.7 KiB
Plaintext
library /*isNonNullableByDefault*/;
|
|
//
|
|
// Problems in library:
|
|
//
|
|
// pkg/front_end/testcases/nnbd/infer_object_from_dynamic.dart:20:5: Error: This expression has type 'void' and can't be used.
|
|
// g(v);
|
|
// ^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/infer_object_from_dynamic.dart:27:5: Error: This expression has type 'void' and can't be used.
|
|
// h(v);
|
|
// ^
|
|
//
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
|
|
static method f<T extends core::Object? = dynamic>(self::f::T% t) → self::f::T%
|
|
return t;
|
|
static method g<T extends core::Object? = dynamic>(self::g::T? t) → self::g::T%
|
|
return t!;
|
|
static method h<T extends core::Object>(self::h::T? t) → self::h::T
|
|
return t!;
|
|
static method foo(dynamic d, void v, core::Object? onull, core::Object o, core::String? snull, core::String s) → dynamic {
|
|
self::f<dynamic>(d);
|
|
self::f<void>(v);
|
|
self::f<core::Object?>(onull);
|
|
self::f<core::Object>(o);
|
|
self::f<core::String?>(snull);
|
|
self::f<core::String>(s);
|
|
self::g<core::Object>(d);
|
|
self::g<core::Object>(let final Never #t1 = invalid-expression "pkg/front_end/testcases/nnbd/infer_object_from_dynamic.dart:20:5: Error: This expression has type 'void' and can't be used.
|
|
g(v);
|
|
^" in v);
|
|
self::g<core::Object>(onull);
|
|
self::g<core::Object>(o);
|
|
self::g<core::String>(snull);
|
|
self::g<core::String>(s);
|
|
self::h<core::Object>(d);
|
|
self::h<core::Object>(let final Never #t2 = invalid-expression "pkg/front_end/testcases/nnbd/infer_object_from_dynamic.dart:27:5: Error: This expression has type 'void' and can't be used.
|
|
h(v);
|
|
^" in v);
|
|
self::h<core::Object>(onull);
|
|
self::h<core::Object>(o);
|
|
self::h<core::String>(snull);
|
|
self::h<core::String>(s);
|
|
}
|
|
static method main() → dynamic {}
|