golang / go

The Go programming language

Home Page:https://go.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cmd/compile: accepts invalid identifiers

dvyukov opened this issue · comments

Gc successfully compiles the following program:

package a
var ۶ = 0

It must reject it, as U+06F6 is not classified as Letter (it is a digit):
http://graphemica.com/%DB%B6

go/ast parser correctly rejects the program with:

test.go:2:5: illegal character U+06F6 '۶'

CL https://golang.org/cl/16919 mentions this issue.