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

Unified Diff: test/dart_codegen/expect/core/uri.dart

Issue 959003003: Typecheck constructor initializers properly (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 10 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
Index: test/dart_codegen/expect/core/uri.dart
diff --git a/test/dart_codegen/expect/core/uri.dart b/test/dart_codegen/expect/core/uri.dart
index 433a556c5a5d2f91d6ef3880ea4eede7610676f3..3b4fafd0f7b9c06fea2437b3cf97eeffb8bbd85b 100644
--- a/test/dart_codegen/expect/core/uri.dart
+++ b/test/dart_codegen/expect/core/uri.dart
@@ -282,7 +282,7 @@ part of dart.core;
bool windows}
) {
windows = windows == null ? Uri._isWindows : windows;
- return ((__x10) => DDC$RT.cast(__x10, dynamic, Uri, "CastGeneral", """line 698, column 12 of dart:core/uri.dart: """, __x10 is Uri, true))(windows ? _makeWindowsFileUrl(path) : _makeFileUri(path));
+ return ((__x14) => DDC$RT.cast(__x14, dynamic, Uri, "CastGeneral", """line 698, column 12 of dart:core/uri.dart: """, __x14 is Uri, true))(windows ? _makeWindowsFileUrl(path) : _makeFileUri(path));
}
external static Uri get base;
external static bool get _isWindows;
@@ -400,7 +400,7 @@ bool schemeChanged = false;
port = _makePort(port, scheme);
}
else {
- port = ((__x11) => DDC$RT.cast(__x11, num, int, "CastGeneral", """line 889, column 14 of dart:core/uri.dart: """, __x11 is int, true))(this._port);
+ port = ((__x15) => DDC$RT.cast(__x15, num, int, "CastGeneral", """line 889, column 14 of dart:core/uri.dart: """, __x15 is int, true))(this._port);
if (schemeChanged) {
port = _makePort(port, scheme);
}
@@ -441,26 +441,26 @@ bool schemeChanged = false;
List<String> get pathSegments {
if (_pathSegments == null) {
var pathToSplit = !path.isEmpty && path.codeUnitAt(0) == _SLASH ? path.substring(1) : path;
- _pathSegments = ((__x12) => DDC$RT.cast(__x12, DDC$RT.type((DDC$collection$.UnmodifiableListView<dynamic> _) {
+ _pathSegments = ((__x16) => DDC$RT.cast(__x16, DDC$RT.type((DDC$collection$.UnmodifiableListView<dynamic> _) {
}
), DDC$RT.type((List<String> _) {
}
- ), "CastExact", """line 945, column 23 of dart:core/uri.dart: """, __x12 is List<String>, false))(new UnmodifiableListView(pathToSplit == "" ? const <String> [] : pathToSplit.split("/").map(Uri.decodeComponent).toList(growable: false)));
+ ), "CastExact", """line 945, column 23 of dart:core/uri.dart: """, __x16 is List<String>, false))(new UnmodifiableListView(pathToSplit == "" ? const <String> [] : pathToSplit.split("/").map(Uri.decodeComponent).toList(growable: false)));
}
return _pathSegments;
}
Map<String, String> get queryParameters {
if (_queryParameters == null) {
- _queryParameters = ((__x13) => DDC$RT.cast(__x13, DDC$RT.type((DDC$collection$.UnmodifiableMapView<dynamic, dynamic> _) {
+ _queryParameters = ((__x17) => DDC$RT.cast(__x17, DDC$RT.type((DDC$collection$.UnmodifiableMapView<dynamic, dynamic> _) {
}
), DDC$RT.type((Map<String, String> _) {
}
- ), "CastExact", """line 969, column 26 of dart:core/uri.dart: """, __x13 is Map<String, String>, false))(new UnmodifiableMapView(splitQueryString(query)));
+ ), "CastExact", """line 969, column 26 of dart:core/uri.dart: """, __x17 is Map<String, String>, false))(new UnmodifiableMapView(splitQueryString(query)));
}
return _queryParameters;
}
static int _makePort(int port, String scheme) {
-if (port != null && port == _defaultPort(scheme)) return ((__x14) => DDC$RT.cast(__x14, Null, int, "CastLiteral", """line 976, column 62 of dart:core/uri.dart: """, __x14 is int, true))(null);
+if (port != null && port == _defaultPort(scheme)) return ((__x18) => DDC$RT.cast(__x18, Null, int, "CastLiteral", """line 976, column 62 of dart:core/uri.dart: """, __x18 is int, true))(null);
return port;
}
static String _makeHost(String host, int start, int end, bool strictIPv6) {
@@ -681,8 +681,8 @@ assert (char <= 0x10ffff); const hexDigits = "0123456789ABCDEF";
if (char < 0x80) {
codeUnits = new List(3);
codeUnits[0] = _PERCENT;
- codeUnits[1] = hexDigits.codeUnitAt(((__x15) => DDC$RT.cast(__x15, dynamic, int, "CastGeneral", """line 1248, column 43 of dart:core/uri.dart: """, __x15 is int, true))(char >> 4));
- codeUnits[2] = hexDigits.codeUnitAt(((__x16) => DDC$RT.cast(__x16, dynamic, int, "CastGeneral", """line 1249, column 43 of dart:core/uri.dart: """, __x16 is int, true))(char & 0xf));
+ codeUnits[1] = hexDigits.codeUnitAt(((__x19) => DDC$RT.cast(__x19, dynamic, int, "CastGeneral", """line 1248, column 43 of dart:core/uri.dart: """, __x19 is int, true))(char >> 4));
+ codeUnits[2] = hexDigits.codeUnitAt(((__x20) => DDC$RT.cast(__x20, dynamic, int, "CastGeneral", """line 1249, column 43 of dart:core/uri.dart: """, __x20 is int, true))(char & 0xf));
}
else {
int flag = 0xc0;
@@ -698,7 +698,7 @@ assert (char <= 0x10ffff); const hexDigits = "0123456789ABCDEF";
codeUnits = new List(3 * encodedBytes);
int index = 0;
while (--encodedBytes >= 0) {
- int byte = ((__x17) => DDC$RT.cast(__x17, dynamic, int, "CastGeneral", """line 1265, column 20 of dart:core/uri.dart: """, __x17 is int, true))(((char >> (6 * encodedBytes)) & 0x3f) | flag);
+ int byte = ((__x21) => DDC$RT.cast(__x21, dynamic, int, "CastGeneral", """line 1265, column 20 of dart:core/uri.dart: """, __x21 is int, true))(((char >> (6 * encodedBytes)) & 0x3f) | flag);
codeUnits[index] = _PERCENT;
codeUnits[index + 1] = hexDigits.codeUnitAt(byte >> 4);
codeUnits[index + 2] = hexDigits.codeUnitAt(byte & 0xf);
@@ -802,11 +802,11 @@ if (path.length > 0 && path.codeUnitAt(0) == _DOT) return true;
}
String _removeDotSegments(String path) {
if (!_hasDotSegments(path)) return path;
- List<String> output = ((__x18) => DDC$RT.cast(__x18, DDC$RT.type((List<dynamic> _) {
+ List<String> output = ((__x22) => DDC$RT.cast(__x22, DDC$RT.type((List<dynamic> _) {
}
), DDC$RT.type((List<String> _) {
}
-), "CastLiteral", """line 1402, column 27 of dart:core/uri.dart: """, __x18 is List<String>, false))([]);
+), "CastLiteral", """line 1402, column 27 of dart:core/uri.dart: """, __x22 is List<String>, false))([]);
bool appendSlash = false;
for (String segment in path.split("/")) {
appendSlash = false;
@@ -839,7 +839,7 @@ String targetScheme;
if (reference.hasAuthority) {
targetUserInfo = reference.userInfo;
targetHost = reference.host;
- targetPort = ((__x19) => DDC$RT.cast(__x19, dynamic, int, "CastGeneral", """line 1456, column 22 of dart:core/uri.dart: """, __x19 is int, true))(reference.hasPort ? reference.port : null);
+ targetPort = ((__x23) => DDC$RT.cast(__x23, dynamic, int, "CastGeneral", """line 1456, column 22 of dart:core/uri.dart: """, __x23 is int, true))(reference.hasPort ? reference.port : null);
}
targetPath = _removeDotSegments(reference.path);
if (reference.hasQuery) {
@@ -851,7 +851,7 @@ String targetScheme;
if (reference.hasAuthority) {
targetUserInfo = reference.userInfo;
targetHost = reference.host;
- targetPort = _makePort(((__x20) => DDC$RT.cast(__x20, dynamic, int, "CastGeneral", """line 1467, column 32 of dart:core/uri.dart: """, __x20 is int, true))(reference.hasPort ? reference.port : null), targetScheme);
+ targetPort = _makePort(((__x24) => DDC$RT.cast(__x24, dynamic, int, "CastGeneral", """line 1467, column 32 of dart:core/uri.dart: """, __x24 is int, true))(reference.hasPort ? reference.port : null), targetScheme);
targetPath = _removeDotSegments(reference.path);
if (reference.hasQuery) targetQuery = reference.query;
}
@@ -876,10 +876,10 @@ String targetScheme;
}
targetUserInfo = this._userInfo;
targetHost = this._host;
- targetPort = ((__x21) => DDC$RT.cast(__x21, num, int, "CastGeneral", """line 1489, column 22 of dart:core/uri.dart: """, __x21 is int, true))(this._port);
+ targetPort = ((__x25) => DDC$RT.cast(__x25, num, int, "CastGeneral", """line 1489, column 22 of dart:core/uri.dart: """, __x25 is int, true))(this._port);
}
}
- String fragment = ((__x22) => DDC$RT.cast(__x22, dynamic, String, "CastGeneral", """line 1492, column 23 of dart:core/uri.dart: """, __x22 is String, true))(reference.hasFragment ? reference.fragment : null);
+ String fragment = ((__x26) => DDC$RT.cast(__x26, dynamic, String, "CastGeneral", """line 1492, column 23 of dart:core/uri.dart: """, __x26 is String, true))(reference.hasFragment ? reference.fragment : null);
return new Uri._internal(targetScheme, targetUserInfo, targetHost, targetPort, targetPath, targetQuery, fragment);
}
bool get hasAuthority => _host != null;
@@ -981,7 +981,7 @@ if (other is! Uri) return false;
}
int get hashCode {
int combine(part, current) {
- return ((__x23) => DDC$RT.cast(__x23, dynamic, int, "CastGeneral", """line 1714, column 14 of dart:core/uri.dart: """, __x23 is int, true))((current * 31 + part.hashCode) & 0x3FFFFFFF);
+ return ((__x27) => DDC$RT.cast(__x27, dynamic, int, "CastGeneral", """line 1714, column 14 of dart:core/uri.dart: """, __x27 is int, true))((current * 31 + part.hashCode) & 0x3FFFFFFF);
}
return combine(scheme, combine(userInfo, combine(host, combine(port, combine(path, combine(query, combine(fragment, 1)))))));
}
@@ -1022,12 +1022,12 @@ return _uriDecode(uri);
static Map<String, String> splitQueryString(String query, {
Encoding encoding : UTF8}
) {
-return ((__x24) => DDC$RT.cast(__x24, dynamic, DDC$RT.type((Map<String, String> _) {
+return ((__x28) => DDC$RT.cast(__x28, dynamic, DDC$RT.type((Map<String, String> _) {
}
-), "CastGeneral", """line 1864, column 12 of dart:core/uri.dart: """, __x24 is Map<String, String>, false))(query.split("&").fold({
+), "CastGeneral", """line 1864, column 12 of dart:core/uri.dart: """, __x28 is Map<String, String>, false))(query.split("&").fold({
}
, (map, element) {
- int index = ((__x25) => DDC$RT.cast(__x25, dynamic, int, "CastGeneral", """line 1865, column 19 of dart:core/uri.dart: """, __x25 is int, true))(element.indexOf("="));
+ int index = ((__x29) => DDC$RT.cast(__x29, dynamic, int, "CastGeneral", """line 1865, column 19 of dart:core/uri.dart: """, __x29 is int, true))(element.indexOf("="));
if (index == -1) {
if (element != "") {
map[decodeQueryComponent(DDC$RT.cast(element, dynamic, String, "CastGeneral", """line 1868, column 36 of dart:core/uri.dart: """, element is String, true), encoding: encoding)] = "";
@@ -1050,11 +1050,11 @@ void error(String msg) {
if (bytes.length != 4) {
error('IPv4 address should contain exactly 4 parts');
}
- return ((__x26) => DDC$RT.cast(__x26, DDC$RT.type((List<dynamic> _) {
+ return ((__x30) => DDC$RT.cast(__x30, DDC$RT.type((List<dynamic> _) {
}
), DDC$RT.type((List<int> _) {
}
-), "CastDynamic", """line 1896, column 12 of dart:core/uri.dart: """, __x26 is List<int>, false))(bytes.map((byteString) {
+), "CastDynamic", """line 1896, column 12 of dart:core/uri.dart: """, __x30 is List<int>, false))(bytes.map((byteString) {
int byte = int.parse(DDC$RT.cast(byteString, dynamic, String, "CastGeneral", """line 1898, column 32 of dart:core/uri.dart: """, byteString is String, true));
if (byte < 0 || byte > 255) {
error('each part must be in the range of `0..255`');
@@ -1079,11 +1079,11 @@ if (end == null) end = host.length;
return value;
}
if (host.length < 2) error('address is too short');
- List<int> parts = ((__x27) => DDC$RT.cast(__x27, DDC$RT.type((List<dynamic> _) {
+ List<int> parts = ((__x31) => DDC$RT.cast(__x31, DDC$RT.type((List<dynamic> _) {
}
), DDC$RT.type((List<int> _) {
}
-), "CastLiteral", """line 1946, column 23 of dart:core/uri.dart: """, __x27 is List<int>, false))([]);
+), "CastLiteral", """line 1946, column 23 of dart:core/uri.dart: """, __x31 is List<int>, false))([]);
bool wildcardSeen = false;
int partStart = start;
for (int i = start;
@@ -1196,8 +1196,8 @@ Encoding encoding : UTF8, bool spaceToPlus : false}
) {
byteToHex(byte, buffer) {
const String hex = '0123456789ABCDEF';
- buffer.writeCharCode(hex.codeUnitAt(((__x28) => DDC$RT.cast(__x28, dynamic, int, "CastGeneral", """line 2059, column 43 of dart:core/uri.dart: """, __x28 is int, true))(byte >> 4)));
- buffer.writeCharCode(hex.codeUnitAt(((__x29) => DDC$RT.cast(__x29, dynamic, int, "CastGeneral", """line 2060, column 43 of dart:core/uri.dart: """, __x29 is int, true))(byte & 0x0f)));
+ buffer.writeCharCode(hex.codeUnitAt(((__x32) => DDC$RT.cast(__x32, dynamic, int, "CastGeneral", """line 2059, column 43 of dart:core/uri.dart: """, __x32 is int, true))(byte >> 4)));
+ buffer.writeCharCode(hex.codeUnitAt(((__x33) => DDC$RT.cast(__x33, dynamic, int, "CastGeneral", """line 2060, column 43 of dart:core/uri.dart: """, __x33 is int, true))(byte & 0x0f)));
}
StringBuffer result = new StringBuffer();
var bytes = encoding.encode(text);
@@ -1259,11 +1259,11 @@ bool simple = true;
}
}
else {
- bytes = ((__x30) => DDC$RT.cast(__x30, DDC$RT.type((List<dynamic> _) {
+ bytes = ((__x34) => DDC$RT.cast(__x34, DDC$RT.type((List<dynamic> _) {
}
), DDC$RT.type((List<int> _) {
}
- ), "CastExact", """line 2134, column 15 of dart:core/uri.dart: """, __x30 is List<int>, false))(new List());
+ ), "CastExact", """line 2134, column 15 of dart:core/uri.dart: """, __x34 is List<int>, false))(new List());
for (int i = 0;
i < text.length;
i++) {

Powered by Google App Engine
This is Rietveld 408576698