The kwargs feature no longer turns on compactdefaultargs for languages that don't support kwargs.
Affects all languages except Python and Ruby. Closes #242
This commit is contained in:
parent
b57a675d00
commit
bfde148887
14 changed files with 72 additions and 21 deletions
23
Examples/test-suite/java/kwargs_feature_runme.java
Normal file
23
Examples/test-suite/java/kwargs_feature_runme.java
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import kwargs_feature.*;
|
||||
|
||||
public class kwargs_feature_runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("kwargs_feature");
|
||||
} 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[]) {
|
||||
// Check normal overloading still works (no compactdefaultargs) if the kwargs feature is used,
|
||||
// as the kwargs feature is not supported
|
||||
Foo f = new Foo(99);
|
||||
if (f.foo() != 1)
|
||||
throw new RuntimeException("It went wrong");
|
||||
if (Foo.statfoo(2) != 2)
|
||||
throw new RuntimeException("It went wrong");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue