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
Even within a single type section which is supposed to accept any order of declaration a type matching a concept must be forward declared.
Example
typeEnqueueable=concept x, type T
x isptr
x.next is T
Queue[T: Enqueueable] =object
front: T
back: T
type# Declaring before works# Val = ptr object# next: Val# val: intFoo=object
queue: Queue[Val]
# Declaring after fails to match the conceptVal=ptrobject
next: Val
val: int
Note that in that caise the {;explain.} pragma does not explain anything.
The text was updated successfully, but these errors were encountered:
mratsim
changed the title
Concepts: a type matching a concpt must be forward declared even in a single type section
Concepts: a type matching a concept must be forward declared even in a single type section
Nov 20, 2019
Even within a single type section which is supposed to accept any order of declaration a type matching a concept must be forward declared.
Example
Note that in that caise the {;explain.} pragma does not explain anything.
The text was updated successfully, but these errors were encountered: