Skip to content

expression as generator key #532

@czosel

Description

@czosel

Input:

<?php

function foo() {
  $test = 123;
  yield "bar {$test}" => 123;
}

Output:

Parse Error : syntax error, unexpected '"', expecting ';' on line 5

I didn't test it with just the parser yet; the original bug report is prettier/plugin-php#1390.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions