diff options
author | Jürg Billeter <j@bitron.ch> | 2009-01-17 22:29:47 +0000 |
---|---|---|
committer | Jürg Billeter <juergbi@src.gnome.org> | 2009-01-17 22:29:47 +0000 |
commit | b8bb605f8543ebf9b8003f99aa90379d4bd0b7e8 (patch) | |
tree | 5932f2c1aa143bb03e142492eb9aae0e93845bc7 /vala/valaconstant.vala | |
parent | f2858e484e703d1a551d9249c4035906db6519c1 (diff) | |
download | vala-b8bb605f8543ebf9b8003f99aa90379d4bd0b7e8.tar.gz |
Fix symbol lookup in constant and field initializers, fixes bug 567760
2009-01-17 Jürg Billeter <j@bitron.ch>
* vala/valaconstant.vala:
* vala/valafield.vala:
Fix symbol lookup in constant and field initializers,
fixes bug 567760
svn path=/trunk/; revision=2380
Diffstat (limited to 'vala/valaconstant.vala')
-rw-r--r-- | vala/valaconstant.vala | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/vala/valaconstant.vala b/vala/valaconstant.vala index 555531e29..d8fc272df 100644 --- a/vala/valaconstant.vala +++ b/vala/valaconstant.vala @@ -1,6 +1,6 @@ /* valaconstant.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 @@ -160,6 +160,14 @@ public class Vala.Constant : Member, Lockable { process_attributes (); + var old_source_file = analyzer.current_source_file; + var old_symbol = analyzer.current_symbol; + + if (source_reference != null) { + analyzer.current_source_file = source_reference.file; + } + analyzer.current_symbol = this; + type_reference.check (analyzer); if (!external_package) { @@ -173,6 +181,9 @@ public class Vala.Constant : Member, Lockable { } } + analyzer.current_source_file = old_source_file; + analyzer.current_symbol = old_symbol; + return !error; } } |