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
The following example produces a compilation error.
typeComparable=conceptproc`<`(a, b: Self): bool# Works with this.# Comparable = concept a# `<`(a, a) is bool# Doesn't work with the new style concept.Node[T: Comparable] =object
data: T
next: refNode[T]
# Works without specifying a concept.# Node[T] = object# data: T# next: ref Node[T]
Nim Version
Nim Compiler Version 1.6.16 [Windows: amd64]
Compiled at 2023-10-10
Copyright (c) 2006-2023 by Andreas Rumpf
active boot switches: -d:release
Nim Compiler Version 2.0.0 [Windows: amd64]
Compiled at 2023-08-01
Copyright (c) 2006-2023 by Andreas Rumpf
active boot switches: -d:release
Nim Compiler Version 2.1.1 [Windows: amd64]
Compiled at 2023-10-17
Copyright (c) 2006-2023 by Andreas Rumpf
active boot switches: -d:release
Current Output
Error: cannot instantiate Node{None} [type declared in C:\Projects\TestNim\recursive_concept.nim(13, 3)]
got: <typedesc[T: Comparable]>
but expected: <T: Comparable>
Expected Output
Successful compilation
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Description
The following example produces a compilation error.
Nim Version
Nim Compiler Version 1.6.16 [Windows: amd64]
Compiled at 2023-10-10
Copyright (c) 2006-2023 by Andreas Rumpf
active boot switches: -d:release
Nim Compiler Version 2.0.0 [Windows: amd64]
Compiled at 2023-08-01
Copyright (c) 2006-2023 by Andreas Rumpf
active boot switches: -d:release
Nim Compiler Version 2.1.1 [Windows: amd64]
Compiled at 2023-10-17
Copyright (c) 2006-2023 by Andreas Rumpf
active boot switches: -d:release
Current Output
Expected Output
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: