OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 package com.google.dart.compiler.resolver; | 5 package com.google.dart.compiler.resolver; |
6 | 6 |
7 import com.google.common.annotations.VisibleForTesting; | 7 import com.google.common.annotations.VisibleForTesting; |
8 import com.google.common.collect.Maps; | 8 import com.google.common.collect.Maps; |
9 import com.google.dart.compiler.DartCompilationError; | 9 import com.google.dart.compiler.DartCompilationError; |
10 import com.google.dart.compiler.DartCompilerContext; | 10 import com.google.dart.compiler.DartCompilerContext; |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 return null; | 194 return null; |
195 } | 195 } |
196 | 196 |
197 @Override | 197 @Override |
198 public Void visitField(DartField node) { | 198 public Void visitField(DartField node) { |
199 Modifiers modifiers = node.getModifiers(); | 199 Modifiers modifiers = node.getModifiers(); |
200 if (modifiers.isFinal()) { | 200 if (modifiers.isFinal()) { |
201 // final top-level fields are implicitly compile-time constants. | 201 // final top-level fields are implicitly compile-time constants. |
202 modifiers = modifiers.makeConstant(); | 202 modifiers = modifiers.makeConstant(); |
203 } | 203 } |
204 node.setElement(Elements.fieldFromNode(node, library, modifiers)); | 204 node.setElement(Elements.fieldFromNode(node, library, node.getMetadata(),
modifiers)); |
205 return null; | 205 return null; |
206 } | 206 } |
207 } | 207 } |
208 } | 208 } |
OLD | NEW |