Skip to content

Commit

Permalink
also fixes nim-lang#12713; added test case
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Apr 14, 2020
1 parent e475d74 commit f6dd90c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/statictypes/tstatictypes.nim
Expand Up @@ -202,3 +202,17 @@ block: #13529
proc fun[T](a: static[T]) = (const a2 = a)
fun(1)
fun(1.2)

block: # #12713
block:
type Cell = object
c: int
proc test(c: static string) = discard #Remove this and it compiles
proc test(c: Cell) = discard
test Cell(c: 0)
block:
type Cell = object
c: int
proc test(c: static string) = discard #Remove this and it compiles
proc test(c: Cell) = discard
test Cell()

0 comments on commit f6dd90c

Please sign in to comment.