Java wrapping mechanism doesn't work, showing the need to use a different way to wrap polymorphic classes. They are two runtime examples: one for java, which is failing, and one for python, which works fine. Detailed description of the case can be found in the three files committed. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5582 626c5289-ae23-0410-ae9c-e8d60b6d4f22
19 lines
290 B
Python
19 lines
290 B
Python
import virtual_poly
|
|
|
|
|
|
d = virtual_poly.NDouble(3.5)
|
|
i = virtual_poly.NInt(2)
|
|
|
|
dc = d.copy()
|
|
ic = i.copy()
|
|
|
|
if d.get() != dc.get():
|
|
raise RuntimeError
|
|
|
|
if i.get() != ic.get():
|
|
raise RuntimeError
|
|
|
|
|
|
ddc = virtual_poly.NDouble_dynamic_cast(dc)
|
|
if d.get() != ddc.get():
|
|
raise RuntimeError
|