Skip to content

Commit

Permalink
Revert "Print values even if their to_text returns a non-text method,…
Browse files Browse the repository at this point in the history
… making debugging easier. Also print if warnings are attached."

This reverts commit 20318ee.
  • Loading branch information
radeusgd committed Mar 31, 2023
1 parent 42849e2 commit ae4726b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ Object doPrint(
Object message,
@CachedLibrary(limit = "10") InteropLibrary strings,
@Cached("buildSymbol()") UnresolvedSymbol symbol,
@Cached("buildInvokeCallableNode()") InvokeCallableNode invokeCallableNode) {
@Cached("buildInvokeCallableNode()") InvokeCallableNode invokeCallableNode,
@Cached ExpectStringNode expectStringNode) {
var str = invokeCallableNode.execute(symbol, frame, state, new Object[] {message});
EnsoContext ctx = EnsoContext.get(this);
print(ctx.getOut(), str);
print(ctx.getOut(), expectStringNode.execute(str));
return ctx.getNothing();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,4 @@ Object removeWarnings(@CachedLibrary(limit = "3") WarningsLibrary warnings)
boolean hasSpecialDispatch() {
return true;
}

@Override
public String toString() {
return "WithWarnings(" + value + " + " + warnings.size() + " warnings)";
}
}

0 comments on commit ae4726b

Please sign in to comment.