first commit
This commit is contained in:
commit
4ff159dd4a
20 changed files with 6529 additions and 0 deletions
17
tests/traits.sui
Normal file
17
tests/traits.sui
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Trait and implementation test
|
||||
trait Show
|
||||
fn show(self) -> string
|
||||
end
|
||||
|
||||
struct Number
|
||||
value: int
|
||||
end
|
||||
|
||||
impl Number : Show
|
||||
fn show(self) -> string
|
||||
"number"
|
||||
end
|
||||
|
||||
fn main() -> int do
|
||||
42
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue