Skip to content

Commit 4ff0db1

Browse files
committed
#8631: Added regression test
1 parent e1d0db3 commit 4ff0db1

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

test/test64bit.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class Test64BitPortability : public TestFixture {
3939
TEST_CASE(ptrcompare);
4040
TEST_CASE(ptrarithmetic);
4141
TEST_CASE(returnIssues);
42+
TEST_CASE(assignment);
4243
}
4344

4445
void check(const char code[]) {
@@ -56,6 +57,15 @@ class Test64BitPortability : public TestFixture {
5657
check64BitPortability.pointerassignment();
5758
}
5859

60+
void assignment() {
61+
// #8631
62+
check("using CharArray = char[16];\n"
63+
"void f() {\n"
64+
" CharArray foo = \"\";\n"
65+
"}");
66+
ASSERT_EQUALS("", errout.str());
67+
}
68+
5969
void novardecl() {
6070
// if the variable declarations can't be seen then skip the warning
6171
check("void foo()\n"

0 commit comments

Comments
 (0)