d63bfe9c33
Change-Id: Ib2bd27c6c5f8d98a0a07754dce425eab1be9d9c0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105000 Commit-Queue: Dan Rubel <danrubel@google.com> Reviewed-by: Aske Simon Christensen <askesc@google.com> Auto-Submit: Dan Rubel <danrubel@google.com>
20 lines
475 B
Dart
20 lines
475 B
Dart
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
class Foo {
|
|
int? field;
|
|
int? bar(int? x);
|
|
}
|
|
|
|
main() {
|
|
Foo foo = new Foo();
|
|
foo.field = 5;
|
|
foo.bar(6);
|
|
|
|
test_nullable_function_type_formal_param(f: () => 2);
|
|
}
|
|
|
|
int test_nullable_function_type_formal_param({int f()? : null}) {
|
|
return f() ?? -1;
|
|
}
|