8000 go1.20.5 type problem · Issue #138 · dominikbraun/graph · GitHub
[go: up one dir, main page]

Skip to content

go1.20.5 type problem #138

Open
Open

Description

@kangkang333

Cannot use '&directed[K, T]{ hash: hash, traits: traits, store: store, }' (type *"github.com/dominikbraun/graph".directed[K, T]) as the type *"github.com/dominikbraun/graph".directed[K, T]

Activity

  1. dominikbraun commented on Jul 8, 2023

    @dominikbraun
    Owner

    Do the new graph versions work for you?

  2. robinje commented on Jan 28, 2024

    @robinje

    The issue persists in 1.21.5

  3. dominikbraun commented on Mar 6, 2024

    @dominikbraun
    Owner

    The issue persists in 1.21.5

    @robinje @kangkang333 Interesting that this isn't being catched by the tests, but I would need a more detailed description to reproduce this error. Doesn't v0.23.0 work either?

  4. akzincsystems commented on Mar 31, 2024

    @akzincsystems
    import (
       dbgraph "github.com/dominikbraun/graph"
    )
    type Template struct {
       dbg    dbgraph.Graph
    }
    func (t *Template) DBGraph() {
       t.dbg = dbgraph.New(dbgraph.StringHash, dbgraph.Directed(), dbgraph.PreventCycles())
    }
    

    Error on build: cannot use generic type graph.Graph[K comparable, T any] without instantiation. I think this is the same problem as reported by @kangkang333. Using Go V1.21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0