| // Test for returning errors. |
| // Check for a single error return |
| // Check for a single other return type |
| // Check for multiple return but error at end. |
| func i() (int, error) { // ok |
| // Check for multiple return but error at end with named variables. |
| func j() (x int, err error) { // ok |
| // Check for error in the wrong location on 2 types |
| func k() (error, int) { // MATCH /error should be the last type/ |
| // Check for error in the wrong location for > 2 types |
| func l() (int, error, int) { // MATCH /error should be the last type/ |
| // Check for error in the wrong location with named variables. |
| func m() (x int, err error, y int) { // MATCH /error should be the last type/ |
| // Check for multiple error returns but with errors at the end. |
| func n() (int, error, error) { // OK |
| // Check for multiple error returns mixed in order, but keeping one error at last position. |
| func o() (int, error, int, error) { // OK |