Skip to content

cmd/compile: better error message for failed string conversion #23813

@griesemer

Description

@griesemer

https://play.golang.org/p/8ADwHokqcK5 complains with:

prog.go:6:12: cannot use x (type []T) as type []byte in argument to runtime.slicebytetostring

The error message should not mention runtime.slicebytetostring which is an implementation detail.

(There are probably more error situations that expose runtime calls this way. Should handle them all uniformly.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions