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