aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/eolian/data/free_func.eo
blob: 5e77e5cb4b7aed6739d7ee56049a0eee07838068 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* regular struct */
struct Named1 {
    field: int;
}
struct @free(test_free) Named2 {
    field: int;
}

/* typedef */
type Typedef1: int;
type @free(def_free) Typedef2: int;

/* opaque */
struct Opaque1;
struct @free(opaque_free) Opaque2;

/* pointers */
type Pointer1: ptr(char);
type Pointer2: free(ptr(char), ptr_free);

class Free_Func {
   methods {
      foo {
         params {
            idx: int;
         }
         return: string @owned;
      }
   }
}