Open
Description
When I try to refactor a Dart method that is invoked using the cascade operator, I get this error: "Cannot inline cascade invocation." This appears to be coming from here:
For example:
class Foo {
void bar() {
baz();
}
void baz() {}
}
void main() {
final myFoo = Foo()..bar();
}
- Copy this into VSCode.
- Right click bar, click refactor, then click inline.
Expected:
class Foo {
void baz() {}
}
void main() {
final myFoo = Foo()..baz();
}
- Dart version and tooling diagnostic info (
dart info
): The current one in google3 (not sure if I can share here) - Whether you are using Windows, macOS, or Linux (if applicable): Linux
- Whether you are using Chrome, Safari, Firefox, Edge (if applicable): N/A