Skip to content

spec, cmd/compile: type inference for generic function assigned to single-type type set should work #77439

@griesemer

Description

@griesemer

The 2nd assignment in this code should probably work, too (playground):

func g[P any](P) {}

func _[F func(int)]() {
	var _ func(int) = g
	var _ F = g // this should probably work
}

See also #77245 (related).

Metadata

Metadata

Labels

LanguageProposalIssues describing a requested change to the Go language specification.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions