[Go] Fix overloading on an undefined type.

This commit is contained in:
Ian Lance Taylor 2015-03-06 17:51:30 -08:00
commit a6a9a89524
3 changed files with 45 additions and 2 deletions

View file

@ -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")
}
}

View file

@ -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; }
%}