-
Notifications
You must be signed in to change notification settings - Fork 330
Open
Description
Try to create this code:
StreamSubscription<int>? subscription;
subscription?.cancel();
You will see this hint:
Missing an 'await' for the 'Future' computed by this expression.
So you hit Option+Enter (MacOS) and you get this:
Accept it and it will generate this:
Which is completely wrong, the await is being placed at the wrong place.
This happens for multiple other "smart completes" (sorry I don't know the name of these).
Another example:
class TestClass {
List<int> list = [];
}
// ....
final test = TestClass();
test.list.for // hit Tab here to accept the "for" shortcut
This is what it generates:
Which we can see it's placing the for at the wrong place. It looks like it can't understand that the list belongs to an object, and can't be used by itself.
@alexander-doroshko, is this something at your end?