зеркало из https://github.com/mozilla/pluotsorbet.git
Merge branch 'lazy' into fruit
This commit is contained in:
Коммит
664b62416d
|
@ -342,7 +342,7 @@ Native["java/lang/Class.newInstance0.()Ljava/lang/Object;"] = function() {
|
|||
|
||||
Native["java/lang/Class.newInstance1.(Ljava/lang/Object;)V"] = function(o) {
|
||||
// The following can trigger an unwind.
|
||||
var methodInfo = o.klass.classInfo.getMethodByNameString("<init>", "()V", false);
|
||||
var methodInfo = o.klass.classInfo.getLocalMethodByNameString("<init>", "()V", false);
|
||||
if (!methodInfo) {
|
||||
throw $.newInstantiationException("Can't instantiate classes without a nullary constructor");
|
||||
}
|
||||
|
|
|
@ -1033,6 +1033,11 @@ module J2ME {
|
|||
return this.getMethodByName(cacheUTF8(name), cacheUTF8(signature));
|
||||
}
|
||||
|
||||
// This should only ever be used from code where the name and signature originate from JS strings.
|
||||
getLocalMethodByNameString(name: string, signature: string): MethodInfo {
|
||||
return this.getLocalMethodByName(toUTF8(name), toUTF8(signature));
|
||||
}
|
||||
|
||||
getLocalMethodByName(utf8Name: Uint8Array, utf8Signature: Uint8Array): MethodInfo {
|
||||
var i = this.indexOfMethod(utf8Name, utf8Signature);
|
||||
if (i >= 0) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче