1ff566fc35
BUG=http://dartbug.com/3491 Committed: https://code.google.com/p/dart/source/detail?r=13731 Review URL: https://codereview.chromium.org//11188007 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13738 260f80e4-7a28-3924-810f-c04153c831b5
21 lines
447 B
Dart
21 lines
447 B
Dart
// Copyright (c) 2012, 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.
|
|
|
|
class Bad {
|
|
int foo;
|
|
const int bar =
|
|
foo /// 01: compile-time error
|
|
-1;
|
|
static const int toto =
|
|
bar /// 02: compile-time error
|
|
-3;
|
|
}
|
|
|
|
void use(x) {}
|
|
|
|
main() {
|
|
use(new Bad().bar);
|
|
use(Bad.toto);
|
|
}
|