Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test-suite: import_nomodule.i fails #98

Open
KrisThielemans opened this issue Sep 15, 2021 · 0 comments
Open

test-suite: import_nomodule.i fails #98

KrisThielemans opened this issue Sep 15, 2021 · 0 comments

Comments

@KrisThielemans
Copy link

swig -Wall -python -c++ .\import_nomodule.i
.\import_nomodule.i(37) : Warning 401: Base class 'Foo' ignored - unknown module name for base. Either import the appropriate module interface file or specify the name of the module in the %import directive.

@wsfulton answered on the mailing list

Looks like it is testing partially provided type information. This is something that SWIG does support (unlike a C++ compiler). In this case, the %import provides the appropriate type information in order for the runtime system to work fairly well. That is, the test1 function:

void test1(Foo*, Integer);

will accept a Bar * (Bar is derived from Foo) even though there are no proxy classes generated for this class hierarchy. This works in the scripting languages that support the SWIG runtime system, but cannot work for the statically typed languages (like Java) because there is no SWIG runtime system in these languages. Whether or not this test should be supported for MATLAB does of course depend on whether or not MATLAB has implemented the SWIG runtime system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant