Open
Description
Example
type
A = concept
proc test(x: Self, y: A)
proc test(x: int, y: int) = discard
discard (int is A)
Current Output
The compiler crashes.
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Expected Output
An error message or successful compilation.
Possible Solution
- Disallow referring to the concept being defined inside its definition.
Additional Information
$ nim -v
Nim Compiler Version 1.5.1 [Linux: amd64]
Compiled at 2021-04-02
Copyright (c) 2006-2021 by Andreas Rumpfgit hash: 9abd383
active boot switches: -d:release