Add static method support to methodmaps.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
native printnum(t);
|
||||
|
||||
methodmap X
|
||||
{
|
||||
public int GetThing() {
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
|
||||
public main() {
|
||||
printnum(X.GetThing());
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
(11) : error 176: non-static method or property 'GetThing' must be called with a value of type 'X'
|
||||
@@ -0,0 +1,13 @@
|
||||
native printnum(t);
|
||||
|
||||
methodmap X
|
||||
{
|
||||
public static int GetThing() {
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
|
||||
public main() {
|
||||
X x;
|
||||
printnum(x.GetThing());
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
(12) : error 177: static method 'GetThing' must be invoked via its type (try 'X.GetThing')
|
||||
@@ -0,0 +1,12 @@
|
||||
native printnum(t);
|
||||
|
||||
methodmap X
|
||||
{
|
||||
public static int GetThing() {
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
|
||||
public main() {
|
||||
printnum(X.GetThing());
|
||||
}
|
||||
Reference in New Issue
Block a user