]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Revert "vala: Fix result var for pre/post conditions"
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 13 Apr 2019 19:02:05 +0000 (21:02 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Fri, 19 Apr 2019 13:25:24 +0000 (15:25 +0200)
This reverts commit 6e8b22fb9e9d3cecc6e1501911ea55ef66b48b9f.

vala/valasubroutine.vala

index 14e2b963b491111203f643b108a32d28e7036168..0ef8bf333008497445406ae0f617bd03e744a904 100644 (file)
@@ -32,20 +32,10 @@ public abstract class Vala.Subroutine : Symbol {
        /**
         * Specifies the generated `result` variable for postconditions.
         */
-       public LocalVariable result_var {
-               get { return _result_var; }
-               set {
-                       _result_var = value;
-                       if (_result_var != null) {
-                               scope.add ("result", _result_var);
-                       }
-               }
-       }
+       public LocalVariable result_var { get; set; }
 
        public abstract bool has_result { get; }
 
-       private LocalVariable _result_var;
-
        protected Subroutine (string? name, SourceReference? source_reference, Comment? comment = null) {
                base (name, source_reference, comment);
        }