-
This code:
```nim
type
HasLen* = concept x
len(x) is int
converter toBool*(arg: HasLen): bool = arg.len > 0
proc input*(prompt = ""): string =
echo prompt.len()
```
makes Nim comp…
ghost updated
3 years ago
-
**V version:** V 0.1.21 69b4594
**OS:** Windows 8
**What did you do?**
```v
// fib_rec.v
pub fn fib_rec(n int) int {
if n
-
Concepts are a feature in Nim which are essentially user-defined typeclasses.
The idea is that you can define a set of criteria for a generic type, almost like an interface but without explicitly d…
-
### Description
Attempting to bootstrap the current compiler (a4f3bf374238df96f0982b7106e3702da6b485b1) with Nim 2.0.2 and the command:
```
.\koch boot -d:release -d:nimStrictMode --lib:lib
```
…
-
SIGSEGV is not catchable with arc and `import segfaults`.
### Example
```nim
import segfaults
try:
echo cast[ptr int](nil)[]
except NilAccessDefect:
echo "SegFault!"
```
### Curren…
-
### Xmake Version
2.9.5
### Operating System Version and Architecture
Mac 14.6.1 M2
### Describe Bug
Openmp dependency fail to compile, missing openmp flags
### Expected Behavior
Project compil…
-
### Description
The code below wold cause error
```Nim
import std/[json, jsonutils, tables]
echo $({ 1: "v".to_json }.to_table.to_json)
```
### Nim Version
Nim Compiler Version 1.6.12…
al6x updated
9 months ago
-
Currently Nimble is quite picky about the valid project structures, see https://github.com/nim-lang/nimble#project-structure. This is often annoying for Nimble users and even if it weren't, it's somet…
-
The C backend gets confused on what object you mean if type definition is inside a block. Maybe its looking at wrong type with the same name?
### Example
```nim
type
MyObjectKind = enum
S…
-
![image](https://user-images.githubusercontent.com/2194784/47318867-124b3f00-d602-11e8-8678-da15cc397ce3.png)
- [ ] why are there 27 lines considered as executed? I only see 4 lines in blue (in ano…