vala r2381 - in trunk: . vala



Author: juergbi
Date: Sat Jan 17 22:42:25 2009
New Revision: 2381
URL: http://svn.gnome.org/viewvc/vala?rev=2381&view=rev

Log:
2009-01-17  JÃrg Billeter  <j bitron ch>

	* vala/valaenumvalue.vala:
	* vala/valasourcefile.vala:

	Add missing include for enum values, fixes bug 531724


Modified:
   trunk/ChangeLog
   trunk/vala/valaenumvalue.vala
   trunk/vala/valasourcefile.vala

Modified: trunk/vala/valaenumvalue.vala
==============================================================================
--- trunk/vala/valaenumvalue.vala	(original)
+++ trunk/vala/valaenumvalue.vala	Sat Jan 17 22:42:25 2009
@@ -1,6 +1,6 @@
 /* valaenumvalue.vala
  *
- * Copyright (C) 2006-2008  JÃrg Billeter
+ * Copyright (C) 2006-2009  JÃrg Billeter
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -140,6 +140,12 @@
 
 		if (value != null) {
 			value.check (analyzer);
+
+			// ensure to include dependency in header file as well if necessary
+			if (!parent_symbol.is_internal_symbol ()
+			    &&value is MemberAccess && value.symbol_reference != null) {
+				analyzer.current_source_file.add_symbol_dependency (value.symbol_reference, SourceFileDependencyType.HEADER_SHALLOW);
+			}
 		}
 
 		return !error;

Modified: trunk/vala/valasourcefile.vala
==============================================================================
--- trunk/vala/valasourcefile.vala	(original)
+++ trunk/vala/valasourcefile.vala	Sat Jan 17 22:42:25 2009
@@ -1,6 +1,6 @@
 /* valasourcefile.vala
  *
- * Copyright (C) 2006-2008  JÃrg Billeter
+ * Copyright (C) 2006-2009  JÃrg Billeter
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -282,7 +282,7 @@
 
 		Symbol s;
 		
-		if (sym is ErrorCode) {
+		if (sym is ErrorCode || sym is EnumValue) {
 			s = sym.parent_symbol;
 		} else if (sym is TypeSymbol ||
 		    sym is Method ||



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]