Version 0.3.7.5
Merge revisions 18661, 18662, 18666 to trunk

git-svn-id: http://dart.googlecode.com/svn/trunk@18669 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
index f53bfef..ce9984d 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
@@ -1004,6 +1004,10 @@
           setter.modifiers.flags | Modifiers.FLAG_ABSTRACT);
     }
   }
+
+  bool isInstanceMember() {
+    return isMember() && !modifiers.isStatic();
+  }
 }
 
 // TODO(johnniwinther): [FunctionSignature] should be merged with
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
index c13a959..c00f783 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -1940,7 +1940,7 @@
         return null;
       }
       target = receiverClass.lookupLocalMember(name);
-      if (target == null) {
+      if (target == null || target.isInstanceMember()) {
         // TODO(johnniwinther): With the simplified [TreeElements] invariant,
         // try to resolve injected elements if [currentClass] is in the patch
         // library of [receiverClass].
@@ -1948,14 +1948,12 @@
         // TODO(karlklose): this should be reported by the caller of
         // [resolveSend] to select better warning messages for getters and
         // setters.
-        return warnAndCreateErroneousElement(node, name,
-                                             MessageKind.METHOD_NOT_FOUND,
+        MessageKind kind = (target == null)
+            ? MessageKind.METHOD_NOT_FOUND
+            : MessageKind.MEMBER_NOT_STATIC;
+        return warnAndCreateErroneousElement(node, name, kind,
                                              {'className': receiverClass.name,
-                                              'methodName': name});
-      } else if (target.isInstanceMember()) {
-        error(node, MessageKind.MEMBER_NOT_STATIC,
-              {'className': receiverClass.name,
-               'memberName': name});
+                                              'memberName': name});
       }
     } else if (identical(resolvedReceiver.kind, ElementKind.PREFIX)) {
       PrefixElement prefix = resolvedReceiver;
diff --git a/sdk/lib/_internal/compiler/implementation/typechecker.dart b/sdk/lib/_internal/compiler/implementation/typechecker.dart
index 01fa607..76f0c1b 100644
--- a/sdk/lib/_internal/compiler/implementation/typechecker.dart
+++ b/sdk/lib/_internal/compiler/implementation/typechecker.dart
@@ -254,7 +254,7 @@
       return computeType(member);
     }
     reportTypeWarning(node, MessageKind.METHOD_NOT_FOUND,
-                      {'className': classElement.name, 'methodName': name});
+                      {'className': classElement.name, 'memberName': name});
     return types.dynamicType;
   }
 
diff --git a/sdk/lib/_internal/compiler/implementation/warnings.dart b/sdk/lib/_internal/compiler/implementation/warnings.dart
index 56f3698..82fdd8d 100644
--- a/sdk/lib/_internal/compiler/implementation/warnings.dart
+++ b/sdk/lib/_internal/compiler/implementation/warnings.dart
@@ -27,7 +27,7 @@
   static const NAMED_ARGUMENT_NOT_FOUND = const MessageKind(
       "no named argument '#{argumentName}' found on method");
   static const METHOD_NOT_FOUND = const MessageKind(
-      'no method named #{methodName} in class #{className}');
+      'no method named #{memberName} in class #{className}');
   static const MEMBER_NOT_STATIC = const MessageKind(
       '#{className}.#{memberName} is not static');
   static const NO_INSTANCE_AVAILABLE = const MessageKind(
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index 70c6c53..4a8d266a 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -1359,6 +1359,11 @@
             }
           }
         }
