Fix SF#3528035, a regression introduced by the fix for SF#3428833.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13105 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Olly Betts 2012-05-23 02:58:24 +00:00
commit 7196e556a5
4 changed files with 20 additions and 2 deletions

View file

@ -20,4 +20,15 @@ struct Test {
v.push_back(1.0 / n);
}
};
// Regression test for SF#3528035:
struct S {
int x;
S() : x(4) { }
};
struct T {
S start_t;
unsigned length;
};
%}

View file

@ -20,5 +20,11 @@ $t->f(3);
check::equal($t->x, 6, "Test::x != 6");
check::equal($t->v->size(), 3, "Test::v.size() != 3");
$T = new T();
$T->start_t = new S();
$T->length = 7;
check::equal($T->start_t->x, 4, "S::x != 4");
check::equal($T->length, 7, "T::length != 7");
check::done();
?>