Modify fix for << in array size

The previous fix broke testcase arrays for Go.
This commit is contained in:
Olly Betts 2022-07-27 12:25:27 +12:00
commit 0ff9a0959a
3 changed files with 11 additions and 4 deletions

View file

@ -1702,9 +1702,7 @@ void SwigType_remember_clientdata(const SwigType *t, const_String_or_char_ptr cl
if (t) {
char *ct = Char(t);
const char *lt = strchr(ct, '<');
/* Allow for `<<` operator in constant expression for array size. */
if (lt && lt[1] != '(' && lt[1] != '<') {
if (strchr(ct, '<') && !(strstr(ct, "<("))) {
Printf(stdout, "Bad template type passed to SwigType_remember: %s\n", t);
assert(0);
}