Skip to content

[analyzer] Soundness issue with generator element type #53054

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
eernstg opened this issue Jul 27, 2023 · 2 comments
Open

[analyzer] Soundness issue with generator element type #53054

eernstg opened this issue Jul 27, 2023 · 2 comments
Labels
area-dart-model For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer. dart-model-analyzer-spec Issues with the analyzer's implementation of the language spec P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@eernstg
Copy link
Member

eernstg commented Jul 27, 2023

This is the analyzer specific issue for #53052, which has the details.

@eernstg eernstg added legacy-area-analyzer Use area-devexp instead. dart-model-analyzer-spec Issues with the analyzer's implementation of the language spec labels Jul 27, 2023
@eernstg eernstg changed the title Soundness issue with generator element type [analyzer] Soundness issue with generator element type Jul 27, 2023
@srawlins srawlins added P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Jul 31, 2023
@eernstg
Copy link
Member Author

eernstg commented Nov 1, 2024

Just checking, this is still an issue:

import 'dart:async';

FutureOr<Iterable<int>> f() sync* {
  yield 'Hello!';
}

void main() => f();

At yield 'Hello!';, the analyzer (in DartPad based on Dart SDK 3.5.4, and on Dart SDK 3.7.0-71.0.dev) does not report any errors, even though the yielded value has type String, and the generator element type of the function should have been computed as int, but String is not assignable to int.

@bwilkerson bwilkerson added area-dart-model For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer. and removed legacy-area-analyzer Use area-devexp instead. labels Feb 21, 2025
@eernstg
Copy link
Member Author

eernstg commented Mar 31, 2025

Just checking again, this is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart-model For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer. dart-model-analyzer-spec Issues with the analyzer's implementation of the language spec P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants