| 1 | struct App { |
| 2 | } |
| 3 | |
| 4 | struct Config[T] { |
| 5 | val T |
| 6 | } |
| 7 | |
| 8 | fn pre_start[T, R](app T, config R) string { |
| 9 | return start(app, config.val) |
| 10 | } |
| 11 | |
| 12 | fn start[T, R](app T, otherthing R) string { |
| 13 | println(otherthing) |
| 14 | return '${otherthing}' |
| 15 | } |
| 16 | |
| 17 | fn test_multiple_generic_resolve() { |
| 18 | app := App{} |
| 19 | testval := 'hello' |
| 20 | config := Config[string]{ |
| 21 | val: testval |
| 22 | } |
| 23 | |
| 24 | assert pre_start(app, config) == 'hello' |
| 25 | } |
| 26 |