efl-csharp: Fix self in iface concrete functions

Summary:
It was mistakenly being called as static functions.

Fixes T7619

Test Plan: See attached testcase.

Reviewers: segfaultxavi, bu5hm4n, vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7619

Differential Revision: https://phab.enlightenment.org/D7904
This commit is contained in:
Lauro Moura 2019-02-11 16:53:29 -02:00 committed by Vitor Sousa
parent 133b659b73
commit 9277586fd8
2 changed files with 14 additions and 1 deletions

View File

@ -169,7 +169,7 @@ struct function_definition_generator
// inherited is set in the constructor, true if this instance is from a pure C# class (not generated).
if (do_super && !f.is_static)
self = "(inherited ? Efl.Eo.Globals.efl_super(" + self + ", this.NativeClass) : " + self + ")";
else
else if (f.is_static)
self = name_helpers::klass_get_full_name(f.klass) + "()";
if(!as_generator

View File

@ -369,4 +369,17 @@ class TestConstructors
}
}
class TestInterfaceConcrete
{
// For T7619
public static void test_iface_concrete_methods()
{
var obj = new Dummy.TestObject();
Dummy.TestIface iface = Dummy.TestIfaceConcrete.static_cast(obj);
iface.IfaceProp = 1970;
Test.AssertEquals(iface.IfaceProp, 1970);
}
}
}