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

Unified Diff: pkg/compiler/lib/src/resolution/class_members.dart

Issue 2031293002: Don't crash when tree shaking is disabled (Closed) Base URL: https://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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/compiler/dart2js/serialization/model_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/class_members.dart
diff --git a/pkg/compiler/lib/src/resolution/class_members.dart b/pkg/compiler/lib/src/resolution/class_members.dart
index 2a12190d82a95e9bfa10aa736e5cb6196a54fcc4..7c2877798a890f885b13ee3aeea4c4364f0b9923 100644
--- a/pkg/compiler/lib/src/resolution/class_members.dart
+++ b/pkg/compiler/lib/src/resolution/class_members.dart
@@ -876,6 +876,9 @@ abstract class ClassMemberMixin implements ClassElement {
/// and private names.
void computeClassMember(
Resolution resolution, String name, Setlet<Name> names) {
+ // TODO(johnniwinther): Should we assert that the class has been resolved
+ // instead?
+ ensureResolved(resolution);
if (isMemberComputed(name)) return;
if (Name.isPrivateName(name)) {
names
@@ -899,6 +902,9 @@ abstract class ClassMemberMixin implements ClassElement {
}
void computeAllClassMembers(Resolution resolution) {
+ // TODO(johnniwinther): Should we assert that the class has been resolved
+ // instead?
+ ensureResolved(resolution);
if (areAllMembersComputed()) return;
MembersCreator creator = _prepareCreator(resolution);
creator.computeAllMembers();
« no previous file with comments | « no previous file | tests/compiler/dart2js/serialization/model_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698