Skip to content

reflect: channel type created by ChanOf not identical to itself via pointer roundtrip #2013

Description

@visualfc
package main

import (
	"reflect"
)

type T struct{}

func main() {
	ch := reflect.ChanOf(reflect.BothDir, reflect.TypeOf(T{}))
	ptr := reflect.PointerTo(ch)
	if ptr.Elem() != ch {
		panic("error " + ptr.String())
	}
}

llgo run

panic: error *chan unsafe.Pointer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions