mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
14 lines
213 B
Plaintext
14 lines
213 B
Plaintext
import std;
|
|
struct Result <WithType2>
|
|
{
|
|
fault error;
|
|
}
|
|
macro err(fault error) <OfType> @builtin => (Result{OfType}){ .error = error };
|
|
|
|
faultdef TESTIN;
|
|
|
|
fn int main()
|
|
{
|
|
Result{int} x = err(TESTIN);
|
|
return 0;
|
|
} |