You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But the error message itself is misleading; it seems to be saying that I'm trying to use c as a function, which I'm definitely not doing:
../../tmp/proj/test.dart:6:5: Error: Can't use an expression of type 'C?' as a function because it's potentially null.
- 'C' is from '../../tmp/proj/test.dart'.
Try calling using ?.call instead.
c.foo();
^
Note that if you remove the () on line (1) you get a far more reasonable error message; I would have expected this more reasonable error message regardless of whether the () is present:
../../tmp/proj/test.dart:6:5: Error: Property 'foo' cannot be accessed on 'C?' because it is potentially null.
- 'C' is from '../../tmp/proj/test.dart'.
Try accessing using ?. instead.
c.foo;
^^^
The text was updated successfully, but these errors were encountered:
The following code produces an error in the CFE (as it should):
But the error message itself is misleading; it seems to be saying that I'm trying to use
c
as a function, which I'm definitely not doing:Note that if you remove the
()
on line (1) you get a far more reasonable error message; I would have expected this more reasonable error message regardless of whether the()
is present:The text was updated successfully, but these errors were encountered: