Skip to content
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

[PORT] [Expression]Enable list concatenation for function "concat" #2373

Closed
tomlm opened this issue Jun 17, 2020 · 0 comments · Fixed by #2386
Closed

[PORT] [Expression]Enable list concatenation for function "concat" #2373

tomlm opened this issue Jun 17, 2020 · 0 comments · Fixed by #2386
Assignees

Comments

@tomlm
Copy link
Contributor

tomlm commented Jun 17, 2020

Port this change from botbuilder-dotnet/master branch:
microsoft/botbuilder-dotnet#4066

concat:

  1. If all items are lists, concatenate them with list mode.
    concat([1, 2], [3, 4]) -> [1, 2, 3, 4]

  2. If there exists any item that is not a list, use string concatenation mode:
    concat('a', 'b', 1, 2) -> 'ab12'
    concat('a', [1, 2]) -> aSystem.Collections.Generic.List 1[System.Object] // unreadable, best to avoid

  3. If null exists, skip it
    concat([1, 2], null) -> [1, 2]
    concat('a', 1, null) -> 'a1'

issue link: #4014

Changed projects

  • AdaptiveExpressions
  • AdaptiveExpressions.Tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants