From: Jürg Billeter Date: Sat, 17 Jan 2009 22:42:25 +0000 (+0000) Subject: Add missing include for enum values, fixes bug 531724 X-Git-Tag: VALA_0_5_6~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82ce147893ed3cea9768b04084c5dea2648e8ae9;p=thirdparty%2Fvala.git Add missing include for enum values, fixes bug 531724 2009-01-17 Jürg Billeter * vala/valaenumvalue.vala: * vala/valasourcefile.vala: Add missing include for enum values, fixes bug 531724 svn path=/trunk/; revision=2381 --- diff --git a/ChangeLog b/ChangeLog index b9801f7d9..89b53f262 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-01-17 Jürg Billeter + + * vala/valaenumvalue.vala: + * vala/valasourcefile.vala: + + Add missing include for enum values, fixes bug 531724 + 2009-01-17 Jürg Billeter * vala/valaconstant.vala: diff --git a/vala/valaenumvalue.vala b/vala/valaenumvalue.vala index 2e9abd236..e77d7af4a 100644 --- a/vala/valaenumvalue.vala +++ b/vala/valaenumvalue.vala @@ -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 @@ public class Vala.EnumValue : Symbol { 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; diff --git a/vala/valasourcefile.vala b/vala/valasourcefile.vala index cd511916d..51466a68a 100644 --- a/vala/valasourcefile.vala +++ b/vala/valasourcefile.vala @@ -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 @@ public class Vala.SourceFile { 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 ||