Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hack doesn't understand UTF-8 labels #7146

Open
HRMsimon opened this issue Jun 9, 2016 · 4 comments
Open

Hack doesn't understand UTF-8 labels #7146

HRMsimon opened this issue Jun 9, 2016 · 4 comments
Labels

Comments

@HRMsimon
Copy link

HRMsimon commented Jun 9, 2016

HHVM Version

3.13.2

Standalone code, or other way to reproduce the problem

git clone https://github.com/sgolemon/table-flip.git
cd table-flip
touch .hhconfig
hh_client

Expected result

No errors!

Actual result

src/TableFlip.hhi:3:11,10: Name already bound: *Unknown* (Naming[2012])
  src/TableFlip.hhi:13:7,6: Previous definition is here
src/TableFlip.hhi:3:11,11: Expected identifier (Parsing[1002])
src/TableFlip.hhi:5:7,6: Name already bound: *Unknown* (Naming[2012])
  src/TableFlip.hhi:13:7,6: Previous definition is here
src/TableFlip.hhi:9:7,6: Name already bound: *Unknown* (Naming[2012])
  src/TableFlip.hhi:13:7,6: Previous definition is here
@HRMsimon
Copy link
Author

HRMsimon commented Jun 9, 2016

cc @sgolemon

@Orvid Orvid added the hack label Jun 9, 2016
@sgolemon
Copy link
Contributor

Well, (╯°□°)╯︵┻━┻

@simonwelsh
Copy link
Contributor

Any chance the full fidelity parser will fix this?

@lexidor
Copy link
Collaborator

lexidor commented May 25, 2020

Copied const string °□°└ = ''; to a .hack file and then chaos.

HipHop VM 4.56.0 (rel)
Compiler: 1588614387_226336535
Repo schema: d1ae8e21bf3419a65f12a010527485564e719d07
hhvm src/file.hack 

Fatal error: Uncaught Error: Assembler Error: line 14: expected name for constant
========== PHP Source ==========
const string °□°└ = '';

========== ExternCompiler Result ==========
# /path/tp/file.hack starts here

.filepath "/path/to/file.hack";

.hh_file 1;

.main (1,1) {
  .srcloc 1:14,1:23;
  DefCns 0
  Int 1
  RetC
}

.const °□°└ = """s:0:\"\";""";
# /path/to/file.hack ends here

 in /path/to/file.hack:-1
Stack trace:
#0 {main}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants