8000 Flaky avoid_redundant_argument_values lint · Issue #49596 · dart-lang/sdk · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Flaky avoid_redundant_argument_values lint #49596
Open
@goderbauer

Description

@goderbauer

This is a little strange and doesn't reproduce consistently, but I'll try to provide as much details as I have. In IntelliJ I have a workspace that has a bunch of projects open (including the flutter repository). In this one, I also have a tiny playground project with two files:

foo.dart:

class Foo {
  Foo({required this.foo});

  Bar? foo;
}

class Bar {

}

main.dart:

// @dart = 2.9

import 'foo.dart';

void main() {
  Foo(foo: null); // 🔥 sometimes this line has an incorrect avoid_redundant_argument_values
}

Now, sometimes I see what appears to be an incorrect avoid_redundant_argument_values warning on the line with the 🔥. The warning doesn't show up consistently. Sometimes it doesn't show up at all, sometimes it shows up for 5s to 10s and then disappears. Sometimes it sticks around indefinitely until I edit the code again. It's a bit of a mystery.

Here are random changes I have made to the files to make the warning appear/disappear (I believe the warning is incorrect in all cases):

  • change the type of the foo field to int?
  • change it back to Bar?
  • remove the @dart directive from main.dart
  • put the @dart directive back in
  • add empty new lines at the end of the main.dart file

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onanalyzer-stabilityarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0