fixed the method lookup bug in exec.c
This commit is contained in:
@ -304,7 +304,6 @@
|
||||
{
|
||||
self class cannotInstantiate
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#class Object(Apex)
|
||||
|
@ -19,7 +19,8 @@
|
||||
|
||||
|
||||
## ########################################################################
|
||||
## most of the following methods can actuall become class methods of Apex.
|
||||
## most of the following methods can actually become class methods of Apex.
|
||||
## if the instance varibles can be made accessible from the Apex class.
|
||||
## ########################################################################
|
||||
|
||||
#method name
|
||||
|
@ -1,17 +1,18 @@
|
||||
#class(#word) Stdio(Object)
|
||||
{
|
||||
|
||||
#method(#class) new: size
|
||||
{
|
||||
##self prohibited
|
||||
##raise exception. prohibited...
|
||||
^nil.
|
||||
^(super new: 1)
|
||||
}
|
||||
|
||||
#method(#class) new
|
||||
{
|
||||
##self prohibited
|
||||
##raise exception. prohibited...
|
||||
^nil.
|
||||
^(super new: 1)
|
||||
}
|
||||
|
||||
#method(#class) open: name for: mode
|
||||
@ -35,6 +36,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
#class(#word) Stdio2 (Stdio)
|
||||
#class(#word) Stdio2(Stdio)
|
||||
{
|
||||
#method(#class) new
|
||||
{
|
||||
##self prohibited
|
||||
##raise exception. prohibited...
|
||||
^(super new).
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -124,9 +124,12 @@
|
||||
System logNl: S'\0\0\0END OF MAIN\0AB\0\0\0C\0\0\0'.
|
||||
|
||||
|
||||
v1 := Stdio open: '/tmp/1.txt' for: 'w+'.
|
||||
##v1 := Stdio2 open: '/tmp/1.txt' for: 'w+'.
|
||||
v1 := Stdio2 new open: '/tmp/1.txt' for: 'w+'.
|
||||
v1 xxx.
|
||||
v1 close.
|
||||
nil isNil ifTrue: [ 'NIL NIL NIL' dump. ].
|
||||
(Apex new) notNil ifTrue: [ 'APEX NIL NIL NIL' dump. ].
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user