blob: 56d24122d67b4354abdade37a414bdbba3e1db99 [file] [log] [blame]
// 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.
// Verify that 'is' test of a nullable type accepts null.
// Regression test for
import 'package:expect/expect.dart';
abstract class A {}
class B extends A {}
class C extends A {}
bool foo(A? x) {
if (x is C?) {
print('$x is C?');
return true;
print('$x is not C?');
return false;
void main() {