Add CHANGES entry and regression test for #676
This commit is contained in:
parent
d3383e254d
commit
d2d2bfa05f
4 changed files with 35 additions and 0 deletions
|
|
@ -7,6 +7,10 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
|
||||||
Version 4.1.0 (in progress)
|
Version 4.1.0 (in progress)
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
2022-01-29: dontpanic92
|
||||||
|
#676 Fix code generated for a C++ class with a non-capitalised
|
||||||
|
name.
|
||||||
|
|
||||||
2022-01-26: trex58
|
2022-01-26: trex58
|
||||||
#1919 #1921 #1923 Various fixes for AIX portability.
|
#1919 #1921 #1923 Various fixes for AIX portability.
|
||||||
|
|
||||||
|
|
|
||||||
18
Examples/test-suite/class_case.i
Normal file
18
Examples/test-suite/class_case.i
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
%module class_case
|
||||||
|
|
||||||
|
// Regression test for SWIG/Go bug #676
|
||||||
|
|
||||||
|
%inline %{
|
||||||
|
|
||||||
|
class ClassA {};
|
||||||
|
|
||||||
|
class classB {};
|
||||||
|
class classB2 : public classB {};
|
||||||
|
|
||||||
|
int Test1(ClassA* a) { return 1; }
|
||||||
|
int Test1(int i) { return 0; }
|
||||||
|
|
||||||
|
int Test2(classB* a) { return 1; }
|
||||||
|
int Test2(int i) { return 0; }
|
||||||
|
|
||||||
|
%}
|
||||||
|
|
@ -134,6 +134,7 @@ CPP_TEST_CASES += \
|
||||||
char_binary \
|
char_binary \
|
||||||
char_strings \
|
char_strings \
|
||||||
chartest \
|
chartest \
|
||||||
|
class_case \
|
||||||
class_scope_namespace \
|
class_scope_namespace \
|
||||||
class_forward \
|
class_forward \
|
||||||
class_ignore \
|
class_ignore \
|
||||||
|
|
|
||||||
12
Examples/test-suite/go/class_case_runme.go
Normal file
12
Examples/test-suite/go/class_case_runme.go
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import . "swigtests/class_case"
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
b2 := NewClassB2()
|
||||||
|
// This used to fail with:
|
||||||
|
// panic: interface conversion: interface {} is class_case.SwigcptrClassB2, not int
|
||||||
|
if Test2(b2) != 1 {
|
||||||
|
panic("Unexpected overload used")
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue