mirror of
https://github.com/enso-org/enso.git
synced 2024-11-22 03:32:23 +03:00
make it okay to miss a method pointer - just return null
This commit is contained in:
parent
3e78eb7daa
commit
8d060ca3d0
@ -138,8 +138,9 @@ public abstract class BuildScopeFromModuleAlgorithm<
|
||||
MetadataInteropHelpers.getMetadataOrNull(
|
||||
typePointerOpt.get(), MethodDefinitions$.MODULE$, BindingsMap.Resolution.class);
|
||||
if (metadata == null) {
|
||||
throw new IllegalStateException(
|
||||
"Failed to resolve type pointer for method: " + method.methodReference().showCode());
|
||||
logger.debug(
|
||||
"Failed to resolve type pointer for method: {}", method.methodReference().showCode());
|
||||
return null;
|
||||
}
|
||||
|
||||
return switch (metadata.target()) {
|
||||
|
@ -317,30 +317,32 @@ class IrToTruffle(
|
||||
.flatMap(sig => getContext(sig.signature))
|
||||
|
||||
val cons = getTypeAssociatedWithMethod(method)
|
||||
val fullMethodDefName =
|
||||
cons.getName ++ Constants.SCOPE_SEPARATOR ++ method.methodName.name
|
||||
val expressionProcessor = new ExpressionProcessor(
|
||||
fullMethodDefName,
|
||||
() => scopeInfo().graph,
|
||||
() => scopeInfo().graph.rootScope,
|
||||
dataflowInfo,
|
||||
fullMethodDefName,
|
||||
frameInfo
|
||||
)
|
||||
if (cons != null) {
|
||||
val fullMethodDefName =
|
||||
cons.getName ++ Constants.SCOPE_SEPARATOR ++ method.methodName.name
|
||||
val expressionProcessor = new ExpressionProcessor(
|
||||
fullMethodDefName,
|
||||
() => scopeInfo().graph,
|
||||
() => scopeInfo().graph.rootScope,
|
||||
dataflowInfo,
|
||||
fullMethodDefName,
|
||||
frameInfo
|
||||
)
|
||||
|
||||
scopeBuilder.registerMethod(
|
||||
cons,
|
||||
method.methodName.name,
|
||||
() => {
|
||||
buildFunction(
|
||||
method,
|
||||
effectContext,
|
||||
cons,
|
||||
fullMethodDefName,
|
||||
expressionProcessor
|
||||
)
|
||||
}
|
||||
)
|
||||
scopeBuilder.registerMethod(
|
||||
cons,
|
||||
method.methodName.name,
|
||||
() => {
|
||||
buildFunction(
|
||||
method,
|
||||
effectContext,
|
||||
cons,
|
||||
fullMethodDefName,
|
||||
expressionProcessor
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override protected def processTypeDefinition(typ: Definition.Type): Unit = {
|
||||
|
Loading…
Reference in New Issue
Block a user