Skip to content

Generic type alias: unable to access static fn #5635

Closed
@jeaye

Description

@jeaye

It seems a generic type alias does not carry over static function. (incoming as of 03-29-13)

pub mod foo
{
  pub struct Foo<T>
  {
    x: T
  }
  impl<T> Foo<T>
  {
    pub fn new(t: T) -> Foo<T>
    { Foo { x: t } }
  }

  pub type Foof = Foo<float>;
}

fn main()
{
  let f = foo::Foof::new(42.0f);
  io::println("Good");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions