You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
quantimnot
changed the title
getTypeInst returns defferent results depending on code ordergetTypeInst returns different results for type aliased generics depending on code order
Oct 24, 2021
import macros, sequtils, options
whennotdefined skipBad:
procbreaksStuff(a: Option[seq[string]]) =discardwhennotdefined skipBad:
var alsoBreaksStuff: Option[seq[string]]
type
A =object
b: Option[seq[string]]
macroc(t: typedesc) =echo$t.getType[1].getType[2].children.toSeq[0].getTypeInst[1]
echo"START"c A
echo"END"
Result
Error: Invalid node kind nnkBracketExpr for macros.`$`
Nim Version
Nim Compiler Version 2.0.0 [Linux: amd64]
Compiled at 2023-08-01
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: a488067a4130f029000be4550a0fb1b39e0e9e7c
active boot switches: -d:release
Example
Current Output
Expected Output
Additional Information
Problem exists in 0.14.0 and recent devel: f0af4a3.
The text was updated successfully, but these errors were encountered: