blob: 58b83542a922c6a0059fb3796cf8e1edf442164d [file] [log] [blame]
/*
* 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.
*/
/**
* @assertion A new primitive type Never. This type is denoted by the built-in
* type declaration Never declared in dart:core.
*
* @description Check new primitive type Never
* @author sgrekhov@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
import "../../Utils/expect.dart";
class C {}
dynamic test() => Never;
main() {
C c1 = Never;
c1 = test();
Expect.isTrue(c1 is Never);
C? c2 = Never;
c2 = test();
Expect.isTrue(c2 is Never);
}