question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Type inferrence is good enough to avoid the list hint

See original GitHub issue

When code-completing a typed list in an argument list, a type annotation is included. ie

Stack(
  children: /* !!! */ <Widget>[],
)

As far as I can tell, this not required in the general case. I’d consider getting rid of it, as it’s a little noisy.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DanTupcommented, Dec 18, 2019

@pq I tracked this back to https://github.com/flutter/flutter-intellij/issues/832 but it’s not clear why it’s needed (maybe in the past this was necessary?). I’d agree it seems unnecessary and noisy (at least for those not using lints for explicit types everywhere). WDYT?

0reactions
DanTupcommented, May 4, 2020

@pq perfect, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Local Type Inference Cheat Sheet for Java 10 and beyond!
Inference for generic methods relies on the target type if there are no actual method arguments that provide sufficient type information. In a ......
Read more >
Documentation - Type Inference - TypeScript
This kind of inference takes place when initializing variables and members, setting parameter default values, and determining function return types.
Read more >
Does type inference renders the code less readable - Reddit
Type inference is great. It really can help to make a language much more readable, by using context to narrow the scope of...
Read more >
Lecture 12: Type Inference
This process is called type-inference, and we will follow the classic Hindley-Milner algorithm to deduce types for our programs.
Read more >
programming languages - Why is type inference useful?
While type inference is really useful for local variables, it should not be used for public APIs which have to be unambiguously documented....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found