Re: [Vala] Delegates in generic classes
- From: Michael 'Mickey' Lauer <mickey vanille-media de>
- To: Abderrahim Kitouni <a kitouni gmail com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Delegates in generic classes
- Date: Wed, 20 Jan 2010 19:38:45 +0100
Thanks Abderrahim,
public class GenericClass<T>
{
private Callback<T> cb;
public GenericClass(Callback<T> cb)
{
this.cb = cb;
}
}
this works so far, but I can't seem to add a method that actually calls
the callback, e.g. adding
public void callit()
{
this.cb<T>( new T() );
}
leads to an assertion at compile time:
ERROR:valasemanticanalyzer.c:2737:vala_semantic_analyzer_get_actual_type: assertion failed: (instance_type !=
NULL)
Aborted
:M:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]