Skip to content

DefaultOperations.java - Add blank string default #7712

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: dev/feature
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ public class DefaultOperations {
Arithmetics.registerDifference(Date.class, Timespan.class, Date::difference);

// String - String
Arithmetics.registerDefaultValue(String.class, () -> "");
Arithmetics.registerOperation(Operator.ADDITION, String.class, String.class, String::concat);

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ test "expressions sometimes dont convert":
assert formatted ({_foo} + {_bar}) is not set with "formatting nothing shouldn't throw an error"

set {_foo} to "test"
assert formatted ({_foo} + {_bar}) is not set with "formatting string + none shouldn't throw an error"
assert formatted ({_foo} + {_bar}) is "test" with "formatting string + none shouldn't throw an error"

set {_foo} to 1
set {_bar} to 2
Expand Down