-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
I-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
Ran into this while trying to make an ivec_equal function. Here's a testcase without any vectors.
fn builtin_equal_int(&int a, &int b) -> bool {
ret a == b;
}
fn builtin_equal[T](&T a, &T b) -> bool {
ret a == b;
}
fn apply_equal[T](fn (&T, &T) -> bool f, &T a, &T b) -> bool {
ret f(a, b);
}
fn main() {
assert builtin_equal_int(5, 5);
assert builtin_equal(5, 5);
assert apply_equal(builtin_equal_int, 5, 5);
assert apply_equal(builtin_equal, 5, 5); // CRASH
}
Metadata
Metadata
Assignees
Labels
I-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.