mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Output llvm/asm into llvm/<platform> and asm/<platform> by default. - Don't delete .o files not produced by the compiler. - Correctly handle in/out when interacting with inout.
23 lines
330 B
Plaintext
23 lines
330 B
Plaintext
struct Foo { int x; }
|
|
<* @param [out] f *>
|
|
fn void bar(Foo* f)
|
|
{
|
|
f.x = 123;
|
|
}
|
|
|
|
<* @param [in] f *>
|
|
fn void foo(Foo* f)
|
|
{
|
|
bar(f); // #error: An 'in' parameter may not be passed i
|
|
}
|
|
|
|
<* @param [in] f *>
|
|
fn void foo2(Foo* f)
|
|
{
|
|
}
|
|
|
|
<* @param [out] f *>
|
|
fn void baz(Foo *f)
|
|
{
|
|
foo2(f); // #error: may not be passed into a function
|
|
} |