add test for while respecting implicit comptime

master
Andrew Kelley 2018-01-03 03:15:06 -05:00
parent d9d61ed563
commit c741d3f4b2
1 changed files with 6 additions and 0 deletions

View File

@ -571,3 +571,9 @@ fn testComptimeIfInsideRuntimeWhileWhichUnconditionallyBreaks(cond: bool) {
break;
}
}
test "implicit comptime while" {
while (false) {
@compileError("bad");
}
}