Skip to content

as, impls, and autounboxing, used together, segfault #2935

Closed
@paulstansifer

Description

@paulstansifer
type t = { a: int };

iface it {
    fn f();
}

impl  of it for t {
    fn f() { }
}

fn main() {
    let x = ({a: 4i} as it);
    let y = @({a: 4i});
    let z = @({a: 4i} as it);
    x.f();
    y.f();
    (*z).f();
    #error["ok so far..."];
    z.f(); //segfault
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions