kphp icon indicating copy to clipboard operation
kphp copied to clipboard

GCC compile fail on `var_dump` with `shape`

Open i582 opened this issue 5 years ago • 0 comments

Code example:

<?php

/**
 * @return shape(foo: int, boo: string)
 */
function f() {
    return shape(["foo" => 1, "boo" => "hello"]);
}

$a = f();
var_dump($a);

Actual Behavior:

...
not known conversion from shape<...

Expected Behavior:

No error or compile time warning.

i582 avatar Sep 05 '21 23:09 i582