summaryrefslogtreecommitdiff
path: root/vala/valasymbolresolver.vala
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2009-10-02 23:46:29 +0200
committerJürg Billeter <j@bitron.ch>2009-10-02 23:46:29 +0200
commit2dda5192f775543bbd49494934f4d5c54cd45af1 (patch)
treeb5e9324d882c14d360ac0e6e789d8a2d46d513d6 /vala/valasymbolresolver.vala
parent8b0431b4d115af68f07a7eadc6867333d700b2ad (diff)
downloadvala-2dda5192f775543bbd49494934f4d5c54cd45af1.tar.gz
Fix generated code for stack-allocated arrays
Fixes bug 595751.
Diffstat (limited to 'vala/valasymbolresolver.vala')
-rw-r--r--vala/valasymbolresolver.vala7
1 files changed, 6 insertions, 1 deletions
diff --git a/vala/valasymbolresolver.vala b/vala/valasymbolresolver.vala
index 213bd5318..09a9c19cc 100644
--- a/vala/valasymbolresolver.vala
+++ b/vala/valasymbolresolver.vala
@@ -350,7 +350,12 @@ public class Vala.SymbolResolver : CodeVisitor {
public override void visit_local_variable (LocalVariable local) {
local.accept_children (this);
if (local.variable_type is ReferenceType) {
- local.variable_type.nullable = true;
+ var array_type = local.variable_type as ArrayType;
+ if (array_type != null && array_type.fixed_length) {
+ // local fixed length arrays are not nullable
+ } else {
+ local.variable_type.nullable = true;
+ }
}
}