The example submitted to the swig-user list:
void useSomeFunc( int i=GetTestClass().someFunc() );
Response from William:
This seems to be a general parsing bug. Non numeric expressions containing . or -> are not parsable. Please log as a bug. Workaround is to simplify the expression, eg:
int GetTestClassSomeFunc() {
return GetTestClass().someFunc();
}
void useSomeFunc( int i=GetTestClassSomeFunc() );
or persuade someone or yourself to fix the bug. The fix to this is going to be somewhere around exprcompound in parser.y. Please add this info to the bug report.
William
Since rereported as: https://github.com/swig/swig/issues/660
We're not actively using the SF tracker now, so closing this as a duplicate.