mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-14 15:23:27 +00:00
fixes #7331
This commit is contained in:
@@ -1145,7 +1145,8 @@ proc typeRelImpl(c: var TCandidate, f, aOrig: PType,
|
||||
else:
|
||||
fRange = prev
|
||||
let ff = f.sons[1].skipTypes({tyTypeDesc})
|
||||
let aa = a.sons[1].skipTypes({tyTypeDesc})
|
||||
# This typeDesc rule is wrong, see bug #7331
|
||||
let aa = a.sons[1] #.skipTypes({tyTypeDesc})
|
||||
|
||||
if f.sons[0].kind != tyGenericParam and aa.kind == tyEmpty:
|
||||
result = isGeneric
|
||||
|
||||
15
tests/errmsgs/twrong_at_operator.nim
Normal file
15
tests/errmsgs/twrong_at_operator.nim
Normal file
@@ -0,0 +1,15 @@
|
||||
discard """
|
||||
errormsg: "type mismatch: got <array[0..0, type int]>"
|
||||
line: 15
|
||||
nimout: '''
|
||||
twrong_at_operator.nim(15, 30) Error: type mismatch: got <array[0..0, type int]>
|
||||
but expected one of:
|
||||
proc `@`[T](a: openArray[T]): seq[T]
|
||||
proc `@`[IDX, T](a: array[IDX, T]): seq[T]
|
||||
|
||||
expression: @[int]
|
||||
'''
|
||||
"""
|
||||
|
||||
# bug #7331
|
||||
var seqOfStrings: seq[int] = @[int]
|
||||
Reference in New Issue
Block a user