blob: 3483e2f848f3d3ec6a34462d910ea69fac6572b7 [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 A qualified reference to a static constant variable is a constant expression.
* @description Checks that a reference to a non-constant top-level variable cannot
* be used to initialize a constant variable.
* @author iefremov
* @compile-error
* @reviewer rodionov
*/
var a = 1;
const m = a;
main() {
try {
print(m);
} catch(x) {}
}