[OCaml] Some %typecheck precedence tweaks
Fix warnings in overload_numeric.i. ./../overload_numeric.i:36: Warning 509: Overloaded method Nums::over(short) effectively ignored, ./../overload_numeric.i:33: Warning 509: as it is shadowed by Nums::over(signed char). ./../overload_numeric.i:39: Warning 509: Overloaded method Nums::over(int) effectively ignored, ./../overload_numeric.i:33: Warning 509: as it is shadowed by Nums::over(signed char). Add overload_numeric_runme.ml.
This commit is contained in:
parent
d8478d671d
commit
d5afcab9a6
2 changed files with 27 additions and 8 deletions
14
Examples/test-suite/ocaml/overload_numeric_runme.ml
Normal file
14
Examples/test-suite/ocaml/overload_numeric_runme.ml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
open Swig
|
||||
open Overload_numeric
|
||||
|
||||
let _ =
|
||||
let n = new_Nums '() in
|
||||
let arg = C_char 'c' in
|
||||
assert (n -> over (arg) as string = "signed char");
|
||||
let arg = C_short 2 in
|
||||
assert (n -> over (arg) as string = "short");
|
||||
assert (n -> over (2) as string = "int");
|
||||
let arg = C_float 2. in
|
||||
assert (n -> over (arg) as string = "float");
|
||||
assert (n -> over (2.) as string = "double")
|
||||
;;
|
||||
Loading…
Add table
Add a link
Reference in a new issue