Hhvm: Hack doesn't understand UTF-8 labels

Created on 10 Jun 2016  ·  4Comments  ·  Source: facebook/hhvm

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
hack

Most helpful comment

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

All 4 comments

cc @sgolemon

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

Any chance the full fidelity parser will fix this?

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}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

caioiglesias picture caioiglesias  ·  6Comments

octmoraru picture octmoraru  ·  5Comments

zkiiito picture zkiiito  ·  7Comments

fredemmott picture fredemmott  ·  3Comments

acrylic-origami picture acrylic-origami  ·  4Comments