mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- When encountering a foreach over a ZString* it would not properly emit a compilation error, but hit an assert #2573.
This commit is contained in:
9
test/test_suite/statements/foreach_zstring.c3
Normal file
9
test/test_suite/statements/foreach_zstring.c3
Normal file
@@ -0,0 +1,9 @@
|
||||
module get_environ;
|
||||
import std;
|
||||
|
||||
fn void main(String[] args)
|
||||
{
|
||||
ZString* environ_arr = std::os::posix::environ;
|
||||
foreach (idx, ZString &envvar : environ_arr) // #error: It's not possible to enumerate an expression of type 'ZString*'
|
||||
{}
|
||||
}
|
||||
Reference in New Issue
Block a user