47d462e8b1
Fixes #40834 Change-Id: I2fdad5a383c1873b1dd782b70e2f1e3ab8664b40 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137960 Commit-Queue: Jens Johansen <jensj@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
19 lines
287 B
Dart
19 lines
287 B
Dart
class Foo {
|
|
String? x;
|
|
int y;
|
|
|
|
Foo(Object? o) : x = o != null ? o as String? : null, y = 0;
|
|
|
|
void foo(dynamic x) {
|
|
if (x is String? ? 4 : 2 == 4) {
|
|
print("hello");
|
|
}
|
|
}
|
|
|
|
void bar(dynamic x) {
|
|
if (x is String ? 4 : 2 == 4) {
|
|
print("hello");
|
|
}
|
|
}
|
|
}
|