-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Perform simple type inference in the editor #855
Comments
That's a good idea. Another improvement would be to do Smalltalk-style suggestions. That is, find all methods that match the prefix that was typed and propose them as completions. It doesn't use types at all, and is more useful when you've typed something like "x.get" followed by Ctrl-Space. Paying attention to final var decls that have a well-typed RHS would also be good. Set owner to @stevemessick. |
Added Started label. |
Removed Type-Defect label. |
Marked as being merged into #dart:502. |
Revisions updated by `dart tools/rev_sdk_deps.dart`. lints (https://github.com/dart-lang/lints/compare/1e0245e..54cd7a0): 54cd7a0 2023-08-11 Parker Lougheed Cleanup docs and links (#142) protobuf (https://github.com/dart-lang/protobuf/compare/217c030..a852ba4): a852ba4 2023-08-14 Ömer Sinan Ağacan Release protobuf-3.1.0, protoc_plugin-21.1.0 (#868) 8505c58 2023-08-14 Ömer Sinan Ağacan Generate constructor arguments again, add a flag to disable (#855) test (https://github.com/dart-lang/test/compare/9b1828f..bc0a992): bc0a992d 2023-08-11 Nate Bosch Remove always null observatoryUrl for browsers (#2079) webdev (https://github.com/dart-lang/webdev/compare/f8f752c..19aad27): 19aad27b 2023-08-11 Elliott Brooks Reset DWDS to version 20.0.2-wip after release (#2193) 20cc6d3d 2023-08-10 Elliott Brooks Prepare DWDS for release to version 20.0.1 (#2192) 9e352670 2023-08-10 Elliott Brooks Prepare DWDS for release to version 20.0.0 (#2191) bc008840 2023-08-10 Bernardo Ferrari Update `file` dependency. (#2185) afbd6401 2023-08-10 Elliott Brooks Re-enable events_test with fix (#2189) 1f1efa35 2023-08-10 Elliott Brooks Fix Flutter crash by catching WipError on resume and mapping to RPC error (#2188) Change-Id: I159fc1b35b60bab9909f287a9c9f85b624993fb0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/320640 Commit-Queue: Konstantin Shcheglov <[email protected]> Auto-Submit: Devon Carew <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]>
This issue was originally filed by [email protected]
Consider the following code:
doSomething(var x) {
if (x is MyObject) {
// blah blah blah
} else {
// other stuff
}
}
When entering 'x.' within the 'x is MyObject' clause, it would great if method autocompletion would take the type of x to be 'MyObject' rather than giving up and saying 'No completions available.'
I don't expect global type inference at this point, but a simple local check of the enclosing scope would be a big help.
The text was updated successfully, but these errors were encountered: