Skip to content

No warning given when self-assigment occurs  #57144

@DartBot

Description

@DartBot

This issue was originally filed by [email protected]


What steps will reproduce the problem?

  1. create a class with a member variable: int a
  2. create a member method with a parameter: method_x(int a)
  3. make an invalid (useless) assignment "a = a;" in that method

What is the expected output? What do you see instead?

I expect to get at least a warning because the code has no effect.
The code that should have been written would be "this.a = a;"

What version of the product are you using? On what operating system?
Dart Editor version 1.0.0_r30187 (DEV)
Dart SDK version 1.0.0.3_r30187
java version "1.7.0_45"
Linux 3.2.0-56-generic #­86-Ubuntu SMP x86_64 GNU/Linux

Please provide any additional information below.

Metadata

Metadata

Assignees

No one assigned

    Labels

    devexp-linterIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions