Data update

This commit is contained in:
Ingy döt Net 2024-07-13 15:19:22 -07:00
parent 29a5eea0d4
commit 5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions

View file

@ -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");
}
}

View file

@ -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.