summaryrefslogtreecommitdiff
path: root/vala/valaconstant.vala
diff options
context:
space:
mode:
Diffstat (limited to 'vala/valaconstant.vala')
-rw-r--r--vala/valaconstant.vala5
1 files changed, 4 insertions, 1 deletions
diff --git a/vala/valaconstant.vala b/vala/valaconstant.vala
index 7361f9b06..b805203a0 100644
--- a/vala/valaconstant.vala
+++ b/vala/valaconstant.vala
@@ -118,7 +118,10 @@ public class Vala.Constant : Symbol, Lockable {
if (source_reference != null) {
context.analyzer.current_source_file = source_reference.file;
}
- context.analyzer.current_symbol = this;
+ if (!(parent_symbol is Block)) {
+ // non-local constant
+ context.analyzer.current_symbol = this;
+ }
type_reference.check (context);