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 |