mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-07 21:43:15 +00:00
Fix foreign export #294
This commit is contained in:
@@ -836,8 +836,14 @@ diverging_procedures :: proc() {
|
||||
foo();
|
||||
}
|
||||
|
||||
foreign export {
|
||||
bar :: proc "c" () -> i32 {
|
||||
return 123;
|
||||
}
|
||||
}
|
||||
|
||||
main :: proc() {
|
||||
when true {
|
||||
when false {
|
||||
general_stuff();
|
||||
union_type();
|
||||
parametric_polymorphism();
|
||||
|
||||
@@ -9744,6 +9744,7 @@ void ir_gen_tree(irGen *s) {
|
||||
irValue *p = ir_value_procedure(m, e, e->type, type_expr, body, name);
|
||||
p->Proc.tags = pl->tags;
|
||||
p->Proc.inlining = pl->inlining;
|
||||
p->Proc.is_export = e->Procedure.is_export;
|
||||
|
||||
ir_module_add_value(m, e, p);
|
||||
HashKey hash_name = hash_string(name);
|
||||
|
||||
Reference in New Issue
Block a user