implementing method defintion outside the class definition block
This commit is contained in:
@ -21,3 +21,19 @@ defclass X :: B | a b | {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
---
|
||||
|
||||
defclass X {
|
||||
defun :* xxx() {
|
||||
return X;
|
||||
}
|
||||
defun :* qqq() {
|
||||
return "hello"
|
||||
}
|
||||
|
||||
defun String:length() { ##ERROR: syntax error - class name prohibited
|
||||
return (str.length self)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user