blob: c5ce2a0a40a708fd77000c9128c1891dc5c76e44 [file] [log] [blame]
// Copyright (c) 2011, 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 It is a compile-time error if an expression is required to be a
/// constant expression but its evaluation would raise an exception.
/// @description Checks that using null in a shift constant expression is a
/// Scompile-time error.
/// @author kaigorodov
class C {
final m;
const C() :
m = null >> 2;
// ^
// [analyzer] unspecified
// [cfe] unspecified
}
main() {
try {
const C();
// ^
// [analyzer] unspecified
} catch (ok) {} // NPEs and whatnot
}