-
The following incorrect code crashes without an error when the type name defined is used as alias type:
```nim
type string = string | char
# type string = char | int # compiles
# type string = seq…
ghost updated
2 weeks ago
-
Hi,
I'm trying to use info, debug, error, etc. templates, but if you use strformat on event parameter:
```nim
import strformat
import chronicles
let a = 2
info fmt" a = {a}"
```
compiler…
-
Sentry Issue: [COMPILER-EXPLORER-5YW](https://sentry.io/organizations/compiler-explorer/issues/1486461412/?referrer=github_integration)
```
Error: ENOENT: no such file or directory, stat '/tmp/compil…
-
Passing an anonymous proc to a template may fail under Nim 1.2.12.
### Example
```nim
type
X* = ref object
bar: proc (p: proc(v: openArray[byte]))
template foo(x: X, p: proc(v: openArr…
-
Hello,
This works OK:
```nim
proc fn(): int32 | int64 =
1
var v = fn()
```
But using a forward declaration fails, "_Error: invalid type: 'int32 or int64' for var_":
```nim
proc fn…
-
seq and array seems to be a special case
### Example
```nim
type Seq[U] = seq[U]
proc foo(s:typedesc[seq]) = echo "seq works"
proc foo(s:typedesc[Seq]) = echo "Seq works"
Seq.foo #works
…
-
### Description
Code
```nim
import std/macros
var x {.compileTime.} : NimNode =
quote do:
echo "xxx"
```
The context is that I am trying to build up a compile-time list, containing …
-
```
# nim -V
Nim Compiler Version 2.0.2 [Linux: amd64]
Compiled at 2024-02-23
Copyright (c) 2006-2023 by Andreas Rumpf
active boot switches: -d:release
# nimble list --installed | grep -i 'nig…
-
## Context
Today the Nim compiler implements a feature called "nimble path" (`--nimblePath`). Where specifying ``--nimblePath:~/.nimble/pkgs/`` expands to:
* ``--path:~/.nimble/pkgs/jester-#head…
dom96 updated
5 years ago
-
### Example
```nim
type
Obj = object
v: int
HasFrm = object
v: int
template frm(T: type HasFrm, o: Obj): T = T(v: o.v)
template to*(v: auto, T: type): T =
mixin frm
f…