mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 17:03:32 +03:00
Warning exports InteropLibrary which delegates to value.
With the exception of toDisplayString message.
This commit is contained in:
parent
7fa2022b8c
commit
f0dae474df
@ -20,8 +20,9 @@ import org.enso.interpreter.runtime.library.dispatch.TypesLibrary;
|
||||
|
||||
@Builtin(pkg = "error", stdlibName = "Standard.Base.Warning.Warning")
|
||||
@ExportLibrary(TypesLibrary.class)
|
||||
@ExportLibrary(value = InteropLibrary.class, delegateTo = "value")
|
||||
public final class Warning extends EnsoObject {
|
||||
private final Object value;
|
||||
final Object value;
|
||||
private final Object origin;
|
||||
private final long sequenceId;
|
||||
|
||||
@ -106,6 +107,12 @@ public final class Warning extends EnsoObject {
|
||||
return map;
|
||||
}
|
||||
|
||||
@ExportMessage
|
||||
@Override
|
||||
public Object toDisplayString(boolean enableSideEffects) {
|
||||
return toString();
|
||||
}
|
||||
|
||||
@CompilerDirectives.TruffleBoundary
|
||||
@Override
|
||||
public String toString() {
|
||||
|
Loading…
Reference in New Issue
Block a user