Descriptionruntime: make SetFinalizer(x, f) accept any f for which f(x) is valid
Originally the requirement was f(x) where f's argument is
exactly x's type.
CL 11858043 relaxed the requirement in a non-standard
way: f's argument must be exactly x's type or interface{}.
If we're going to relax the requirement, it should be done
in a way consistent with the rest of Go. This CL allows f's
argument to have any type for which x is assignable;
that's the same requirement the compiler would impose
if compiling f(x) directly.
Fixes issue 5368.
Patch Set 1 #Patch Set 2 : diff -r 827764ef09ec https://code.google.com/p/go/ #
Total comments: 9
Patch Set 3 : diff -r 28ca5af9a0d2 https://code.google.com/p/go/ #
MessagesTotal messages: 10
|