+        if (!persistentConnection) {
+          throw new RedirectException(
+              "Non-persistent connections are currently not supported for "
+              "redirects", _connection._redirects);
+        }
         // Drain body and redirect.
         inputStream.onData = inputStream.read;
         if (_statusCode == HttpStatus.SEE_OTHER &&
diff --git a/tests/co19/co19-dart2dart.status b/tests/co19/co19-dart2dart.status
index fc61890..1f87d90 100644
--- a/tests/co19/co19-dart2dart.status
+++ b/tests/co19/co19-dart2dart.status
@@ -68,7 +68,6 @@
 Language/05_Variables/05_Variables_A05_t09: Fail # Inherited from dart2js
 Language/05_Variables/05_Variables_A05_t10: Fail # Inherited from dart2js
 Language/05_Variables/05_Variables_A05_t11: Fail # Inherited from VM (assignment to final variable does not throw NSME).
-Language/05_Variables/05_Variables_A05_t12: Fail # Inherited from dart2js
 Language/05_Variables/05_Variables_A05_t13: Fail # Inherited from VM (assignment to final variable does not throw NSME).
 Language/05_Variables/05_Variables_A05_t14: Fail # Inherited from VM (assignment to final variable does not throw NSME).
 Language/05_Variables/05_Variables_A05_t15: Fail # Inherited from VM (assignment to final variable does not throw NSME).
@@ -246,9 +245,6 @@
 Language/11_Expressions/11_Instance_Creation/2_Const_A06_t02: Fail # http://dartbug.com/5519
 Language/11_Expressions/11_Instance_Creation/2_Const_A10_t01: Fail # inherited from VM
 Language/11_Expressions/14_Function_Invocation/4_Function_Expression_Invocation_A05_t01: Fail # inherited from VM
-Language/11_Expressions/15_Method_Invocation/3_Static_Invocation_A03_t03: Fail # inherited from VM
-Language/11_Expressions/15_Method_Invocation/3_Static_Invocation_A03_t04: Fail # http://dartbug.com/5519
-Language/11_Expressions/15_Method_Invocation/3_Static_Invocation_A03_t06: Fail # inherited from VM
 Language/11_Expressions/17_Getter_Invocation_A02_t01: Fail # inherited from VM
 Language/11_Expressions/18_Assignment_A05_t02: Fail # inherited from VM
 Language/11_Expressions/18_Assignment_A05_t04: Fail, Pass, OK # Fails in minified, depends on method names.
diff --git a/tests/co19/co19-dart2js.status b/tests/co19/co19-dart2js.status
index 8da7c21..1ba4426 100644
--- a/tests/co19/co19-dart2js.status
+++ b/tests/co19/co19-dart2js.status
@@ -16,7 +16,6 @@
 Language/05_Variables/05_Variables_A05_t09: Fail # TODO(ahe): Please triage this failure.
 Language/05_Variables/05_Variables_A05_t10: Fail # TODO(ahe): Please triage this failure.
 Language/05_Variables/05_Variables_A05_t11: Fail # TODO(ahe): Please triage this failure.
-Language/05_Variables/05_Variables_A05_t12: Fail # TODO(ahe): Please triage this failure.
 Language/05_Variables/05_Variables_A05_t13: Fail # TODO(ahe): Please triage this failure.
 Language/05_Variables/05_Variables_A05_t14: Fail # TODO(ahe): Please triage this failure.
 Language/05_Variables/05_Variables_A05_t15: Fail # TODO(ahe): Please triage this failure.
@@ -217,7 +216,6 @@
 Language/11_Expressions/11_Instance_Creation/2_Const_A09_t03: Fail # TODO(ahe): Please triage this failure.
 Language/11_Expressions/11_Instance_Creation_A05_t01: Fail # TODO(ahe): Please triage this failure.
 Language/11_Expressions/11_Instance_Creation_A05_t02: Fail # TODO(ahe): Please triage this failure.
-Language/11_Expressions/15_Method_Invocation/3_Static_Invocation_A03_t04: Fail # TODO(ahe): Please triage this failure.
 Language/11_Expressions/19_Conditional_A04_t03: Fail # TODO(ahe): Please triage this failure.
 Language/11_Expressions/20_Logical_Boolean_Expressions_A03_t01: Fail # TODO(ahe): Please triage this failure.
 Language/11_Expressions/27_Unary_Expressions_A02_t03: Fail # TODO(ahe): Please triage this failure.
@@ -721,7 +719,6 @@
 Language/11_Expressions/05_Strings_A02_t46: Fail # Checks that multi-line strings that contain characters and sequences prohibited by this grammar, cause compile-time errors.
 Language/11_Expressions/05_Strings_A02_t48: Fail # Checks that multi-line strings that contain characters and sequences prohibited by this grammar, cause compile-time errors.
 Language/11_Expressions/06_Lists_A04_t01: Fail # Checks that it is a compile-time error if the type argument of a constant list literal includes a type variable.
-Language/11_Expressions/15_Method_Invocation/3_Static_Invocation_A03_t04: Fail # Checks that it is a static warning if interface C does not declare a static method or getter m.
 Language/11_Expressions/22_Equality_A01_t15: Fail # Checks that equality expressions cannot be operands of another equality expression.
 Language/11_Expressions/22_Equality_A01_t16: Fail # Checks that equality expressions cannot be operands of another equality expression.
 Language/11_Expressions/23_Relational_Expressions_A01_t10: Fail # Checks that a relational expression cannot be the operand of another relational expression.
@@ -736,9 +733,6 @@
 # Unexpected compile-time errors.
 #
 [ $compiler == dart2js ]
-Language/11_Expressions/15_Method_Invocation/3_Static_Invocation_A03_t03: Fail # http://dartbug.com/5027
-Language/11_Expressions/15_Method_Invocation/3_Static_Invocation_A03_t06: Fail # http://dartbug.com/5027
-
 Language/14_Types/2_Dynamic_Type_System_A02_t01: Fail # http://dartbug.com/5029
 
 Language/07_Classes/3_Setters_A04_t01: Fail # http://dartbug.com/5023
diff --git a/tests/language/language.status b/tests/language/language.status
index c64f4c5..8d65af7 100644
--- a/tests/language/language.status
+++ b/tests/language/language.status
@@ -416,10 +416,6 @@
 named_parameters_aggregated_test/01: Fail # http://dartbug.com/5519
 named_parameters_aggregated_test/03: Fail # http://dartbug.com/5519
 not_enough_positional_arguments_test/01: Fail # http://dartbug.com/5519
-static_field3_test/01: Fail # http://dartbug.com/5519
-static_field3_test/02: Fail # http://dartbug.com/5519
-static_field3_test/03: Fail # http://dartbug.com/5519
-static_field3_test/04: Fail # http://dartbug.com/5519
 
 throw_expr_test: Fail
 metadata_test: Fail
diff --git a/tests/language/language_dart2js.status b/tests/language/language_dart2js.status
index 14bbc37..de512aa 100644
--- a/tests/language/language_dart2js.status
+++ b/tests/language/language_dart2js.status
@@ -195,7 +195,6 @@
 named_parameters_aggregated_test/03: Fail # Presence of default values for optional params is not properly validated in closure types.
 named_parameters_aggregated_test/05: Fail # Absence of positional parameters before named parameters does not trigger static type warning.
 pseudo_kw_test: Fail # Unexpected token '('
-static_field3_test/0*: Fail
 super_implicit_closure_test: Fail # internal error: super property read not implemented
 super_operator_test: Fail # internal error: super property store not implemented
 switch_label_test: Fail # error: target of continue is not a loop or switch case
diff --git a/tests/language/mixin_getter_regression_test.dart b/tests/language/mixin_getter_regression_test.dart
new file mode 100644
index 0000000..52603c6
--- /dev/null
+++ b/tests/language/mixin_getter_regression_test.dart
@@ -0,0 +1,28 @@
+// 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 case for dart2js bug where the getter for y wasn't
+// properly mixed in.
+
+class C {
+  int x;
+  int get y => x;
+}
+
+class E {
+  int z = 10;
+}
+
+class D extends E with C {
+  int w = 42;
+}
+
+main() {
+  var d = new D();
+  d.x = 37;
+  Expect.equals(37, d.x);
+  Expect.equals(10, d.z);
+  Expect.equals(42, d.w);
+  Expect.equals(37, d.y);
+}
diff --git a/tests/standalone/io/http_redirect_test.dart b/tests/standalone/io/http_redirect_test.dart
index 0b2f133..4df9782 100644
--- a/tests/standalone/io/http_redirect_test.dart
+++ b/tests/standalone/io/http_redirect_test.dart
@@ -128,6 +128,18 @@
      }
   );
 
