Now, this is a real broken case

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4374 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2003-02-21 09:12:45 +00:00
commit 1311eb70bb
2 changed files with 49 additions and 25 deletions

View file

@ -7,25 +7,52 @@
%inline %{ %inline %{
struct Engine enum FieldDim {
{ UnaryField,
BinaryField
}; };
struct Object template <FieldDim Dim>
{ class Facet;
virtual bool write(Engine& archive) const = 0;
};
class A : public Object template <FieldDim Dim>
{ struct Base
A(int a = 0)
{ {
} typedef unsigned int size_type;
typedef Facet<Dim>* facet_ptr;
bool write(Engine& archive) const // This works
// virtual Facet<Dim>* set(size_type) = 0;
// This doesn't
virtual facet_ptr set(size_type) = 0;
};
template <FieldDim Dim>
struct Facet
{ {
return true; };
}
};
template <FieldDim Dim>
struct A : Base<Dim>
{
typedef Base<Dim> base;
typedef typename base::size_type size_type;
A(int a = 0)
{
}
Facet<Dim>* set(size_type)
{
return 0;
}
};
%} %}
%template(Base_UF) Base<UnaryField>;
%template(A_UF) A<UnaryField>;

View file

@ -1,11 +1,8 @@
from abstract_typedef2 import * from abstract_typedef2 import *
e = Engine()
a = A() a = A_UF()
if a.write(e) != 1:
raise RuntimeError