mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-28 02:03:59 +00:00
fixes #24705
```nim
proc xxx(v: static int) =
echo v
xxx(10)
xxx(20)
```
They are mangled as `_ZN14titaniummangle7xxx_s10E` and
`_ZN14titaniummangle7xxx_s20E` with `--debugger:native`. Static
parameters are prefixed with `_s` to distinguish simple cases like
`xxx(10, 15)` and `xxx(101, 5)` if `xxx` supports two `static[int]`
parameters
(cherry picked from commit c452275e29)
This commit is contained in:
@@ -29,6 +29,8 @@ discard """
|
||||
ccodecheck: "'_ZN14titaniummangle8testFuncE9ContainerI3intE'"
|
||||
ccodecheck: "'_ZN14titaniummangle8testFuncE10Container2I5int325int32E'"
|
||||
ccodecheck: "'_ZN14titaniummangle8testFuncE9ContainerI10Container2I5int325int32EE'"
|
||||
ccodecheck: "'_ZN14titaniummangle7xxx_s10E'"
|
||||
ccodecheck: "'_ZN14titaniummangle7xxx_s20E'"
|
||||
"""
|
||||
|
||||
#When debugging this notice that if one check fails, it can be due to any of the above.
|
||||
@@ -151,6 +153,9 @@ proc testFunc(a: int, xs: varargs[string]) =
|
||||
for x in xs:
|
||||
echo x
|
||||
|
||||
proc xxx(v: static int) =
|
||||
echo v
|
||||
|
||||
proc testFunc() =
|
||||
var a = 2
|
||||
var aPtr = a.addr
|
||||
@@ -188,6 +193,8 @@ proc testFunc() =
|
||||
let c2 = Container2[int32, int32](data: 10, data2: 20)
|
||||
testFunc(c2)
|
||||
testFunc(Container[Container2[int32, int32]](data: c2))
|
||||
|
||||
xxx(10)
|
||||
xxx(20)
|
||||
|
||||
|
||||
testFunc()
|
||||
Reference in New Issue
Block a user