+  // Setup redirect where we close the connection.
+  server.addRequestHandler(
+     (HttpRequest request) => request.path == "/closing",
+     (HttpRequest request, HttpResponse response) {
+       response.headers.set(HttpHeaders.LOCATION,
+                            "http://127.0.0.1:${server.port}/");
+       response.statusCode = HttpStatus.FOUND;
+       response.persistentConnection = false;
+       response.outputStream.close();
+     }
+  );
+
   return server;
 }
 
@@ -352,6 +364,27 @@
   };
 }
 
+void testRedirectClosingConnection() {
+  HttpServer server = setupServer();
+  HttpClient client = new HttpClient();
+
+  int redirectCount = 0;
+  HttpClientConnection conn =
+      client.getUrl(Uri.parse("http://127.0.0.1:${server.port}/closing"));
+
+  conn.followRedirects = true;
+  conn.onResponse = (HttpClientResponse response) {
+    response.inputStream.onData = () => Expect.fail("Response not expected");
+    response.inputStream.onClosed = () => Expect.fail("Response not expected");
+  };
+  conn.onError = (e) {
+    Expect.isTrue(e is RedirectException);
+    Expect.isNull(e.redirects);
+    server.close();
+    client.shutdown();
+  };
+}
+
 main() {
   testManualRedirect();
   testManualRedirectWithHeaders();
@@ -361,4 +394,5 @@
   testAutoRedirect303POST();
   testAutoRedirectLimit();
   testRedirectLoop();
+  testRedirectClosingConnection();
 }
diff --git a/tools/VERSION b/tools/VERSION
index c411d7b..54f29d1 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -1,4 +1,4 @@
 MAJOR 0
 MINOR 3
 BUILD 7
-PATCH 4
+PATCH 5