]> 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>
Sun, 12 Apr 2009 16:02:43 +0000 (18:02 +0200)
Implicit result variable not planned for Vala 1.0.

vala/valalocalvariable.vala

index cdc9b3a69f12ef1117d7d4f703c38225fd41aab3..a0e001416f1c53fac24a78cde3f66c31140b3a2c 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)) {