mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-12 11:09:25 -04:00
Add intrinsics.procedure_of
```odin
foo :: proc(x: $T) { fmt.println(x) }
bar :: intrinsics.procedure_of(foo(int(123))) // parameters are never ran at compile time, similar to `size_of`
bar(333) // prints 333
```
This commit is contained in:
1 parent
1945218f6d
commit
fa3cae2bb0
9 files changed
+87
-6
No files matched your search
@@ -1479,6 +1479,10 @@ gb_internal Entity *entity_of_node(Ast *expr) {
|
||||
case_ast_node(cc, CaseClause, expr);
|
||||
return cc->implicit_entity;
|
||||
case_end;
|
||||
|
||||
case_ast_node(ce, CallExpr, expr);
|
||||
return ce->entity_procedure_of;
|
||||
case_end;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user