mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
40 lines
589 B
Plaintext
40 lines
589 B
Plaintext
module contract_err_tests;
|
|
import std;
|
|
<*
|
|
Hello world
|
|
@param [in] a
|
|
: "param description"
|
|
@require 1 == 2 : "Some text, "
|
|
"that" " continues "
|
|
`-here `
|
|
@require 1 = 1
|
|
@return "hello"
|
|
"world"
|
|
@return? io::EOF :
|
|
"errors"
|
|
*>
|
|
macro usz @a(a) => a;
|
|
|
|
<*
|
|
Hello world
|
|
@param [in] a :
|
|
"param description"
|
|
@require 1 == 2
|
|
:
|
|
"Some text, "
|
|
"that" " continues "
|
|
`-here `
|
|
@require 1 = 1
|
|
@return
|
|
"hello"
|
|
"world"
|
|
@return? io::EOF
|
|
: "errors"
|
|
*>
|
|
macro usz @b(a) => a;
|
|
|
|
fn int main()
|
|
{
|
|
usz t = @a(1); // #error: 'Some text, that continues -here '
|
|
return 0;
|
|
} |