Nim/tests/statictypes/t9255.nim
Timothee Cour 10eabec6d4
fix #12864 static params were mutating arg types during sigmatch; fix #12713 ; refs #13529 (#13976)
* fix #12864 static params were mutating arg types during sigmatch

* fix test

* fix StaticParam

* also fixes #12713; added test case
2020-04-14 15:00:02 +02:00

13 lines
235 B
Nim

discard """
errormsg: '''
type mismatch: got <proc (a0: int): string{.noSideEffect, gcsafe, locks: 0.}>
'''
line: 13
"""
macro fun(a: static float): untyped =
discard
when true:
proc bar(a0: int): string = discard
fun(bar)