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 library dart2js.resolution.members; | 5 library dart2js.resolution.members; |
6 | 6 |
7 import '../common.dart'; | 7 import '../common.dart'; |
8 import '../common/names.dart' show Selectors; | 8 import '../common/names.dart' show Selectors; |
9 import '../common/resolution.dart' show Resolution; | 9 import '../common/resolution.dart' show Resolution; |
10 import '../compile_time_constants.dart'; | 10 import '../compile_time_constants.dart'; |
(...skipping 2988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2999 // Create [ErroneousElement] for unresolved access. | 2999 // Create [ErroneousElement] for unresolved access. |
3000 ErroneousElement error = reportCannotResolve(node, text); | 3000 ErroneousElement error = reportCannotResolve(node, text); |
3001 return handleUpdate(node, name, new StaticAccess.unresolved(error)); | 3001 return handleUpdate(node, name, new StaticAccess.unresolved(error)); |
3002 } | 3002 } |
3003 } else { | 3003 } else { |
3004 return handleResolvedSendSet(node, name, element); | 3004 return handleResolvedSendSet(node, name, element); |
3005 } | 3005 } |
3006 } | 3006 } |
3007 | 3007 |
3008 ResolutionResult visitSend(Send node) { | 3008 ResolutionResult visitSend(Send node) { |
3009 // Resolve type arguments to ensure that these are well-formed types. | |
3010 visit(node.typeArgumentsNode); | |
eernst
2016/11/30 10:39:01
I basically buy the argument that we can reject "m
Johnni Winther
2016/11/30 11:51:03
Acknowledged.
| |
3009 if (node.isOperator) { | 3011 if (node.isOperator) { |
3010 // `a && b`, `a + b`, `-a`, or `a is T`. | 3012 // `a && b`, `a + b`, `-a`, or `a is T`. |
3011 return handleOperatorSend(node); | 3013 return handleOperatorSend(node); |
3012 } else if (node.receiver != null) { | 3014 } else if (node.receiver != null) { |
3013 // `a.b`. | 3015 // `a.b`. |
3014 return handleQualifiedSend(node); | 3016 return handleQualifiedSend(node); |
3015 } else { | 3017 } else { |
3016 // `a`. | 3018 // `a`. |
3017 return handleUnqualifiedSend(node); | 3019 return handleUnqualifiedSend(node); |
3018 } | 3020 } |
(...skipping 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4745 } | 4747 } |
4746 return const NoneResult(); | 4748 return const NoneResult(); |
4747 } | 4749 } |
4748 } | 4750 } |
4749 | 4751 |
4750 /// Looks up [name] in [scope] and unwraps the result. | 4752 /// Looks up [name] in [scope] and unwraps the result. |
4751 Element lookupInScope( | 4753 Element lookupInScope( |
4752 DiagnosticReporter reporter, Node node, Scope scope, String name) { | 4754 DiagnosticReporter reporter, Node node, Scope scope, String name) { |
4753 return Elements.unwrap(scope.lookup(name), reporter, node); | 4755 return Elements.unwrap(scope.lookup(name), reporter, node); |
4754 } | 4756 } |
OLD | NEW |