mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-13 23:03:36 +00:00
close #9961 by adding a test
This commit is contained in:
17
tests/typerel/typedescs2.nim
Normal file
17
tests/typerel/typedescs2.nim
Normal file
@@ -0,0 +1,17 @@
|
||||
discard """
|
||||
errormsg: "'typedesc' metatype is not valid here; typed '=' instead of ':'?"
|
||||
file: "typedescs2.nim"
|
||||
line: 16
|
||||
"""
|
||||
|
||||
# issue #9961
|
||||
|
||||
import typetraits
|
||||
import tables
|
||||
|
||||
proc test(v: typedesc) =
|
||||
echo v.type.name
|
||||
|
||||
# This crashes the compiler
|
||||
const b: typedesc = Table
|
||||
test b
|
||||
Reference in New Issue
Block a user