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
Defining a concept without any type that matches it, leads to errors when trying to use that concept.
Example
typeComparable=conceptproccompare(a, b: Self): int# so that there are no conflicts with `cmp`proctest[T: Comparable](x, y: T) =echocompare(x, y)
Current Output
Error: undeclared identifier: 'compare'
Expected Output
No error.
Possible Solution
Make name resolution consider concept declarations (compare in this case).
Additional Information
$ nim -v
Nim Compiler Version 1.5.1 [Linux: amd64]
Compiled at 2021-03-18
Copyright (c) 2006-2021 by Andreas Rumpf
git hash: de5a8265384c2f23eca744b4fc9feda9721faefd
active boot switches: -d:release
The text was updated successfully, but these errors were encountered:
This wasn't covered by my RFC. I think this requires a different RFC, "name resolution in generics that use new-styled concepts". That said, I agree that we should do it. But notice that symbol lookup is only the first step, we could also type-check generic bodies completely.
Defining a concept without any type that matches it, leads to errors when trying to use that concept.
Example
Current Output
Expected Output
No error.
Possible Solution
Make name resolution consider concept declarations (
compare
in this case).Additional Information
The text was updated successfully, but these errors were encountered: