-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-codegenArea: Code generationArea: Code generationI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Description
The following crashes:
trait double {
fn double() -> uint;
}
impl uint: double {
fn double() -> uint { self * 2u }
}
fn is_equal<D: double>(x: @D, exp: uint) {
assert x.double() == exp;
}
fn main() {
let x = @(3u as double);
is_equal(x, 6);
}
This is because the autoderef code is not being used if the call occurs in a monomorphized context. My trans refactoring should fix this.
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.