async_call.call = new CCodeMemberAccess.pointer (vcast, get_ccode_vfunc_name (m));
finish_call.call = new CCodeMemberAccess.pointer (vcast, get_ccode_finish_vfunc_name (m));
}
+ } else if (m != null && m.get_attribute ("NoWrapper") != null && m.binding == MemberBinding.INSTANCE && !(m is CreationMethod)) {
+ var instance_value = ma.inner.target_value;
+ if ((ma.member_name == "begin" || ma.member_name == "end") && ma.inner.symbol_reference == ma.symbol_reference) {
+ var inner_ma = (MemberAccess) ma.inner;
+ instance_value = inner_ma.inner.target_value;
+ }
+ var pub_inst = get_cvalue_ (instance_value);
+
+ CCodeFunctionCall? vcast = null;
+ if (m.parent_symbol is Class) {
+ unowned Class base_class = (Class) m.parent_symbol;
+ vcast = new CCodeFunctionCall (new CCodeIdentifier (get_ccode_type_get_function (base_class)));
+ vcast.add_argument (pub_inst);
+ } else if (m.parent_symbol is Interface) {
+ unowned Interface base_iface = (Interface) m.parent_symbol;
+ vcast = new CCodeFunctionCall (new CCodeIdentifier (get_ccode_type_get_function (base_iface)));
+ vcast.add_argument (pub_inst);
+ }
+ if (vcast != null) {
+ async_call.call = new CCodeMemberAccess.pointer (vcast, get_ccode_vfunc_name (m));
+ finish_call.call = new CCodeMemberAccess.pointer (vcast, get_ccode_finish_vfunc_name (m));
+ }
}
if (ma.member_name == "begin" && ma.inner.symbol_reference == ma.symbol_reference) {
asynchronous/constructor-argument-check.vala \
asynchronous/finish-name.vala \
asynchronous/generator.vala \
+ asynchronous/nowrapper.vala \
asynchronous/out-parameter-free-on-error.vala \
asynchronous/out-parameter-invalid.test \
asynchronous/params-array-invalid.test \
--- /dev/null
+interface IFoo : Object {
+ [NoWrapper]
+ public abstract async int manam ();
+}
+
+class Foo : Object, IFoo {
+ [NoWrapper]
+ public virtual async int bar () {
+ return 23;
+ }
+
+ public async int manam () {
+ return 42;
+ }
+}
+
+MainLoop loop;
+
+void main () {
+ loop = new MainLoop ();
+
+ var foo = new Foo ();
+ foo.bar.begin ((o,r) => {
+ assert (foo.bar.end (r) == 23);
+ });
+ foo.manam.begin ((o,r) => {
+ assert (foo.manam.end (r) == 42);
+ loop.quit ();
+ });
+
+ loop.run ();
+}