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

Unified Diff: tests/compiler/dart2js_native/native_named_constructors3_frog_test.dart

Issue 11611009: Forbid arguments to functions with 'native' bodies. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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: tests/compiler/dart2js_native/native_named_constructors3_frog_test.dart
diff --git a/tests/compiler/dart2js_native/native_named_constructors3_frog_test.dart b/tests/compiler/dart2js_native/native_named_constructors3_frog_test.dart
index 0cf12fac9c31efd2dd2ab7e441f5fb252f8ea522..e13fd460d8b4a30e283fc438a5901aca1c552549 100644
--- a/tests/compiler/dart2js_native/native_named_constructors3_frog_test.dart
+++ b/tests/compiler/dart2js_native/native_named_constructors3_frog_test.dart
@@ -14,7 +14,8 @@ class A native "*A" {
factory A.fromString(String s) => makeA(s.length);
- factory A.nativeConstructor(int a, int b) native r'return makeA(a+b);';
+ // Only functions with zero parameters are allowed with "native r'...'".
+ factory A.nativeConstructor() native r'return makeA(102);';
foo() native 'return this._x;';
}
@@ -31,7 +32,7 @@ main() {
setup();
var a1 = new A(100);
var a2 = new A.fromString('Hello');
- var a3 = new A.nativeConstructor(100, 2);
+ var a3 = new A.nativeConstructor();
Expect.equals(100, a1.foo());
Expect.equals(5, a2.foo());

Powered by Google App Engine
This is Rietveld 408576698