Skip to content

cannot have static and instance methods with the same name #4265

Closed
@ttaubert

Description

@ttaubert

This doesn't work:

struct Foo {
  baz: uint
}

impl Foo {
  static fn bar() {
    Foo { baz: 0 }.bar();
  }

  fn bar() {
  }
}

and yields:

error: internal compiler error: calling transform_self_type_for_method on static method

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