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

Unified Diff: pkg/dev_compiler/tool/sdk_expected_errors.txt

Issue 2456803004: fixes #27586, prefer context type in generic inference (Closed)
Patch Set: wip Created 3 years, 11 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: pkg/dev_compiler/tool/sdk_expected_errors.txt
diff --git a/pkg/dev_compiler/tool/sdk_expected_errors.txt b/pkg/dev_compiler/tool/sdk_expected_errors.txt
index c3223fac471b41450e588ade9eb73fe55e0a5cb9..ce71c8763cce2e7aa8cd665a7a2bdd9b8baa6189 100644
--- a/pkg/dev_compiler/tool/sdk_expected_errors.txt
+++ b/pkg/dev_compiler/tool/sdk_expected_errors.txt
@@ -1,5 +1,13 @@
-[error] Couldn't infer type parameter 'T'; '_ControllerEventSinkWrapper<dynamic>' must be of type 'EventSink<T>'. (dart:async/stream.dart, line 1346, col 16)
-[error] The argument type '_ControllerEventSinkWrapper' can't be assigned to the parameter type 'EventSink<T>'. (dart:async/stream.dart, line 1346, col 53)
+[error] Couldn't infer type parameter 'T'.
+
+Tried '_ControllerEventSinkWrapper<dynamic>' but this did not work with all constraints:
+ Argument 'f' inferred as '(EventSink<T>) → dynamic' must be a '(T) → R'.
+ Argument 'arg' inferred as '_ControllerEventSinkWrapper<dynamic>' must be a 'T'.
+
+Consider passing explicit type argument(s) to the generic.
+
+ (dart:async/stream.dart, line 1346, col 16)
+[error] The argument type 'ZoneUnaryCallback(EventSink<T>) → dynamic' can't be assigned to the parameter type '(_ControllerEventSinkWrapper<dynamic>) → dynamic'. (dart:async/stream.dart, line 1346, col 32)
[error] Invalid override. The type of 'ChunkedConverter.bind' ('(dynamic) → dynamic') isn't a subtype of 'Converter<S, T>.bind' ('(Stream<S>) → Stream<T>'). (dart:convert/chunked_conversion.dart, line 14, col 3)
[error] Invalid override. The type of 'ChunkedConverter.bind' ('(dynamic) → dynamic') isn't a subtype of 'StreamTransformer<S, T>.bind' ('(Stream<S>) → Stream<T>'). (dart:convert/chunked_conversion.dart, line 14, col 3)
[error] Invalid override. The type of 'ChunkedConverter.startChunkedConversion' ('(dynamic) → dynamic') isn't a subtype of 'Converter<S, T>.startChunkedConversion' ('(Sink<T>) → Sink<S>'). (dart:convert/chunked_conversion.dart, line 15, col 3)
@@ -9,13 +17,31 @@
[error] Const constructors can't throw exceptions. (dart:core/int.dart, line 34, col 5)
[error] Only redirecting factory constructors can be declared to be 'const'. (dart:core/string.dart, line 156, col 9)
[error] Const constructors can't throw exceptions. (dart:core/string.dart, line 157, col 5)
-[error] Couldn't infer type parameter 'S'; 'RandomAccessFile' must be of type 'File'. (dart:io/file_impl.dart, line 216, col 19)
[error] The argument type '([dynamic]) → void' can't be assigned to the parameter type '(_ConnectionInfo) → dynamic'. (dart:io/http_impl.dart, line 1633, col 19)
[error] The return type 'StreamSubscription<int>' isn't a 'StreamSubscription<List<int>>', as defined by the method 'listen'. (dart:io/http_parser.dart, line 208, col 14)
[error] The argument type '(List<int>) → void' can't be assigned to the parameter type '(int) → void'. (dart:io/http_parser.dart, line 209, col 19)
-[error] Couldn't infer type parameter 'V'; 'Object' must be of type 'String'. (dart:io/io_resource_info.dart, line 27, col 7)
+[error] Couldn't infer type parameter 'V'.
+
+Inferred 'String' based on the return type, but it does not satisfy all constraints:
+ Return type declared as 'Map<K, V>' must be a 'Map<String, String>'.
+ Map value inferred as 'String' must be a 'V'.
+ Map value inferred as 'int' must be a 'V'.
+
+Consider passing explicit type argument(s) to the generic.
+
+ (dart:io/io_resource_info.dart, line 27, col 7)
[error] The element type 'int' can't be assigned to the map value type 'String'. (dart:io/io_resource_info.dart, line 30, col 15)
-[error] Couldn't infer type parameter 'V'; 'Object' must be of type 'String'. (dart:io/io_resource_info.dart, line 75, col 5)
+[error] Couldn't infer type parameter 'V'.
+
+Inferred 'String' based on the return type, but it does not satisfy all constraints:
+ Return type declared as 'Map<K, V>' must be a 'Map<String, String>'.
+ Map value inferred as 'String' must be a 'V'.
+ Map value inferred as 'int' must be a 'V'.
+ Map value inferred as 'double' must be a 'V'.
+
+Consider passing explicit type argument(s) to the generic.
+
+ (dart:io/io_resource_info.dart, line 75, col 5)
[error] The element type 'int' can't be assigned to the map value type 'String'. (dart:io/io_resource_info.dart, line 77, col 13)
[error] The element type 'int' can't be assigned to the map value type 'String'. (dart:io/io_resource_info.dart, line 79, col 20)
[error] The element type 'int' can't be assigned to the map value type 'String'. (dart:io/io_resource_info.dart, line 80, col 23)
@@ -23,7 +49,18 @@
[error] The element type 'int' can't be assigned to the map value type 'String'. (dart:io/io_resource_info.dart, line 82, col 21)
[error] The element type 'double' can't be assigned to the map value type 'String'. (dart:io/io_resource_info.dart, line 83, col 19)
[error] The element type 'double' can't be assigned to the map value type 'String'. (dart:io/io_resource_info.dart, line 84, col 20)
-[error] Couldn't infer type parameter 'V'; 'Object' must be of type 'String'. (dart:io/io_resource_info.dart, line 159, col 5)
+[error] Couldn't infer type parameter 'V'.
+
+Inferred 'String' based on the return type, but it does not satisfy all constraints:
+ Return type declared as 'Map<K, V>' must be a 'Map<String, String>'.
+ Map value inferred as 'String' must be a 'V'.
+ Map value inferred as 'int' must be a 'V'.
+ Map value inferred as 'dynamic' must be a 'V'.
+ Map value inferred as 'double' must be a 'V'.
+
+Consider passing explicit type argument(s) to the generic.
+
+ (dart:io/io_resource_info.dart, line 159, col 5)
[error] The element type 'int' can't be assigned to the map value type 'String'. (dart:io/io_resource_info.dart, line 161, col 13)
[error] The element type 'double' can't be assigned to the map value type 'String'. (dart:io/io_resource_info.dart, line 164, col 20)
[error] The argument type '([dynamic]) → void' can't be assigned to the parameter type '(RawSocket) → dynamic'. (dart:io/secure_socket.dart, line 591, col 28)
@@ -31,7 +68,15 @@
[error] Undefined name 'lineMode'. (dart:io/stdio.dart, line 64, col 10)
[error] The name 'echoMode=' is already defined. (dart:io/stdio.dart, line 126, col 12)
[error] The name 'lineMode=' is already defined. (dart:io/stdio.dart, line 145, col 12)
-[error] Couldn't infer type parameter 'S'; 'dynamic' must be of type 'WebSocket'. (dart:io/websocket_impl.dart, line 469, col 10)
+[error] Couldn't infer type parameter 'S'.
+
+Inferred 'WebSocket' based on the return type, but it does not satisfy all constraints:
+ Return type declared as 'Future<S>' must be a 'Future<WebSocket>'.
+ Argument 'onValue' inferred as '(String) → Future<dynamic>' must be a '(dynamic) → Future<S>'.
+
+Consider passing explicit type argument(s) to the generic.
+
+ (dart:io/websocket_impl.dart, line 469, col 10)
[error] Invalid override. The type of 'JsArray.[]=' ('(Object, E) → void') isn't a subtype of 'JsObject.[]=' ('(Object, dynamic) → dynamic'). (dart:js, line 363, col 3)
[warning] Unsafe implicit cast from 'List<dynamic>' to 'List<String>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:_js_helper/regexp_helper.dart, line 140, col 43)
[warning] Unsafe implicit cast from 'List<dynamic>' to 'List<String>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:_js_helper/regexp_helper.dart, line 152, col 43)

Powered by Google App Engine
This is Rietveld 408576698