mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
Improved error messages for foo(void), foo(int!) declarations.
This commit is contained in:
@@ -6,7 +6,7 @@ struct St12
|
||||
{
|
||||
int a @align(16);
|
||||
}
|
||||
fn St12 f12_0(void) { while (1) {}; unreachable(); }
|
||||
fn St12 f12_0() { while (1) {}; unreachable(); }
|
||||
fn void f12_1(St12 a0) {}
|
||||
|
||||
struct St13_0 { long[3] f0; }
|
||||
|
||||
@@ -39,7 +39,7 @@ struct St {
|
||||
|
||||
extern fn St func_returning_struct();
|
||||
|
||||
fn void loop(void) {
|
||||
fn void loop() {
|
||||
func_returning_struct();
|
||||
}
|
||||
|
||||
|
||||
3
test/test_suite/functions/failable_param.c3
Normal file
3
test/test_suite/functions/failable_param.c3
Normal file
@@ -0,0 +1,3 @@
|
||||
module test;
|
||||
|
||||
fn void test4(void!); // #error: Parameters may not be failable.
|
||||
2
test/test_suite/functions/void_params.c3
Normal file
2
test/test_suite/functions/void_params.c3
Normal file
@@ -0,0 +1,2 @@
|
||||
fn void test(int, void) {} // #error: Parameters may not be of type 'void'.
|
||||
fn void test3(void); // #error: C-style 'foo(void)' style argument declarations are not valid
|
||||
Reference in New Issue
Block a user