File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
main/kotlin/top/mcfpp/core/lang
test/kotlin/top/mcfpp/test Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ class JavaVar : Var<JavaVar>, MCFPPValue<Any?> {
124
124
throw NullPointerException ()
125
125
}
126
126
try {
127
- val member = value!! ::class .java.getDeclaredMethod (key, * getTypeArray(normalArgs.map { it.type }))
127
+ val member = value!! ::class .java.getMethod (key, * getTypeArray(normalArgs.map { it.type }))
128
128
return Pair (JavaFunction (member, this ), true )
129
129
}catch (e: NoSuchMethodException ){
130
130
LogProcessor .error(" No method '$key ' in $identifier }" )
Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ class MNITest {
14
14
print(qwq::jvm.identifier);
15
15
print(qwq::jvm.sbObject.toString());
16
16
/say ${' $' } {qwq}
17
+ /say ${' $' } {qwq::jvm.toString()}
17
18
/say ${' $' } {qwq::jvm.identifier}
19
+ /say ${' $' } {qwq::jvm.name}
18
20
/say ${' $' } {qwq::jvm.sbObject}
19
21
}
20
22
""" .trimIndent()
You can’t perform that action at this time.
0 commit comments