emacsorphanage / dart-mode

An Emacs mode for the Dart language
GNU General Public License v3.0
15 stars 2 forks source link

Incorrect fontification of declared variables #91

Open bradyt opened 5 years ago

bradyt commented 5 years ago

At commit https://github.com/bradyt/dart-mode/commit/d59d1953034c0550a474b13ed40751160ee56c8f, the second appearances of millisecondsSinceEpoch, abs and _maxMillisecondsSinceEpoch are fontified as declared variables. They should not.

class DateTime implements Comparable<DateTime> {
  DateTime._withValue(this._value, {this.isUtc}) {
    if (millisecondsSinceEpoch.abs() > _maxMillisecondsSinceEpoch ||
        (millisecondsSinceEpoch.abs() == _maxMillisecondsSinceEpoch &&
            microsecond != 0)) {}
  }
}
bradyt commented 5 years ago

Another example, from source_span package, color is not highlighted as variable but should be.

  String message(String message, {color});
  String highlight({color});