Version 0.4.2.3 .
svn merge -c 20132 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
git-svn-id: http://dart.googlecode.com/svn/trunk@20139 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index 4de74d2..b4e2ffa 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -794,6 +794,7 @@
bool isInterceptedMethod(Element element) {
return element.isInstanceMember()
+ && !element.isGenerativeConstructorBody()
&& interceptedElements[element.name] != null;
}
diff --git a/tests/compiler/dart2js_native/issue9182_test.dart b/tests/compiler/dart2js_native/issue9182_test.dart
new file mode 100644
index 0000000..8cbd17a
--- /dev/null
+++ b/tests/compiler/dart2js_native/issue9182_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for Issue 9182. The generative constructor body function
+// should not have the interceptor calling convention.
+
+class Foo native "*A" {
+ factory Foo() => makeA();
+ // Ensure the instance method 'Bar' uses interceptor convention.
+ Bar() => 123;
+}
+
+class Bar {
+ var _x, _y;
+ // Generative constructor with body, having the same name as interceptor
+ // convention instance member.
+ Bar(x, y) {
+ _x = x;
+ _y = y;
+ }
+}
+
+void setup() native r"""
+function A(){}
+makeA = function() { return new A; };
+""";
+
+makeA() native;
+
+main() {
+ setup();
+
+ var things = [new Foo(), new Bar(30, 40)];
+ var foo = things[0];
+ var bar = things[1];
+
+ Expect.equals(123, foo.Bar()); // Ensure that Foo.Bar is used.
+
+ Expect.equals(30, bar._x);
+ Expect.equals(40, bar._y);
+}
diff --git a/tools/VERSION b/tools/VERSION
index 2371226..9a34311 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -1,4 +1,4 @@
MAJOR 0
MINOR 4
BUILD 2
-PATCH 2
+PATCH 3