[vala] Do not depend on declaration order for constants
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Do not depend on declaration order for constants
- Date: Sat, 5 Jun 2010 12:08:41 +0000 (UTC)
commit 785c538f95b1fd0d63def6de41204d63a481c075
Author: Jürg Billeter <j bitron ch>
Date: Sat Jun 5 14:07:23 2010 +0200
Do not depend on declaration order for constants
Fixes bug 618890.
codegen/valaccodememberaccessmodule.vala | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodememberaccessmodule.vala b/codegen/valaccodememberaccessmodule.vala
index f21113e..6143a4f 100644
--- a/codegen/valaccodememberaccessmodule.vala
+++ b/codegen/valaccodememberaccessmodule.vala
@@ -175,7 +175,9 @@ public class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
} else if (expr.symbol_reference is Constant) {
var c = (Constant) expr.symbol_reference;
- generate_constant_declaration (c, source_declarations);
+ generate_constant_declaration (c, source_declarations,
+ c.source_reference != null && expr.source_reference != null &&
+ c.source_reference.file == expr.source_reference.file);
string fn = c.get_full_name ();
if (fn == "GLib.Log.FILE") {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]