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

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

Issue 2009853003: accept null type casts in dummy noSuchMethod checks (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/js_backend/no_such_method_registry.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/no_such_method_enabled_test.dart
diff --git a/tests/compiler/dart2js/no_such_method_enabled_test.dart b/tests/compiler/dart2js/no_such_method_enabled_test.dart
index ac8e4801caec362d6a890df403fb073226de2ad1..c9e651ad84c31512ffedfad2369052e552b94bf9 100644
--- a/tests/compiler/dart2js/no_such_method_enabled_test.dart
+++ b/tests/compiler/dart2js/no_such_method_enabled_test.dart
@@ -271,6 +271,25 @@ main() {
clsA.lookupMember('noSuchMethod')));
}
+Future dummyImplTest13() async {
+ String source = """
+class A {
+ noSuchMethod(x) => super.noSuchMethod(x) as dynamic;
+}
+main() {
+ print(new A().foo());
+}
+""";
+ Uri uri = new Uri(scheme: 'source');
+ var compiler = compilerFor(source, uri);
+ await compiler.run(uri);
+ Expect.isFalse(compiler.backend.enabledNoSuchMethod);
+ ClassElement clsA = findElement(compiler, 'A');
+ Expect.isTrue(
+ compiler.backend.noSuchMethodRegistry.defaultImpls.contains(
+ clsA.lookupMember('noSuchMethod')));
+}
+
main() {
asyncTest(() async {
await dummyImplTest();
@@ -285,5 +304,6 @@ main() {
await dummyImplTest10();
await dummyImplTest11();
await dummyImplTest12();
+ await dummyImplTest13();
});
}
« no previous file with comments | « pkg/compiler/lib/src/js_backend/no_such_method_registry.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698