-
-
Save ClementJnc/a31a8dcf61668e2d045e to your computer and use it in GitHub Desktop.
Assignement operator bug ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import macros | |
| type | |
| Td = tuple | |
| a:string | |
| b:int | |
| proc get_data(d: Td) : string {.compileTime.} = | |
| result = d.a # Works if a literal string is used here. | |
| result &= "aa" # BUG | |
| #result = result & "aa" # OK | |
| macro m(s:static[Td]) : stmt = | |
| echo get_data(s) | |
| echo get_data(s) | |
| result = newEmptyNode() | |
| const s=("TT", 3) | |
| m(s) | |
| m(s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment