[Go] Fix overloading on an undefined type.
This commit is contained in:
parent
b15a66f2ab
commit
a6a9a89524
3 changed files with 45 additions and 2 deletions
|
|
@ -6,6 +6,10 @@ func main(){
|
|||
t := overload_polymorphic.NewDerived()
|
||||
|
||||
if overload_polymorphic.Test(t) != 0 {
|
||||
panic("failed")
|
||||
panic("failed 1")
|
||||
}
|
||||
|
||||
if overload_polymorphic.Test2(t) != 1 {
|
||||
panic("failed 2")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,4 +19,8 @@ public:
|
|||
int test(Base* base){ return 0;}
|
||||
int test(int hello){ return 1; }
|
||||
|
||||
class Unknown;
|
||||
int test2(Unknown* unknown) { return 0; }
|
||||
int test2(Base* base) { return 1; }
|
||||
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue