Override of properties not working as expected
2 posts
• Page 1 of 1
Override of properties not working as expected
Hi there!
I've encountered a bug, which prohibits to access base properties, which have been overridden in subclasses.
Example:
Calling the getter results in a VALUE ERROR:
Calling the setter results in an infinite loop.
I think that both calls should just delegate to the base functions.
Kind regards,
Tobias
I've encountered a bug, which prohibits to access base properties, which have been overridden in subclasses.
Example:
- Code: Select all
:Class Base
:field private m_test←2
:property test
:access public overridable
∇ r←get
r←m_test
∇
∇ set args
m_test←args.NewValue
∇
:endproperty
:EndClass
:Class Sub : Base
:property test
:access public override
∇ r←get
r←⎕BASE.test
∇
∇ set args
⎕BASE.test←args.NewValue
∇
:endproperty
:EndClass
Calling the getter results in a VALUE ERROR:
- Code: Select all
s←⎕new Sub
s.test
VALUE ERROR
get_test[1] r←⎕BASE.test
Calling the setter results in an infinite loop.
I think that both calls should just delegate to the base functions.
Kind regards,
Tobias
- zaibot.w
- Posts: 6
- Joined: Mon Jun 29, 2020 4:09 pm
Re: Override of properties not working as expected
Hi Tobias,
Thanks for reporting this! We have logged it as 19265 and have been investigating.
Regards,
Vince
Thanks for reporting this! We have logged it as 19265 and have been investigating.
Regards,
Vince
- Vince|Dyalog
- Posts: 431
- Joined: Wed Oct 01, 2008 9:39 am
2 posts
• Page 1 of 1
Return to Object Oriented Programming
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group