diff --git a/eo-runtime/src/main/java/EOorg/EOeolang/EOrust.java b/eo-runtime/src/main/java/EOorg/EOeolang/EOrust.java index e89b83d37b..66ad9fd061 100644 --- a/eo-runtime/src/main/java/EOorg/EOeolang/EOrust.java +++ b/eo-runtime/src/main/java/EOorg/EOeolang/EOrust.java @@ -135,6 +135,14 @@ public EOrust(final Phi sigma) { name ) ).getDeclaredMethod(name, EOrust.class); + if (method.getReturnType() != byte[].class) { + throw new ExFailure( + "Return type of %s is %s, required %s", + method, + method.getReturnType(), + byte[].class + ); + } return EOrust.translate( (byte[]) method.invoke(null, this) );