diff options
author | Juerg Billeter <j@bitron.ch> | 2008-01-23 15:26:07 +0000 |
---|---|---|
committer | Jürg Billeter <juergbi@src.gnome.org> | 2008-01-23 15:26:07 +0000 |
commit | 92a2bd696c9d174bbd579b44ea6823a88bef9a97 (patch) | |
tree | 71a7d7ef5efb4ad8e5dcf90f922f5861e3c7ec57 /vala/valaifstatement.vala | |
parent | d8d589fb944d1991dd9feca866b90dac3ac52377 (diff) | |
download | vala-92a2bd696c9d174bbd579b44ea6823a88bef9a97.tar.gz |
build control flow graph, report error for missing return statement in
2008-01-23 Juerg Billeter <j@bitron.ch>
* vala/Makefile.am, vala/valabasicblock.vala, vala/valacfgbuilder.vala,
vala/valadostatement.vala, vala/valaforstatement.vala,
vala/valaifstatement.vala, vala/valamemorymanager.vala,
vala/valamethod.vala, vala/valasemanticanalyzer.vala,
vala/valasymbolresolver.vala, vala/valawhilestatement.vala,
gobject/valaccodegenerator.vala, compiler/valacompiler.vala: build
control flow graph, report error for missing return statement in
non-void methods, and report warning for unreachable code,
fixes bug 508480
* tests/exceptions.vala: add missing return statement
svn path=/trunk/; revision=894
Diffstat (limited to 'vala/valaifstatement.vala')
-rw-r--r-- | vala/valaifstatement.vala | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/vala/valaifstatement.vala b/vala/valaifstatement.vala index b12916a9c..237a00edd 100644 --- a/vala/valaifstatement.vala +++ b/vala/valaifstatement.vala @@ -1,6 +1,6 @@ /* valaifstatement.vala * - * Copyright (C) 2006-2007 Jürg Billeter + * Copyright (C) 2006-2008 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 @@ -67,6 +67,10 @@ public class Vala.IfStatement : CodeNode, Statement { } public override void accept (CodeVisitor! visitor) { + visitor.visit_if_statement (this); + } + + public override void accept_children (CodeVisitor! visitor) { condition.accept (visitor); visitor.visit_end_full_expression (condition); @@ -75,8 +79,6 @@ public class Vala.IfStatement : CodeNode, Statement { if (false_statement != null) { false_statement.accept (visitor); } - - visitor.visit_if_statement (this); } public override void replace_expression (Expression! old_node, Expression! new_node) { |