mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Removed the naive check for compile time modification, which fixes #1997 but regresses in detection.
This commit is contained in:
@@ -11,13 +11,15 @@ macro void @bar(#a)
|
||||
}
|
||||
fn int main()
|
||||
{
|
||||
|
||||
/*
|
||||
int $i;
|
||||
var $Type;
|
||||
@foo($Type = int); // #error: only be modified
|
||||
@foo($i = 2); // #error: only be modified
|
||||
@foo($i += 1); // #error: only be modified
|
||||
@bar($Type = int); // #error: only be modified
|
||||
@bar($i = 2); // #error: only be modified
|
||||
@bar($i += 1); // #error: only be modified
|
||||
@foo($Type = int); // noerror: only be modified
|
||||
@foo($i = 2); // noerror: only be modified
|
||||
@foo($i += 1); // noerror: only be modified
|
||||
@bar($Type = int); // noerror: only be modified
|
||||
@bar($i = 2); // noerror: only be modified
|
||||
@bar($i += 1); // noerror: only be modified*/
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user