-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Internal compiler error: unexpected failure #15094
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Comments
Similar code without the struct Adder<T> {
x: T
}
impl<A, R, T: Add<A, R>> Adder<T> {
fn call(&self, args: (A, )) -> R {
let (y, ) = args;
self.x + y
}
}
fn make_adder<T>(x: T) -> Adder<T> {
Adder {
x: x
}
}
pub fn main() {
let add3 = make_adder(3i);
let y: int = add3.call((17, ));
println!("{}", y);
} |
A smaller test case: #![feature(overloaded_calls)]
use std::{fmt, ops};
struct Shower<T> {
x: T
}
impl<T: fmt::Show> ops::Fn<(), ()> for Shower<T> {
fn call(&self, _args: ()) {
println!("{}", self.x);
}
}
fn make_shower<T>(x: T) -> Shower<T> {
Shower { x: x }
}
pub fn main() {
let show3 = make_shower(3i);
show3();
} |
Neither of the test cases are ICEing for me today, I'm seeing the following:
|
Flagging as needstest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Code sample:
Backtrace and debug log:
The text was updated successfully, but these errors were encountered: