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

Unified Diff: pkg/analyzer/test/src/task/strong/checker_test.dart

Issue 2223343002: fix #26896, mark all @proxy ops as dynamic (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix Created 4 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
Index: pkg/analyzer/test/src/task/strong/checker_test.dart
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index 43336713ecc174c0b6c2aec833c431854ca54ad0..0862fae682990c59cdc9de17c83b3fa4290b5737 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -3014,6 +3014,44 @@ class Child extends helper.Base {
''');
}
+ void test_proxy() {
+ checkFile(r'''
+@proxy class C {}
+@proxy class D {
+ var f;
+ m() => null;
+ operator -() => null;
+ operator +(int other) => null;
+ operator [](int index) => null;
+ call() => null;
+}
+@proxy class F implements Function { noSuchMethod(i) => 42; }
+
+
+m() {
+ D d = new D();
+ d.m();
+ d.m;
+ d.f;
+ -d;
+ d + 7;
+ d[7];
+ d();
+
+ C c = new C();
+ /*info:DYNAMIC_INVOKE*/c.m();
+ /*info:DYNAMIC_INVOKE*/c.m;
+ /*info:DYNAMIC_INVOKE*/-c;
+ /*info:DYNAMIC_INVOKE*/c + 7;
+ /*info:DYNAMIC_INVOKE*/c[7];
+ /*error:INVOCATION_OF_NON_FUNCTION,info:DYNAMIC_INVOKE*/c();
+
+ F f = new F();
+ /*info:DYNAMIC_INVOKE*/f();
+}
+ ''');
+ }
+
void test_redirectingConstructor() {
checkFile('''
class A {
« no previous file with comments | « pkg/analyzer/test/src/context/mock_sdk.dart ('k') | pkg/analyzer/test/src/task/strong/inferred_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698