Skip to content

cmd/compile: odd escaping in error message #43762

@rsc

Description

@rsc

https://play.golang.org/p/WX5BJVLjIkR

package main

func main() {
	_ = true == '\\'
}

produces

./prog.go:4:11: invalid operation: true == '\u005c' (mismatched types untyped bool and untyped rune)

It should almost certainly say '\\' not '\u005c'.
Took me a while to decode the first time I saw it.

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

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions