dart-lang / linter

Linter for Dart.
https://dart.dev/tools/linter-rules
BSD 3-Clause "New" or "Revised" License
636 stars 170 forks source link

False positive cascade_invocations #1023

Closed lexaknyazev closed 5 years ago

lexaknyazev commented 6 years ago

Dart SDK 2.0.0-dev.61.0

import 'dart:html';

void main() {
  final _foo = querySelector('#foo');
  final _bar = querySelector('#bar');

  _foo.style.width = '1px';
  _bar.style.height = '1px'; // <--- cascade_invocations
}
pq commented 6 years ago

/cc @alexeieleusis

apaatsio commented 5 years ago

I can't reproduce this. I believe this is the same bug as #1323 which has already been fixed.

❯ dartanalyzer --version
dartanalyzer version 2.2.0-edge.0a7dcf17eb5f2450480527d6ad1e201fb47f1e36
❯ dart --version
Dart VM version: 2.1.2-dev.0.0.flutter-0a7dcf17eb (Tue Feb 12 01:59:15 2019 +0000) on "linux_x64"
pq commented 5 years ago

Thanks @apaatsio! This looks fixed and covered by https://github.com/dart-lang/linter/pull/1328. Cheers!