Fix templated constructors regression
Templated constructors were incorrectly ignored because SWIG thought they were methods without a return type. Regression introduced in swig-3.0.0 Closes #245.
This commit is contained in:
parent
9cbdf69fdc
commit
ae555c2339
5 changed files with 81 additions and 1 deletions
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
import template_templated_constructors.*;
|
||||
|
||||
public class template_templated_constructors_runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("template_templated_constructors");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String argv[]) {
|
||||
TConstructor1 t1 = new TConstructor1(123);
|
||||
TConstructor2 t2a = new TConstructor2();
|
||||
TConstructor2 t2b = new TConstructor2(123);
|
||||
|
||||
TClass1Int tc1 = new TClass1Int(123.4);
|
||||
TClass2Int tc2a = new TClass2Int();
|
||||
TClass2Int tc2b = new TClass2Int(123.4);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue