Skip to content

A namespace-relative name in an expression (namespace\f(), namespace\C) fails to parse. #378

Closed

Description

@blacktrs

Summary

A namespace-relative name in an expression (namespace\f(), namespace\C) fails to parse.

Repro

<?php
namespace A;

const C = 'c';
function f(): string { return "f"; }

echo namespace\f(), ' ', namespace\C, "\n";

Expected (php)

f c

Actual (manticore 5bb7764c, Darwin arm64)

compile failed (rc=65):
tests/aot/repro/wrong/namespace_relative_call_parse_error.php:8:6: error: unexpected token in expression: Keyword
Found 1 error(s), 0 warning(s).
tests/aot/repro/wrong/namespace_relative_call_parse_error.php: parse failed: unexpected token in expression: Keyword at line 8, column 6
compile: front-end (parse/typeck/IR) returned null (rc=65)

Tracking

Known-bug repro: tests/aot/repro/wrong/namespace_relative_call_parse_error.php — bash tests/aot/xfail.sh -k namespace_relative_call_parse_error reports XFAIL while this is open and XPASS once it is fixed; then move the repro into tests/aot/cases/ and close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugwrong-answer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions