Skip to content

Macros inside default methods throw internal compiler error #3911

Closed
@dustinlacewell

Description

@dustinlacewell

Using a macro from within a trait's default method causes an internal compiler error:

trait Foo {
  fn val() -> int;
  fn print() {
    io::println(fmt!("%?", self.val()));
  }
}

struct Bar { 
  val: int,
}

impl Bar: Foo {
  fn val() -> int { self.val }
 }

error: internal compiler error: unexpanded macro

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions