There was an error while loading. Please reload this page.
1 parent 8effc6c commit 25756adCopy full SHA for 25756ad
1 file changed
test/testother.cpp
@@ -4155,6 +4155,17 @@ class TestOther : public TestFixture {
4155
" return r;\n"
4156
"}\n");
4157
ASSERT_EQUALS("", errout_str());
4158
+
4159
+ check("struct Item { int state; };\n"
4160
+ "void foo(std::vector<Item> &items) {\n"
4161
+ " for (auto &item : items) {\n"
4162
+ " switch (auto &s = item.state) {\n"
4163
+ " case 0: s = 1; break;\n"
4164
+ " default: break;\n"
4165
+ " }\n"
4166
4167
+ "}\n");
4168
+ ASSERT_EQUALS("", errout_str());
4169
}
4170
4171
void constParameterCallback() {
0 commit comments