Describe the issue
When closing the Sink with accessing to it through this warning appears that the Sink is not closed even tho it is.
To Reproduce
Sink in your classthis.sink.close()Close instances of dart.core.Sink appearsthisExpected behavior
There should be no warnings when closing the dart.core.Sink with or without accessing to it through this.
Is this working as expected? To me it looks it's not.
Thanks for the report @grandpa-guru! It looks like this is easy to reproduce:
class B0 {
IOSink _sinkB0; // <= Wrongly flagged.
void init(filename) {
_sinkB0 = new File(filename).openWrite();
}
void dispose(filename) {
// ignore: unnecessary_this
this._sinkB0.close();
}
}
We'll take a look at a fix. 👍
Thanks for the report @grandpa-guru! It looks like this is easy to reproduce:
class B0 { IOSink _sinkB0; // <= Wrongly flagged. void init(filename) { _sinkB0 = new File(filename).openWrite(); } void dispose(filename) { // ignore: unnecessary_this this._sinkB0.close(); } }We'll take a look at a fix. 👍
Any progress on this?
Sorry @grandpa-guru. Not yet. I'll try and take a look this week. 🤞
This is still happening to me:
```dart
class PLCVarControlScreen extends StatefulWidget {
@override
_PLCVarControlScreenState createState() => _PLCVarControlScreenState();
}
class _PLCVarControlScreenState extends State
// This gives warning: Close instances of dart.core.Sink.
StreamController
@override
void dispose() {
super.dispose();
this._plcStreamController.close();
}
...
}
```
Any progress? :)
Sorry, no significant progress. I took a look tonight but it's a bit hairy and I need to get back a little more context.
Sorry for the delay!
@pq , Hey, any news? 🗞️
Hey @LukaGiorgadze. Sorry... no. This keeps falling off. I'll try and bump it back up.
Thanks for your patience!
Most helpful comment
Sorry @grandpa-guru. Not yet. I'll try and take a look this week. 🤞