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

Type inference not handling generic collection #3427

Closed
sethladd opened this issue Jun 7, 2012 · 7 comments
Closed

Type inference not handling generic collection #3427

sethladd opened this issue Jun 7, 2012 · 7 comments
Assignees
Labels
closed-cannot-reproduce Closed as we were unable to reproduce the reported issue
Milestone

Comments

@sethladd
Copy link
Contributor

sethladd commented Jun 7, 2012

Sample code:

class Foo {
  String msg;
  Foo(this.msg);
}

main() {
  var foos = <Foo>[];
  foos.add(new Foo('a'));
  var foo = foos[0];
  print(foo.does_not_exist);
}

I would expect a warning on foo.does_not_exist

Current version of editor:

Version 0.1.0.201205301155, Build 8124

@sethladd
Copy link
Contributor Author

sethladd commented Jun 7, 2012

Also tested in Version 0.1.0.201206061627, Build 8370 (does not show expected behavior)

@bwilkerson
Copy link
Member

Added this to the Later milestone.

@scheglov
Copy link
Contributor

Set owner to @scheglov.
Added Accepted label.

@scheglov
Copy link
Contributor

Removed Area-Analyzer label.
Added Area-Editor label.

@scheglov
Copy link
Contributor

Works for me.


Attachment:
[Screen shot 2012-06-12 at 8.02.58 PM.png](https://storage.googleapis.com/google-code-attachments/dart/issue-3427/comment-5/Screen shot 2012-06-12 at 8.02.58 PM.png) (26.98 KB)


Added CannotReproduce label.

@sethladd
Copy link
Contributor Author

Thanks for testing, glad to see it got fixed in latest round!

@clayberg
Copy link

Removed this from the Later milestone.
Added this to the M1 milestone.

@sethladd sethladd added Type-Defect closed-cannot-reproduce Closed as we were unable to reproduce the reported issue labels Sep 18, 2012
@sethladd sethladd added this to the M1 milestone Sep 18, 2012
copybara-service bot pushed a commit that referenced this issue Jun 13, 2022
Changes:
```
> git log --format="%C(auto) %h %s" 51435ef..c4e9ddc
 https://dart.googlesource.com/pub.git/+/c4e9ddc8 Extend retries for file-ops on windows (#3451)
 https://dart.googlesource.com/pub.git/+/6aeb1795 Upgrade package:lints to 2.0.0 (#3445)
 https://dart.googlesource.com/pub.git/+/73ea9a98 Roll tar to 0.5.5+1 (#3447)
 https://dart.googlesource.com/pub.git/+/2dc887fe Add env var for writing golden files (#3222)
 https://dart.googlesource.com/pub.git/+/764500b8 List all files in pub publish (#3440)
 https://dart.googlesource.com/pub.git/+/0b52e6a8 Remove debug print (#3441)
 https://dart.googlesource.com/pub.git/+/ea070238 Merge pull request #3443 from jonasfj/master
 https://dart.googlesource.com/pub.git/+/bffd1267 Merge branch 'cherry-pick-for-2.17.2'
 https://dart.googlesource.com/pub.git/+/c66381c5 Make `name` field of `_UserInfo` nullable. Fix #3424 (#3442)
 https://dart.googlesource.com/pub.git/+/cecc8e3c Handle broken response from userinfo_endpoint (#3427)
 https://dart.googlesource.com/pub.git/+/6c635040 Make `name` field of `_UserInfo` nullable. Fix #3424 (#3442)
 https://dart.googlesource.com/pub.git/+/6f20a94b Handle missing pubspec.lock in dependency_services list (#3439)
 https://dart.googlesource.com/pub.git/+/0ad17e84 Handle broken response from userinfo_endpoint (#3427)
 https://dart.googlesource.com/pub.git/+/153ef061 `pub add` create top-level attribute in block-style if possible. (#3423)
 https://dart.googlesource.com/pub.git/+/3b96f910 Handle error code 183 on windows (#3426)
 https://dart.googlesource.com/pub.git/+/9eb6428c Ignore `pubspec_overrides.yaml` for `publish` command (#3419)

```

Diff: https://dart.googlesource.com/pub.git/+/51435efcd574b7bc18d47a5dd620cb9759dea8f8~..c4e9ddc888c3aa89ef4462f0c4298929191e32b9/
Change-Id: I6dacb3e95c6399d3fb5cf340b5d0e5cded270684
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247962
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
copybara-service bot pushed a commit that referenced this issue Jun 7, 2023
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (https://github.com/dart-lang/dartdoc/compare/0c8feac..449478c):
  449478c7  Tue Jun 6 20:04:19 2023 -0700  Sam Rawlins  Search: specify package rank in generation; distinguish non-core Dart libs (#3427)
  81af1bf3  Tue Jun 6 17:31:02 2023 -0700  Janice Collins  Prepare for dartdoc 6.3.0. (#3430)
  2b7340d3  Tue Jun 6 17:30:40 2023 -0700  Sam Rawlins  Explicitly export Kind; for internal customer (#3431)
  896540c0  Mon Jun 5 19:39:10 2023 +0000  dependabot[bot]  Bump github/codeql-action from 2.3.5 to 2.3.6 (#3429)

lints (https://github.com/dart-lang/lints/compare/fc74ce0..4b79906):
  4b79906  Tue Jun 6 15:15:22 2023 -0500  Parker Lougheed  Link to 'dart fix' docs in table header (#132)
  b7766d6  Tue Jun 6 09:05:20 2023 -0700  Devon Carew  add 'has quick-fix' checkboxes to the package's readme (#131)

native (https://github.com/dart-lang/native/compare/c851e69..973f3ed):
  973f3ed  Tue Jun 6 10:26:58 2023 +0000  Daco Harkes  [native_assets_cli] Add `dry_run` option (#59)

webdev (https://github.com/dart-lang/webdev/compare/b10d62b..3d7f546):
  3d7f546f  Mon Jun 5 16:24:16 2023 -0700  Elliott Brooks  Add Webdev installation test (#1935)
  9297c663  Mon Jun 5 14:31:43 2023 -0700  Elliott Brooks  Remove unnecessary `async` keywords(#2130)
  6b112b06  Mon Jun 5 12:45:34 2023 -0700  Elliott Brooks  Run DCM workflow against PR branch (#2131)

Change-Id: I6728516c13c1d45f8bbd65c266076c6028ed45ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307962
Reviewed-by: Devon Carew <devoncarew@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-cannot-reproduce Closed as we were unable to reproduce the reported issue
Projects
None yet
Development

No branches or pull requests

4 participants