Skip to content

Warning for variable used in ctor but not in standard func #640

Closed

Description

struct Foo {int i;}
void foo(int){}

void main()
{
    size_t i1; // [warn]: Variable i1 is never modified and could have been declared const or immutable.
    new Foo(i1);

    size_t i2; // nothing here
    foo(i2);
}

The bug is that there should not be any warning for i1.

Activity

  1. ghost added on May 25, 2018
  2. ghost added this to the v0.5.6 milestone on May 25, 2018
  3. added a commit that references this issue on May 26, 2018
    1ac9b85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions