September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
12
Task/Polymorphic-copy/OoRexx/polymorphic-copy.rexx
Normal file
12
Task/Polymorphic-copy/OoRexx/polymorphic-copy.rexx
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
s = .s~new
|
||||
s2 = s~copy -- makes a copy of the first
|
||||
if s == s2 then say "copy didn't work!"
|
||||
if s2~name == "S" then say "polymorphic copy worked"
|
||||
|
||||
::class t
|
||||
::method name
|
||||
return "T"
|
||||
|
||||
::class s subclass t
|
||||
::method name
|
||||
return "S"
|
||||
Loading…
Add table
Add a link
Reference in a new issue