diff --git a/examples/associated_functions.reid b/examples/associated_functions.reid new file mode 100644 index 0000000..7cfbc19 --- /dev/null +++ b/examples/associated_functions.reid @@ -0,0 +1,14 @@ +struct Otus { + field: u32, +} + +impl Otus { + fn test(&self) -> u32 { + *self.field + } +} + +fn main() -> u32 { + let otus = Otus {}; + return Otus::test(&otus); +}