dart-sdk/sdk/lib
James Lin 48ac398f11 Fix Directory.current setter compatibility with IOOverrides
The `Directory.current` setter has a `dynamic` parameter so that it
can accept either `String` or `Directory` arguments. (This is
asymmetric with the getter, which always returns a `Directory`.)

The corresponding `IOOverrides` callback, however, assumes that the
argument is always a `String`, and `Directory.current` passed its
`dynamic` argument through unchanged.  Consequently, overriding
the `Directory.current` setter would result in a `TypeError` when
setting `Directory.current` to a `Directory` object.

Changing `IOOverrides.setCurrentDirectory` to use a `dynamic`
parameter would be a breaking change, so instead make the
`Directory.current` setter check the argument's runtime type before
passing it along.

Bug: https://github.com/dart-lang/sdk/issues/52140
Change-Id: I3c5bba6b442b314c798bd7949dfeb5eb6251dc6e
CoreLibraryReviewExempt: No API changes and VM-only.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336604
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Auto-Submit: James Lin <jamesdlin@gmail.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2023-12-18 20:23:21 +00:00
..
_http [io] Use _addConnection instead _add in _HttpParser 2023-12-12 18:25:19 +00:00
_internal Revert "[ DDS ] Fix DDS AOT snapshot build rules" 2023-12-18 17:13:59 +00:00
_wasm Move Wasm{Object,Int,Float}Array -> WasmArray, use extensions on WasmArray for static dispatc0h 2023-12-12 17:05:49 +00:00
async [doc/async] Change StreamController.broadcast() doc according to the current behavior 2023-12-12 13:08:56 +00:00
cli [vm] Disable dart:cli waitFor by default 2023-09-14 10:08:29 +00:00
collection Unify splay tree iterators and interables constructor argument names. 2023-10-19 14:07:37 +00:00
convert Remove Utf8Decoder._convertIntercepted hook 2023-11-23 12:25:26 +00:00
core [dart2wasm] Start using WebAssembly.String imports 2023-12-08 10:04:41 +00:00
developer [vm/compiler] Tag non-ffi force-optimized functions idempotent. 2023-08-18 18:27:58 +00:00
ffi Reland "[vm/ffi] Express FFI call closures explicitly in AST" 2023-12-15 15:25:29 +00:00
html [doc/io] Add a strong caution against using HttpClient and HttpRequest directly. 2023-12-12 00:45:45 +00:00
indexed_db web_audio is not part sky_engine 2023-09-14 10:33:17 +00:00
internal Hide the existence of EfficientLengthIterable better. 2023-09-12 11:08:42 +00:00
io Fix Directory.current setter compatibility with IOOverrides 2023-12-18 20:23:21 +00:00
isolate Refer to unnamed constructors in doc comments with '.new' 2023-10-17 14:42:38 +00:00
js Reland "[pkg:js/dart:js_interop] Move annotations to dart:_js_annotations" 2023-05-02 15:24:18 +00:00
js_interop [dart:js_interop] Add generics to JSArray and JSPromise 2023-12-12 04:50:13 +00:00
js_interop_unsafe [dart2wasm] Fix various null toExternRef calls for JS interop 2023-11-09 21:58:33 +00:00
js_util [js_util] Make callMethod take an Object method. 2023-03-23 00:23:00 +00:00
math Adding class modifiers to dart:math. 2023-03-13 14:01:26 +00:00
mirrors [vm] Add minimal support for mirrors of extension type members 2023-12-07 21:48:50 +00:00
svg web_audio is not part sky_engine 2023-09-14 10:33:17 +00:00
typed_data Revert "[typed_data] Deprecate unmodifiable views" 2023-10-27 15:22:54 +00:00
vmservice [vm] Pass offset and script uri for expression compilation 2023-10-12 10:22:38 +00:00
web_audio web_audio is not part sky_engine 2023-09-14 10:33:17 +00:00
web_gl web_audio is not part sky_engine 2023-09-14 10:33:17 +00:00
web_sql web_audio is not part sky_engine 2023-09-14 10:33:17 +00:00
analysis_options.yaml [vm/ffi] Support varargs 2023-01-20 10:30:41 +00:00
libraries.json [dart2wasm] Start using WebAssembly.String imports 2023-12-08 10:04:41 +00:00
libraries.yaml [dart2wasm] Start using WebAssembly.String imports 2023-12-08 10:04:41 +00:00
PRESUBMIT.py [build] Python 3.12 compatibility. 2023-12-12 18:19:35 +00:00
vmservice_libraries.json [Core Libraries] Eliminate the fork in the core libraries. 2020-06-16 23:37:36 +00:00
vmservice_libraries.yaml update the tooling to generate libraries.json from libraries.yaml 2021-07-27 23:02:50 +00:00