98883150d6
This change adds code that detects if an expression can definitively never be constant. We use this to analyze the initializer expressions in const constructors. This check is not entirely water tight, but together with the checks in canonicalization code catches most illegal initializer expressions. The const constructor of class Symbol turns out to be illegal. The name verification check can't be part of the constructor code. R=iposva@google.com Review URL: https://codereview.chromium.org//18649003 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24749 260f80e4-7a28-3924-810f-c04153c831b5
9 lines
307 B
Dart
9 lines
307 B
Dart
// Copyright (c) 2013, 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.
|
|
|
|
patch class Symbol {
|
|
/* patch */ const Symbol(String name)
|
|
: this._name = name;
|
|
}
|