[Vala] bug: async method containing try-catch clause
- From: Nor Jaidi Tuah <norjaidi tuah ubd edu bn>
- To: vala-list gnome org
- Subject: [Vala] bug: async method containing try-catch clause
- Date: Thu, 05 Aug 2010 15:15:38 +0800
Consider this (never mind that the catch clauses
are unreachable, and there is no async call):
class TryCatchBug {
async void run () {
string text = "";
try {
text = "abc";
}
catch (Error e) {
stderr.printf ("whatever");
}
try {
text = "xyz";
}
catch (Error e) {
stderr.printf ("another whatever");
}
}
public static void main() {
}
}
valac (0.9.2) compiles the above, but the generated c causes
this error:
error: duplicate member ‘e’ <-- c compiler error
Quick fix: just change one of the (Error e) to, say, (Error e2).
Is this a known bug?
hand
Nor Jaidi Tuah
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]