Files
sdk/pkg/front_end/testcases/nnbd/nullable_param.dart.strong.expect
T
asiva ce5d18b0f0 [CFE] - Update exectations of CFE unit tests to account for NNBD unfork
These updated expectations were generated by running the script
pkg/front_end/tool/update_all.dart

Change-Id: I6b8f7c5e50160da96e90c44fa888bd9b072efd06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147321
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-05-07 23:16:21 +00:00

25 lines
860 B
Plaintext

library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
class Foo extends core::Object {
field core::int? field = null;
synthetic constructor •() → self::Foo
: super core::Object::•()
;
method bar(core::int? x) → core::int? {}
}
static method main() → dynamic {
self::Foo foo = new self::Foo::•();
foo.{self::Foo::field} = 5;
foo.{self::Foo::bar}(6);
self::test_nullable_function_type_formal_param(f: () → core::int => 2);
}
static method test_nullable_function_type_formal_param({() →? core::int f = #C1}) → core::int {
return let final core::int? #t1 = let final () →? core::int #t2 = f in #t2.{core::Object::==}(null) ?{core::int?} null : #t2{() → core::int}.call() in #t1.{core::num::==}(null) ?{core::int} 1.{core::int::unary-}() : #t1{core::int};
}
constants {
#C1 = null
}