summaryrefslogtreecommitdiff
path: root/vala/valaconstructor.vala
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2019-11-17 12:49:11 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2019-11-17 12:49:11 +0100
commit30008bf3607cf98cf2221cb8532aa97a167a7542 (patch)
treefe531094626a2c591693a13907d97cc58b32c24e /vala/valaconstructor.vala
parent8af4e4911f4e1b445b0630576ab6255479ae8e3b (diff)
downloadvala-30008bf3607cf98cf2221cb8532aa97a167a7542.tar.gz
vala: scope "owner" of constructor/destructor subroutines is already set
Diffstat (limited to 'vala/valaconstructor.vala')
-rw-r--r--vala/valaconstructor.vala5
1 files changed, 2 insertions, 3 deletions
diff --git a/vala/valaconstructor.vala b/vala/valaconstructor.vala
index ae8f19e8d..4195da9ea 100644
--- a/vala/valaconstructor.vala
+++ b/vala/valaconstructor.vala
@@ -67,10 +67,9 @@ public class Vala.Constructor : Subroutine {
checked = true;
- this_parameter = new Parameter ("this", new ObjectType (context.analyzer.current_class));
+ this_parameter = new Parameter ("this", new ObjectType ((ObjectTypeSymbol) parent_symbol));
scope.add (this_parameter.name, this_parameter);
- owner = context.analyzer.current_symbol.scope;
context.analyzer.current_symbol = this;
if (body != null) {
@@ -85,7 +84,7 @@ public class Vala.Constructor : Subroutine {
}
}
- context.analyzer.current_symbol = context.analyzer.current_symbol.parent_symbol;
+ context.analyzer.current_symbol = parent_symbol;
return !error;
}