]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Remove result variable warning
authorJürg Billeter <j@bitron.ch>
Fri, 10 Apr 2009 14:16:19 +0000 (16:16 +0200)
committerJürg Billeter <j@bitron.ch>
Fri, 10 Apr 2009 14:16:19 +0000 (16:16 +0200)
Implicit result variable not planned for Vala 1.0.

vala/valalocalvariable.vala

index 9fce2c2c984d0baa22fc8878eb050163de6481e0..7502551d52d454d1006b0799462413b1c32498c2 100644 (file)
@@ -142,16 +142,6 @@ public class Vala.LocalVariable : Symbol {
                        initializer.target_type = variable_type;
                }
 
-               if (name == "result") {
-                       // warn if type of `result' variable is incompatible with return type
-                       // as an implicit `result' variable might be introduced to be used
-                       // by Vala postconditions and implicit checks generated by the code generated
-                       if (analyzer.current_return_type == null
-                           || !variable_type.compatible (analyzer.current_return_type)) {
-                               Report.warning (source_reference, "result variable type incompatible with return type");
-                       }
-               }
-
                if (initializer != null) {
                        if (initializer.value_type == null) {
                                if (!(initializer is MemberAccess) && !(initializer is LambdaExpression)) {