Data update
This commit is contained in:
parent
29a5eea0d4
commit
5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions
|
|
@ -0,0 +1,21 @@
|
|||
module test {
|
||||
@Inject Console console;
|
||||
|
||||
void run(String[] args) {
|
||||
String name = args.empty ? "foo" : args[0];
|
||||
if (val mm := &this.actualType.multimethods.get(name),
|
||||
val m := mm.methods.any(m -> m.ParamTypes.size == 0)) {
|
||||
m.invoke(this, Tuple:());
|
||||
} else {
|
||||
console.print($"No such 0-parameter method: {name.quoted()}");
|
||||
}
|
||||
}
|
||||
|
||||
void foo() {
|
||||
console.print("this is the foo() method");
|
||||
}
|
||||
|
||||
void bar() {
|
||||
console.print("this is the bar() method");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
type MyClass = class
|
||||
public
|
||||
procedure Hello := Write('Hello');
|
||||
end;
|
||||
|
||||
begin
|
||||
var obj := new MyClass;
|
||||
var mi := typeof(MyClass).GetMethod('Hello');
|
||||
mi.Invoke(obj,new object[0])
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue