mirror of https://github.com/swig/swig
Eliminate use of fn in testcases
Fix cpp11_lambda_functions and rname to use fn1 instead of fn, since fn is a reserved word as of PHP 7.4.
This commit is contained in:
parent
49d923b917
commit
8cd98ec74e
|
@ -56,7 +56,7 @@ auto lambda4 = [](int x, int y) { return x+y; };
|
|||
auto lambda5 = []() { return thing; };
|
||||
#endif
|
||||
|
||||
void fn() {
|
||||
void fn1() {
|
||||
int stuff = 0;
|
||||
auto lambdaxxxx = [=,&stuff]() { return thing; };
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ public class rname_runme {
|
|||
bar.foo_u((long)10);
|
||||
|
||||
RenamedBase base = new RenamedBase();
|
||||
base.fn(base, base, base);
|
||||
base.fn1(base, base, base);
|
||||
if (!base.newname(10.0).equals("Base"))
|
||||
throw new RuntimeException("base.newname");
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
%rename (newname) Space::Base::oldname(double d) const;
|
||||
|
||||
/* Rename derived class method only */
|
||||
%rename (Xfunc) Space::Derived::fn(Base baseValue, Base* basePtr, Base& baseRef);
|
||||
%rename (Xfunc) Space::Derived::fn1(Base baseValue, Base* basePtr, Base& baseRef);
|
||||
|
||||
%inline %{
|
||||
class Bar {
|
||||
|
@ -43,14 +43,14 @@ class Base {
|
|||
public:
|
||||
Base(){};
|
||||
virtual ~Base(){};
|
||||
void fn(Base baseValue, Base* basePtr, Base& baseRef){}
|
||||
void fn1(Base baseValue, Base* basePtr, Base& baseRef){}
|
||||
virtual const char * oldname(double d) const { return "Base"; }
|
||||
};
|
||||
class Derived : public Base {
|
||||
public:
|
||||
Derived(){}
|
||||
~Derived(){}
|
||||
void fn(Base baseValue, Base* basePtr, Base& baseRef){}
|
||||
void fn1(Base baseValue, Base* basePtr, Base& baseRef){}
|
||||
virtual const char * oldname(double d) const { return "Derived"; }
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue