зеркало из https://github.com/mozilla/pluotsorbet.git
Merge pull request #36 from mykmelez/undeclared-method-invocation
throw error if method ref to resolve not declared in class
This commit is contained in:
Коммит
714f57c4d2
4
vm.js
4
vm.js
|
@ -134,6 +134,10 @@ VM.execute = function(ctx) {
|
|||
var methodName = cp[cp[constant.name_and_type_index].name_index].bytes;
|
||||
var signature = cp[cp[constant.name_and_type_index].signature_index].bytes;
|
||||
constant = CLASSES.getMethod(classInfo, methodName, signature, op === 0xb8, op !== 0xb8);
|
||||
if (!constant) {
|
||||
ctx.raiseException("java/lang/RuntimeException",
|
||||
classInfo.className + "." + methodName + "." + signature + " not found");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new Error("not support constant type");
|
||||
|
|
Загрузка…
Ссылка в новой задаче