Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: pkg/analyzer/lib/src/dart/element/member.dart

Issue 1966323002: Add API to force the computation of constant values (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library analyzer.src.dart.element.member; 5 library analyzer.src.dart.element.member;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/constant/value.dart'; 8 import 'package:analyzer/dart/constant/value.dart';
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 1029
1030 @override 1030 @override
1031 @deprecated 1031 @deprecated
1032 bool get isPotentiallyMutatedInScope => 1032 bool get isPotentiallyMutatedInScope =>
1033 baseElement.isPotentiallyMutatedInScope; 1033 baseElement.isPotentiallyMutatedInScope;
1034 1034
1035 @override 1035 @override
1036 bool get isStatic => baseElement.isStatic; 1036 bool get isStatic => baseElement.isStatic;
1037 1037
1038 @override 1038 @override
1039 DartObject computeConstantValue() => baseElement.computeConstantValue();
1040
1041 @override
1039 void visitChildren(ElementVisitor visitor) { 1042 void visitChildren(ElementVisitor visitor) {
1040 // TODO(brianwilkerson) We need to finish implementing the accessors used 1043 // TODO(brianwilkerson) We need to finish implementing the accessors used
1041 // below so that we can safely invoke them. 1044 // below so that we can safely invoke them.
1042 super.visitChildren(visitor); 1045 super.visitChildren(visitor);
1043 baseElement.initializer?.accept(visitor); 1046 baseElement.initializer?.accept(visitor);
1044 } 1047 }
1045 } 1048 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/handle.dart ('k') | pkg/analyzer/test/src/dart/element/element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698