Commit d0a4c9bb authored by Rob Pike's avatar Rob Pike

gc: allow ~ in import paths

Windows has paths like C:/Users/ADMIN~1. Also, it so happens
that go/parser allows ~ in import paths. So does the spec.
Fixes the build too.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5777073
parent c405b58f
......@@ -3639,7 +3639,7 @@ isbadimport(Strlit *path)
yyerror("import path contains space character: \"%s\"", path->s);
return 1;
}
if(utfrune("!\"#$%&'()*,:;<=>?[]^`{|}~", r)) {
if(utfrune("!\"#$%&'()*,:;<=>?[]^`{|}", r)) {
yyerror("import path contains invalid character '%C': \"%s\"", r, path->s);
return 1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment