Hi Luca,
Example attached. Output (compiled with valac 0.24) is:
ReaderState start: k 0x2233030
(process:28945): GLib-GObject-WARNING **: cannot retrieve class for invalid
(unclassed) type '(null)'
ReaderState end: k 0x2233030 this.kl: (nil)
klass: 0x2233030 r.kl: (nil)
Set_state start r.kl (nil)
Set_state end k: (nil), r.kl (nil)
196, 0x2233030 : 196, (nil)
After doing this I installed 0.25.3, which provides hints by way of
compilation errors:
t7.vala:10.17-10.17: error: duplicating TypeClass instance, use unowned
variable or explicitly invoke copy method
this.kl = k;
^
** (valac:29749): CRITICAL **:
vala_ccode_assignment_module_real_store_field: assertion 'value != NULL'
failed
t7.vala:18.9-18.12: error: duplicating TypeClass instance, use unowned
variable or explicitly invoke copy method
k = r.kl;
^^^^
** (valac:29749): CRITICAL **:
vala_ccode_assignment_module_real_store_parameter: assertion '_value !=
NULL' failed
Compilation failed: 2 error(s), 0 warning(s)
So perhaps that resolves the problem.
Regards,
Andrew Lees.
On Fri, Sep 12, 2014 at 5:41 PM, Luca Bruno <lethalman88 gmail com> wrote:
On 12/09/2014 02:31, Andy Lees wrote:Greetings, I have a data type used to store parser state declared as: class ReaderState { public Object obj; public bool in_array; public Type type; public TypeClass kl; public ReaderState (Object o, bool a, Type t, TypeClass k) { this.obj = o; this.in_array = a; this.type = t; this.klass = k; } }Can you please provide a self-contained test case with a main() that I can compile and run? _______________________________________________ vala-list mailing list vala-list gnome org https://mail.gnome.org/mailman/listinfo/vala-list
Attachment:
t7.vala
Description: Text Data