Skip to content
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

Provide content tests with 'in' #3979

Closed
DartBot opened this issue Jul 3, 2012 · 3 comments
Closed

Provide content tests with 'in' #3979

DartBot opened this issue Jul 3, 2012 · 3 comments
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). closed-duplicate Closed in favor of an existing report type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Jul 3, 2012

This issue was originally filed by jk...@gmail.com


Basically I think it would be nice to extend the use of in from just for loops to also be used inside statements for checking content

    int a = 44
    print(a in [1,3,44]);
    // true

This would give 'in' more uses and would mean that content checks are often cleaner to read.

Let me know what you think

@floitschG
Copy link
Contributor

Removed Type-Defect label.
Added Type-Enhancement, Area-Language, Triaged labels.

@floitschG
Copy link
Contributor

In other words: "x in y" would be syntactic sugar for "y.contains(x)".

@floitschG
Copy link
Contributor

Added Duplicate label.
Marked as being merged into #510.

@DartBot DartBot added Type-Enhancement area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). closed-duplicate Closed in favor of an existing report labels Jul 3, 2012
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). closed-duplicate Closed in favor of an existing report type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants