hedy icon indicating copy to clipboard operation
hedy copied to clipboard

[BUG] Type 'text' and type 'input from ask' cannot be merged together with the +-symbol

Open remva opened this issue 2 years ago • 1 comments

Right now, the input from ask cannot be merged with plain text, when the plus symbol is used. This immediately creates the following error (level 12 and higher levels):

image

Solution: It should be made possible to merge the input from ask with plain text, if the input from ask turns out to be of type string/text.

On the other hand, there is no error if the input of ask is of type integer and is added to plain numbers. So this does not create an error: image

remva avatar May 04 '22 13:05 remva

Nice catch! You can easily make the behavior of addition and concatenation consistent by adding input_to_string to the rules defined in to_sum_typed_tree method. This will ensure that concatenating an input and string will not yield a static type check error.

boryanagoncharenko avatar May 05 '22 16:05 boryanagoncharenko

Nice catch! You can easily make the behavior of addition and concatenation consistent by adding input_to_string to the rules defined in to_sum_typed_tree method. This will ensure that concatenating an input and string will not yield a static type check error.

Hi @boryanagoncharenko! This could be an issue for you to pick up? It even has a bit of info from yourself to get started 😅

Felienne avatar Jan 26 '24 16:01 Felienne