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

Unified Diff: tests/compiler/dart2js_native/native_named_constructors2_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_constructors2_frog_test.dart
diff --git a/tests/compiler/dart2js_native/native_named_constructors2_frog_test.dart b/tests/compiler/dart2js_native/native_named_constructors2_frog_test.dart
index bd09643a2eb59f6308f6d6a0b3fd66916c3f44cf..fbdd8fb2e4f5d12afca6fdd22210a5c4d62188c7 100644
--- a/tests/compiler/dart2js_native/native_named_constructors2_frog_test.dart
+++ b/tests/compiler/dart2js_native/native_named_constructors2_frog_test.dart
@@ -11,7 +11,8 @@ class A native "*A" {
factory A.fromString(String s) => _construct(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);';
static A _construct(v) { return makeA(v); }
@@ -30,7 +31,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