Ryan McConnell
Ryan McConnell
!nim c ```nim type BigInt*[bits: static int] = object limbs*: array[8, uint64] proc view*[N](a: array[N, uint64]) = discard proc view*[N](a: var array[N, uint64]) = discard var r: BigInt[64] r.limbs.view() ```
> It still doesn't work when uncomment `mixin _` on Nim 1.4.4, gives `Error: invalid expression: mixin _` > > ```nim > import std/macros > > type CustomSeq*[T] = object...
> Internal errors are bad but you cannot initialize the field `x` with a `var T` proc that returns nothing... I removed the var in an edit FYI since it...
try this as the if statement's body: ```nim elif x.kind == tyGenericBody and f[0] == x: result = isGeneric for i in 1 ..< len(f): if not f[i].acceptsAllTypes: # not...
Ok that makes sense. So in the case of #5632 that should actually fail because it's attempting to match `Option[T]` with `Option[int]`. I didn't notice that. I guess if it...
!nim c ```nim template inner(i: static int) {.dirty.} = let thing = 1 template outer() = proc p[T](x: T) = inner(5) echo thing outer() p(0) ```
yea has nothing to do with statics actually
> Take a look around this location > > https://github.com/nim-lang/Nim/blob/c1f91c26a5136b2ad00f7da93b19c2da9b85dd16/compiler/semgnrc.nim#L284 > Thanks for looking into this. As I said here https://github.com/nim-lang/Nim/pull/23890#issuecomment-2249361096 I'm not too sure if early expansion is going...
@metagn Thanks for explaining that. I've been messing with simpler examples too. I don't like this duct tape syntax because it'll just force a refactor later, or worse. It could...
ah nvm maybe it is just the type checking. I'm assuming the operands to the template and macro are the problem according to SirOlaf's `sfAllUntyped in s.flags and sc.safeLen