Skip to content

Commit

Permalink
add test for nim-lang#23898
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Aug 20, 2024
1 parent 17534da commit c75a828
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/lookups/m23898_1.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
type K* = object
4 changes: 4 additions & 0 deletions tests/lookups/m23898_2.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import ./m23898_1
export m23898_1
template K*(kind: static int): auto = typedesc[m23898_1.K]
template B*(kind: static int): auto = typedesc[m23898_1.K]
8 changes: 8 additions & 0 deletions tests/lookups/t23898.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import ./m23898_2
discard default(B(0)) # compiles
discard default(m23898_2.B(0)) # compiles
discard default(K(0)) # compiles
template r() =
discard default(B(0)) # compiles
discard default(m23898_2.B(0)) # compiles
discard default(K(0)) # does not compile

0 comments on commit c75a828

Please sign in to comment.