mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 14:25:23 +00:00
fix #20248;fix #6215;turns into simple CT error (#21141)
(cherry picked from commit 40b5c4c4c3)
This commit is contained in:
14
tests/array/t20248.nim
Normal file
14
tests/array/t20248.nim
Normal file
@@ -0,0 +1,14 @@
|
||||
discard """
|
||||
cmd: "nim check --hints:off $file"
|
||||
errormsg: "ordinal type expected"
|
||||
nimout: '''
|
||||
t20248.nim(10, 36) Error: ordinal type expected
|
||||
t20248.nim(14, 20) Error: ordinal type expected
|
||||
'''
|
||||
"""
|
||||
|
||||
type Vec[N: static[int]] = array[0 ..< N, float]
|
||||
|
||||
var v: Vec[32]
|
||||
|
||||
var stuff: array[0 ..< 16, int]
|
||||
Reference in New Issue
Block a user