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

Side by Side Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 2034473002: Delay 'supertype' for ClassElementImpl and EnumElementImpl. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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.generated.resolver; 5 library analyzer.src.generated.resolver;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 3330 matching lines...) Expand 10 before | Expand all | Expand 10 after
3341 */ 3341 */
3342 EnumMemberBuilder(this._typeProvider); 3342 EnumMemberBuilder(this._typeProvider);
3343 3343
3344 @override 3344 @override
3345 Object visitEnumDeclaration(EnumDeclaration node) { 3345 Object visitEnumDeclaration(EnumDeclaration node) {
3346 // 3346 //
3347 // Finish building the enum. 3347 // Finish building the enum.
3348 // 3348 //
3349 EnumElementImpl enumElement = node.name.staticElement as EnumElementImpl; 3349 EnumElementImpl enumElement = node.name.staticElement as EnumElementImpl;
3350 InterfaceType enumType = enumElement.type; 3350 InterfaceType enumType = enumElement.type;
3351 enumElement.supertype = _typeProvider.objectType;
3352 // 3351 //
3353 // Populate the fields. 3352 // Populate the fields.
3354 // 3353 //
3355 List<FieldElement> fields = new List<FieldElement>(); 3354 List<FieldElement> fields = new List<FieldElement>();
3356 List<PropertyAccessorElement> getters = new List<PropertyAccessorElement>(); 3355 List<PropertyAccessorElement> getters = new List<PropertyAccessorElement>();
3357 InterfaceType intType = _typeProvider.intType; 3356 InterfaceType intType = _typeProvider.intType;
3358 String indexFieldName = "index"; 3357 String indexFieldName = "index";
3359 FieldElementImpl indexField = new FieldElementImpl(indexFieldName, -1); 3358 FieldElementImpl indexField = new FieldElementImpl(indexFieldName, -1);
3360 indexField.final2 = true; 3359 indexField.final2 = true;
3361 indexField.synthetic = true; 3360 indexField.synthetic = true;
(...skipping 7617 matching lines...) Expand 10 before | Expand all | Expand 10 after
10979 return null; 10978 return null;
10980 } 10979 }
10981 if (identical(node.staticElement, variable)) { 10980 if (identical(node.staticElement, variable)) {
10982 if (node.inSetterContext()) { 10981 if (node.inSetterContext()) {
10983 result = true; 10982 result = true;
10984 } 10983 }
10985 } 10984 }
10986 return null; 10985 return null;
10987 } 10986 }
10988 } 10987 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698