Re: [Vala] Incorrect C code generated
- From: Abderrahim Kitouni <a kitouni gmail com>
- To: Dmitry Golovin <dima golovin in>, list vala <vala-list gnome org>
- Subject: Re: [Vala] Incorrect C code generated
- Date: Tue, 22 Mar 2016 20:41:28 +0000
Hi
Le mar 22 mars 2016 20:37, Dmitry Golovin <dima golovin in> a écrit :
Hello!
Discussed today on the IRC channel, also posting it to the mailing list.
I don't know if it is a vala bug or I am just using things incorrectly.
Here is my code:
struct N {
int i;
}
class ClassA : Object {
public N a { get; set; }
public ClassA(N a) {
this.a = a;
}
}
class ClassB : Object {
public Value b { get; set; }
public ClassB(Value b) {
this.b = b;
}
}
class Main {
static void main() {
var a = new ClassA({ 1 });
var b = new ClassB(a.a);
b.notify["b"].connect((obj, prop) => { a.a = (N)b.b; });
A random idea: try casting to (N?) instead.
HTH
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]