resource foo { fn some_func(path a, string b, foo c, domain d) { allow(d, c, file, [read]); } } domain bar { foo.some_func("/test", "test", foo, bar); }