Re: [Vala] compiler crash with delegates
- From: Al Thomas <astavale yahoo co uk>
- To: Matthias Berndt <Matthias_Berndt gmx de>, "vala-list gnome org" <vala-list gnome org>
- Subject: Re: [Vala] compiler crash with delegates
- Date: Tue, 17 May 2016 22:38:40 +0000 (UTC)
----- Original Message -----
From: Matthias Berndt <Matthias_Berndt gmx de>
Sent: Tuesday, 17 May 2016, 23:03
Subject: [Vala] compiler crash with delegates
I've written some code that crashes the compiler:
class Foo<T> {
public delegate void del(T t);
public del bla() {
return y => {};
}
}
Clearly this is a compiler bug, but it still makes me wonder: is it *just* a
compiler bug, or is there also something wrong with the code itself?
This could be related to:
https://bugzilla.gnome.org/show_bug.cgi?id=614986
It helps to know what the "crash" is - there will be messages shown that
give an insight into what is going. "Crash" is unfortunately too generic
for a good assessment.
If you are happy getting your hands dirty in C code you can compile with
"valac --ccode" to see what is going on.
As a thought you may want to try:
return (y) => {};
y should be an argument of type T of course. The type is inferred by the compiler.
Al
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]