generator: Fix misleading warning for callbacks in virtual methods

Wen generating a virtual method, the current member was not set in the
GenerationInfo. That caused the warning message about the callback scope
to refer to a wrong method name.
This commit is contained in:
Bertrand Lorentz 2012-11-15 15:06:07 +01:00
parent 3cce546661
commit fdd1b201f7

View File

@ -54,6 +54,8 @@ namespace GtkSharp.Generation {
public void Generate (GenerationInfo gen_info, ObjectBase implementor)
{
gen_info.CurrentMember = Name;
if (!CanGenerate (gen_info, implementor))
throw new NotSupportedException (String.Format ("Cannot generate virtual method {0}.{1}. Make sure a writable glue path was provided to the generator.", container_type.Name, this.CallString));