diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-11-17 12:49:11 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-11-17 12:49:11 +0100 |
commit | 30008bf3607cf98cf2221cb8532aa97a167a7542 (patch) | |
tree | fe531094626a2c591693a13907d97cc58b32c24e /vala/valaconstructor.vala | |
parent | 8af4e4911f4e1b445b0630576ab6255479ae8e3b (diff) | |
download | vala-30008bf3607cf98cf2221cb8532aa97a167a7542.tar.gz |
vala: scope "owner" of constructor/destructor subroutines is already set
Diffstat (limited to 'vala/valaconstructor.vala')
-rw-r--r-- | vala/valaconstructor.vala | 5 |
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; } |