Oddly, if I change part to
    
    
    NodeConcept* = concept n
        $n is string
        n.foo() is string
    
    
    Run

Then it _still_ works. But why? `n.foo()` does not exist. I thought these were 
constraints. And in fact, I can call any method on the `GraphConcept` that 
actually exists on the actual `Graph`, even if I do _not_ specify it in the 
"concept", e.g.
    
    
    NodeConcept* = concept n
        $n is string
    ...
    proc bar(g: Graph): string =
      "bar()"
    proc shortest_path*(g: GraphConcept): seq[g.NodeType] =
      echo g.bar()
      g.nodes
    
    
    Run

So I get the impression that "concept" has been weakened, not longer for 
type-constraints but only for auto-creation of generics. That's fine, but it's 
not what I expected.

Reply via email to