Patrick Walton | 4f32a2d | 2013-08-20 00:24:04 | [diff] [blame] | 1 | // xfail-test |
| 2 | |
Michael Woerister | 5abb7c3 | 2013-08-15 16:24:05 | [diff] [blame] | 3 | // Copyright 2013 The Rust Project Developers. See the COPYRIGHT |
| 4 | // file at the top-level directory of this distribution and at |
| 5 | // http://rust-lang.org/COPYRIGHT. |
| 6 | // |
| 7 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license |
| 9 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your |
| 10 | // option. This file may not be copied, modified, or distributed |
| 11 | // except according to those terms. |
| 12 | |
Alex Crichton | 071ee96 | 2014-02-07 03:57:09 | [diff] [blame^] | 13 | // compile-flags:-g |
Michael Woerister | 93d6328 | 2013-09-06 14:00:08 | [diff] [blame] | 14 | // debugger:rbreak zzz |
Michael Woerister | 5abb7c3 | 2013-08-15 16:24:05 | [diff] [blame] | 15 | // debugger:run |
| 16 | |
| 17 | // debugger:finish |
| 18 | // debugger:print arg1 |
| 19 | // check:$1 = 1000 |
| 20 | // debugger:print *arg2 |
| 21 | // check:$2 = {1, 2.5} |
| 22 | // debugger:continue |
| 23 | |
| 24 | // debugger:finish |
| 25 | // debugger:print arg1 |
| 26 | // check:$3 = 2000 |
| 27 | // debugger:print *arg2 |
| 28 | // check:$4 = {3.5, {4, 5, 6}} |
| 29 | // debugger:continue |
| 30 | |
| 31 | |
| 32 | struct Struct { |
| 33 | x: int |
| 34 | } |
| 35 | |
| 36 | trait Trait<T1> { |
| 37 | fn generic_static_default_method<T2>(arg1: int, arg2: &(T1, T2)) -> int { |
| 38 | zzz(); |
| 39 | arg1 |
| 40 | } |
| 41 | } |
| 42 | |
Alex Crichton | 4b266f1 | 2013-09-19 19:09:52 | [diff] [blame] | 43 | impl<T> Trait<T> for Struct {} |
Michael Woerister | 5abb7c3 | 2013-08-15 16:24:05 | [diff] [blame] | 44 | |
| 45 | fn main() { |
| 46 | |
| 47 | // Is this really how to use these? |
| 48 | Trait::generic_static_default_method::<int, Struct, float>(1000, &(1, 2.5)); |
| 49 | Trait::generic_static_default_method::<float, Struct, (int, int, int)>(2000, &(3.5, (4, 5, 6))); |
| 50 | |
| 51 | } |
| 52 | |
| 53 | fn zzz() {()} |