Import quick-fix appears for `foo()` but not `foo`
See original GitHub issueDart Code 3.2.1 Mac OS
Hi, when I use quick fix on a function that doesn’t have it’s parentheses (or arguments, ie I’m specifying the function type rather making a call to a function), quick fix doesn’t suggest the function import statement for me. When the parentheses are added quick fix suggests the import.
Sometimes I pass functions around so the quick fix without the parentheses would be really useful.
doStuff(anotherFunction); // quick fix doesn't work
doStuff(anotherFunction()); // quick fix works
Would it be possible for the quick fix to work on the function without the parentheses?
Thank you
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Quickfix does not add import to the existing line · Issue #19968 ...
try: import foo import bar as b from ctypes import c_int16, c_uint8 except ModuleNotFoundError as err: print(err) input('Press ENTER to leave').
Read more >Why do circular imports seemingly work further up in the call ...
I think your answer comes down too hard on circular imports. Circularly imports usually work if you do just import foo rather than...
Read more >"Add Import" quickfix disappears for an overload from another ...
Usual Add Import-suggestion (underlined text) shows on foo(42, 43, 44) call after re-analysis, but if not applied right away, disappears after any arbitrary ......
Read more >attempted relative import with no known parent package - IQ-Inc
The functions are not imported directly into the script, but they are accessible via the module name. # foo.py def bar(): print("E-Flat walks ......
Read more >475282 – Luna QuickFix does not insert first import statement into ...
List; public class Foo { Calendar calendar; List list; } =============== Eclipse correctly highlights error on a new line. Now QuickFix the calendar ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fix is in https://github.com/dart-lang/sdk/commit/3011ca2da76d3dd0a6abed74750fe93d95bae17b. It may take a little time to make it to a Dart (or Flutter) stable release though.
If you’ve only recently opened the project, there might be a delay before the completions for unimported symbols show up - but if you’re not seeing them at all even after a while, it’s worth opening another issue for.
Aha - one is
undefined_function
and the otherundefined_identifier
. I don’t mind taking a look - I’m not very familiar with how the fixes work so it’s an opportunity to look through them even if it’s relatively straight forward.