hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

Hack doesn't understand UTF-8 labels

Open HRMsimon opened this issue 10 years ago • 4 comments

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 avatar Jun 09 '16 23:06 HRMsimon

cc @sgolemon

HRMsimon avatar Jun 09 '16 23:06 HRMsimon

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

sgolemon avatar Jun 10 '16 10:06 sgolemon

Any chance the full fidelity parser will fix this?

simonwelsh avatar Feb 08 '17 07:02 simonwelsh

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}

lexidor avatar May 25 '20 17:05 lexidor