[vala/0.6] Remove result variable warning



commit d571a7ba725d53981601b64ba2eff79d2c0a250e
Author: Jürg Billeter <j bitron ch>
Date:   Fri Apr 10 16:16:19 2009 +0200

    Remove result variable warning
    
    Implicit result variable not planned for Vala 1.0.
---
 vala/valalocalvariable.vala |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/vala/valalocalvariable.vala b/vala/valalocalvariable.vala
index cdc9b3a..a0e0014 100644
--- a/vala/valalocalvariable.vala
+++ b/vala/valalocalvariable.vala
@@ -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)) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]