dart-sdk/tests
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
..
co19 [co19] Roll co19 to ea5e476b3af94f74f6996e4b4319bf03f9248c1c 2023-12-11 09:55:05 +00:00
corelib Remove unnecessary print in corelib/uri_base_test.dart. 2023-11-29 17:37:28 +00:00
dartdevc [ddc] Update dynamic NSM errors to match 2023-12-14 00:51:50 +00:00
ffi [tests/ffi]: Fix failing pointer arithmetic test. 2023-12-18 18:38:05 +00:00
language [cfe] Report error on covariant in extension type methods 2023-12-15 09:13:07 +00:00
lib [dart:js_interop] Add generics to JSArray and JSPromise 2023-12-12 04:50:13 +00:00
modular [tests] Add repro for cross module constant 2023-11-13 22:21:40 +00:00
standalone Fix Directory.current setter compatibility with IOOverrides 2023-12-18 20:23:21 +00:00
web [dart2js] Fix implicitly used free type variable not being registered in closure scope. 2023-12-13 22:42:57 +00:00
legacy_status_dart2js.csv
OWNERS
README.md

This directory contains tests of the language and core library implementations. For more information, see https://github.com/dart-lang/sdk/wiki/Testing.