| ... | ... | @@ -256,4 +256,17 @@ pub fn addCases(cases: *tests.RunTranslatedCContext) void { |
| 256 | 256 | \\ return 0; |
| 257 | 257 | \\} |
| 258 | 258 | , ""); |
| 259 | |
| 260 | cases.add("scoped for loops with shadowing", |
| 261 | \\#include <stdlib.h> |
| 262 | \\int main() { |
| 263 | \\ int count = 0; |
| 264 | \\ for (int x = 0; x < 2; x++) |
| 265 | \\ for (int x = 0; x < 2; x++) |
| 266 | \\ count++; |
| 267 | \\ |
| 268 | \\ if (count != 4) abort(); |
| 269 | \\ return 0; |
| 270 | \\} |
| 271 | ,""); |
| 259 | 272 | } |