| Emailed In |
Reported Version |
Latest Broken Version |
Latest Broken Platforms |
Fix Version |
| ✅ |
beta-0.1.096 |
beta-0.2.010 |
windows, linux |
- |
Description
Compiler's double standard involving for_expansion and struct literals.
Buggy Code
#import "Basic";
main :: () {
{ // fine
A :: struct {y := 10;}
B :: struct{a : A;}
for_expansion :: (b : B, body : Code, $flags : For_Flags) #expand {
`it, `it_index := 0;
}
for (B.{.{}}) {}
}
{ // fine
A :: struct{}
B :: struct{a : A;}
for_expansion :: (b : B, body : Code, $flags : For_Flags) #expand {
`it, `it_index := 0;
}
for (B.{a = .{}}) {}
}
{ // compiler error
A :: struct{}
B :: struct{a : A;}
for_expansion :: (b : B, body : Code, $flags : For_Flags) #expand {
`it, `it_index := 0;
}
for (B.{.{}}) {}
}
}
Workarounds
Latest Test Outputs
windows
Compiler Error Output
In Workspace 2 ("Target Program"):
C:/Users/Private/Desktop/testo_runner/_work/JaiCommunityBugTrackerDev/JaiCommunityBugTrackerDev/compiler_bugs/381_364_CEC0.jai:33,17: Error: Too many values provided in this struct literal.
}
for (B.{.{}}) {}
^^^
C:/Users/Private/Desktop/testo_runner/_work/JaiCommunityBugTrackerDev/JaiCommunityBugTrackerDev/compiler_bugs/381_364_CEC0.jai:27,14: Info: Here is the struct type that this literal is attempting to fill.
{ // compiler error
A :: struct{}
B :: struct{a : A;}
^^^^^^
linux
Compiler Error Output
In Workspace 2 ("Target Program"):
/home/ubuntu/Desktop/actions-runner/_work/JaiCommunityBugTrackerDev/JaiCommunityBugTrackerDev/compiler_bugs/381_364_CEC0.jai:33,17: Error: Too many values provided in this struct literal.
}
for (B.{.{}}) {}
^^^
/home/ubuntu/Desktop/actions-runner/_work/JaiCommunityBugTrackerDev/JaiCommunityBugTrackerDev/compiler_bugs/381_364_CEC0.jai:27,14: Info: Here is the struct type that this literal is attempting to fill.
{ // compiler error
A :: struct{}
B :: struct{a : A;}
^^^^^^
History V1
| Version |
Windows |
Linux |
Mac |
| beta-0.2.010 |
❌ - ExitCode 1 |
❌ - ExitCode 1 |
- |
| beta-0.2.009 |
❌ - ExitCode 1 |
❌ - ExitCode 1 |
- |
| beta-0.2.008 |
❌ - ExitCode 1 |
❌ - ExitCode 1 |
- |
| beta-0.2.007 |
❌ - ExitCode 1 |
❌ - ExitCode 1 |
- |
| beta-0.2.006 |
❌ - ExitCode 1 |
❌ - ExitCode 1 |
- |
| beta-0.2.005 |
❌ - ExitCode 1 |
❌ - ExitCode 1 |
- |
| beta-0.2.004 |
❌ - ExitCode 1 |
❌ - ExitCode 1 |
- |
| beta-0.2.003 |
❌ - ExitCode 1 |
❌ - ExitCode 1 |
- |
| beta-0.2.002 |
❌ - ExitCode 1 |
❌ - ExitCode 1 |
- |
| beta-0.2.001 |
❌ - ExitCode 1 |
❌ - ExitCode 1 |
- |
| beta-0.1.096 |
❌ - ExitCode 1 |
❌ - ExitCode 1 |
- |
Description
Buggy Code
Workarounds
-Latest Test Outputs
windows
Compiler Error Output
linux
Compiler Error Output
History V1