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

Unified Diff: tests/compiler/dart2js/semantic_visitor_test_send_data.dart

Issue 1306143002: Remove SendResolver.computeSendStructure. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix handling of invalid this access. Created 5 years, 4 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 | « pkg/compiler/lib/src/resolution/send_resolver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/semantic_visitor_test_send_data.dart
diff --git a/tests/compiler/dart2js/semantic_visitor_test_send_data.dart b/tests/compiler/dart2js/semantic_visitor_test_send_data.dart
index 9a53f7740da85ab144ace5cd082e600581ff9174..f085b3ee123368bf24832534e52b3d81e5b2c1c3 100644
--- a/tests/compiler/dart2js/semantic_visitor_test_send_data.dart
+++ b/tests/compiler/dart2js/semantic_visitor_test_send_data.dart
@@ -1107,6 +1107,16 @@ const Map<String, List<Test>> SEND_TESTS = const {
''',
const Visit(VisitKind.VISIT_THIS_INVOKE,
arguments: '(null,42)')),
+ const Test.clazz(
+ '''
+ class C {
+ call(a, b) {}
+ static m() { this(null, 42); }
+ }
+ ''',
+ const Visit(VisitKind.ERROR_INVALID_INVOKE,
+ error: MessageKind.NO_THIS_AVAILABLE,
+ arguments: '(null,42)')),
],
'This properties': const [
// This properties
@@ -1140,6 +1150,15 @@ const Map<String, List<Test>> SEND_TESTS = const {
const Test.clazz(
'''
class C {
+ var foo;
+ static m() => this.foo;
+ }
+ ''',
+ const Visit(VisitKind.ERROR_INVALID_GET,
+ error: MessageKind.NO_THIS_AVAILABLE)),
+ const Test.clazz(
+ '''
+ class C {
get foo => null;
m() => this.foo;
}
@@ -1206,6 +1225,16 @@ const Map<String, List<Test>> SEND_TESTS = const {
const Visit(VisitKind.VISIT_THIS_PROPERTY_INVOKE,
name: 'foo',
arguments: '(null,42)')),
+ const Test.clazz(
+ '''
+ class C {
+ var foo;
+ static m() { this.foo(null, 42); }
+ }
+ ''',
+ const Visit(VisitKind.ERROR_INVALID_INVOKE,
+ error: MessageKind.NO_THIS_AVAILABLE,
+ arguments: '(null,42)')),
],
'Super fields': const [
// Super fields
« no previous file with comments | « pkg/compiler/lib/src/resolution/send_resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698