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

Unified Diff: pkg/compiler/lib/src/typechecker.dart

Issue 2046053002: typecheck erroneous members as dynamic (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/co19/co19-dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/typechecker.dart
diff --git a/pkg/compiler/lib/src/typechecker.dart b/pkg/compiler/lib/src/typechecker.dart
index 85710b11d3da5cbf9d040e3dd29402925f1cfc42..2a8ab08ccdc7592f86772f6c29d0f3111b726051 100644
--- a/pkg/compiler/lib/src/typechecker.dart
+++ b/pkg/compiler/lib/src/typechecker.dart
@@ -40,7 +40,7 @@ import 'elements/elements.dart'
TypeDeclarationElement,
TypedElement,
VariableElement;
-import 'resolution/class_members.dart' show MembersCreator;
+import 'resolution/class_members.dart' show MembersCreator, ErroneousMember;
import 'resolution/tree_elements.dart' show TreeElements;
import 'tree/tree.dart';
import 'util/util.dart' show Link, LinkBuilder;
@@ -733,7 +733,11 @@ class TypeCheckerVisitor extends Visitor<DartType> {
Name name, DartType unaliasedBound, InterfaceType interface) {
MemberSignature member = lookupMemberSignature(memberName, interface);
if (member != null) {
- return new MemberAccess(member);
+ if (member is ErroneousMember) {
+ return const DynamicAccess();
+ } else {
+ return new MemberAccess(member);
+ }
}
if (name == const PublicName('call')) {
if (unaliasedBound.isFunctionType) {
« no previous file with comments | « no previous file | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698