sdk
sdk copied to clipboard
The Dart SDK, including the VM, dart2js, core libraries, and more.
Hello! ## Problem When using code-generators, one challenge is: It's difficult to know what line was responsible for the generation of a piece of code. Code-generators can become quite complex....
This meta issue tracks all the analyzer implementation work items. Referenced from: https://github.com/dart-lang/sdk/blob/main/pkg/analyzer/doc/process/new_language_feature.md ## Work Items - [X] AST enhancements (`AstBuilder`) - [ ] Element model - [x] ~~Type system...
See **StreamController.addStream()** documentation: https://github.com/dart-lang/sdk/blob/4c3e9160f0ebbb0b49ef56d153cf3bd76d0837fd/sdk/lib/async/stream_controller.dart#L295-L297 May be it makes sense to add that in case of `MultiStreamController` it's also `addSync`, `addErrorSync` and `closeSync`? **StreamController.close()**: https://github.com/dart-lang/sdk/blob/4c3e9160f0ebbb0b49ef56d153cf3bd76d0837fd/sdk/lib/async/stream_controller.dart#L252-L253 What about done event? Calling `close()`...
The following test fails. Why? ```dart import "dart:async"; import "../../../Utils/expect.dart"; var theController; main() { asyncStart(); var stream = Stream.multi((controller) { theController = controller; Expect.isFalse(controller.isPaused); controller.add(1); controller.add(2); controller.add(3); }); listen(stream); }...
It looks that we drop `=` completely, and so switch to a very synthetic legacy function type alias, although inserting a synthetic name could be a better recovery. Obviously, I...
This code is (correctly) rejected by both the analyzer and the CFE: ```dart int test(T Function() createT) { var tValue = createT(); return tValue(''); // ERROR: 'String' not assignable to...
There are new test failures on [Allow (e as dynamic).foo() in avoid_dynamic_calls...[cfe] Include offended version number and package name in too high/low version message](https://github.com/dart-lang/sdk/compare/307e5a62ce0da739f4f80b404e35e44dabc06dc9~...4c3e9160f0ebbb0b49ef56d153cf3bd76d0837fd). The tests ``` vm/cc/BoundsCheckElimination_Pragma Crash (expected...
Repro below (I could not find a way to remove more code than this). ```dart import 'dart:typed_data'; void main() { var b = B(0); var list = [b]; b.value2; list.forEach((b)...
As of [this CL enabling DDS in the SDK](https://github.com/dart-lang/sdk/blob/main/runtime/vm/service.cc#L1218), a message of the following format is always printed when an isolate is paused: `vm-service: isolate (5995070039560719) 'main' has no debugger...
# Background Normally, reachability analysis understands that comparing two values with static type `Null` is guaranteed to succeed, e.g.: ```dart int test() { if (null == null) { return 0;...