wu-lang/wu

[bug] trait implementation failure

evolbug opened this issue · 1 comments

Trait implement does not seem to accept user types in signatures

Data: struct {}
Data_T: trait {
    clone: fun(self) -> Data
}
implement Data: Data_T {
    clone: extern fun(self) -> Data
}

error:

wrong: expected implemented type `fun() -> deid(Data)` for `clone`
     --> main.wu
      │
    5 │ implement Data: Data_T {
      │           ^^^^
nilq commented

You guessed it. It's fixed. 😎