d75f7005a0
Closes #44276 Change-Id: I60f398c413f3b40215e9049ee3292eaf7f700d7c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173722 Reviewed-by: Dmitry Stefantsov <dmitryas@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
19 lines
362 B
Dart
19 lines
362 B
Dart
// Copyright (c) 2020, 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.
|
|
|
|
void main() {
|
|
fun();
|
|
}
|
|
|
|
class Base {
|
|
int? value1;
|
|
int? value2;
|
|
}
|
|
|
|
int? fun() {
|
|
Base? a;
|
|
final b = a?.value1 ?? a?.value2;
|
|
return b;
|
|
}
|