golang/go

cmd/compile: accepts invalid identifiers

dvyukov opened this issue · 1 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.