v/vlib/v/checker/tests/free_method_errors.vv

23 lines
250 B
V

struct Error1 {}
fn (a Error1) free() {}
struct Error2 {}
fn (a &Error2) free() f64 {}
struct Error3 {}
fn (a &Error3) free(x int) {}
struct Ok {}
fn (a &Ok) free() {}
fn main() {
dump(Error1{})
dump(Error2{})
dump(Error3{})
dump(Ok{})
}