diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json index 3136266784d..515b7345b6b 100644 --- a/.dart_tool/package_config.json +++ b/.dart_tool/package_config.json @@ -11,7 +11,7 @@ "constraint, update this by running tools/generate_package_config.dart." ], "configVersion": 2, - "generated": "2020-08-13T10:20:32.864803", + "generated": "2020-08-17T14:05:33.104579", "generator": "tools/generate_package_config.dart", "packages": [ { @@ -202,7 +202,7 @@ "name": "dart_internal", "rootUri": "../pkg/dart_internal", "packageUri": "lib/", - "languageVersion": "2.0" + "languageVersion": "2.10" }, { "name": "dart_style", diff --git a/pkg/dart_internal/lib/extract_type_arguments.dart b/pkg/dart_internal/lib/extract_type_arguments.dart index 218d0751a1e..4275e70e680 100644 --- a/pkg/dart_internal/lib/extract_type_arguments.dart +++ b/pkg/dart_internal/lib/extract_type_arguments.dart @@ -22,8 +22,8 @@ import 'dart:_internal' as internal; /// print(extractIterableTypeArgument(iterable, () => new Set()); /// // Prints "Instance of 'Set'". /// ``` -Object extractIterableTypeArgument( - Iterable iterable, Object Function() extract) => +Object? extractIterableTypeArgument( + Iterable iterable, Object? Function() extract) => internal.extractTypeArguments(iterable, extract); /// Given a [Map], invokes [extract], passing the [map]'s key and value type @@ -40,5 +40,5 @@ Object extractIterableTypeArgument( /// // Prints "Instance of 'Two'". /// } /// ``` -Object extractMapTypeArguments(Map map, Object Function() extract) => +Object? extractMapTypeArguments(Map map, Object? Function() extract) => internal.extractTypeArguments(map, extract); diff --git a/pkg/dart_internal/pubspec.yaml b/pkg/dart_internal/pubspec.yaml index d4992997001..757bdf30a3f 100644 --- a/pkg/dart_internal/pubspec.yaml +++ b/pkg/dart_internal/pubspec.yaml @@ -1,5 +1,7 @@ name: dart_internal -version: 0.1.10 +version: 0.1.11-nullsafety +author: "Dart Team " +homepage: http://www.dartlang.org repository: https://github.com/dart-lang/sdk/tree/master/pkg/dart_internal description: > This package is not intended for wide use. It provides a temporary API to @@ -16,4 +18,4 @@ description: > environment: # Restrict the upper bound so that we can remove support for this in a later # version of the SDK without it being a breaking change. - sdk: ">=2.0.0 <2.10.0" + sdk: ">=2.10.0-0.0 <2.10.0" diff --git a/sdk/lib/_internal/js_runtime/lib/internal_patch.dart b/sdk/lib/_internal/js_runtime/lib/internal_patch.dart index e2922cade2e..2dc838de356 100644 --- a/sdk/lib/_internal/js_runtime/lib/internal_patch.dart +++ b/sdk/lib/_internal/js_runtime/lib/internal_patch.dart @@ -57,7 +57,7 @@ List makeFixedListUnmodifiable(List fixedLengthList) { @patch @pragma('dart2js:noInline') -Object extractTypeArguments(T instance, Function extract) { +Object? extractTypeArguments(T instance, Function extract) { // This function is recognized and replaced with calls to js_runtime. // This call to [extract] is required to model that the function is called and diff --git a/sdk/lib/_internal/vm/lib/internal_patch.dart b/sdk/lib/_internal/vm/lib/internal_patch.dart index b904f9eb3f1..fa16bc6780e 100644 --- a/sdk/lib/_internal/vm/lib/internal_patch.dart +++ b/sdk/lib/_internal/vm/lib/internal_patch.dart @@ -32,7 +32,7 @@ List makeFixedListUnmodifiable(List fixedLengthList) native "Internal_makeFixedListUnmodifiable"; @patch -Object extractTypeArguments(T instance, Function extract) +Object? extractTypeArguments(T instance, Function extract) native "Internal_extractTypeArguments"; /// The returned string is a [_OneByteString] with uninitialized content. diff --git a/tests/language/unsorted/extract_type_arguments_test.dart b/tests/language/unsorted/extract_type_arguments_test.dart index 52939c7cfda..233dac46baf 100644 --- a/tests/language/unsorted/extract_type_arguments_test.dart +++ b/tests/language/unsorted/extract_type_arguments_test.dart @@ -39,7 +39,7 @@ testExtractIterableTypeArgument() { Expect.isTrue(called); // Returns result of function. - Object result = extractIterableTypeArgument(object, () => new Set()); + Object? result = extractIterableTypeArgument(object, () => new Set()); Expect.isTrue(result is Set); Expect.isFalse(result is Set); @@ -63,7 +63,7 @@ testExtractMapTypeArguments() { Expect.isTrue(called); // Returns result of function. - Object result = extractMapTypeArguments(object, () => new Two()); + Object? result = extractMapTypeArguments(object, () => new Two()); Expect.isTrue(result is Two); Expect.isFalse(result is Two);