extension on String {
static String cannotCall() => '';
}
As far as I can tell there is no way to invoke cannotCall given this definition, so it's not useful to define it. Should we make this an error or warning?
It can be invoked from within the extension, so I expect it won't be an error.
It's a TODO for the analyzer to detect it as dead code if it isn't being invoked.
Agree. There is nothing inherently wrong with having local static helper functions in scope and used by the extension members.
It's dead code, like any other static on a private class, if it's not actually used by the containing library, and the analyzer should be able to recognize that normally.
Most helpful comment
It can be invoked from within the extension, so I expect it won't be an error.
It's a TODO for the analyzer to detect it as dead code if it isn't being invoked.