Typehinting merge #50

Merged
belliash merged 298 commits from typehinting into master 2019-04-17 11:27:52 +02:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 8aacf7c70e - Show all commits

View File

@ -700,7 +700,7 @@ static sxi32 ExprExtractNode(ph7_gen_state *pGen, ph7_expr_node **ppNode) {
}
}
}
} else if(nKeyword == PH7_KEYWORD_FUNCTION) {
} else if(pCur[1].nType & PH7_TK_LPAREN && (nKeyword & PH7_KEYWORD_TYPEDEF)) {
/* Anonymous function */
if(&pCur[1] >= pGen->pEnd) {
/* Assume a literal */

View File

@ -1,7 +1,7 @@
class Program {
function main(string[] $args) {
callback $y = function() {
callback $y = void() {
callback $a = 'printf';
$a("I'm alive\n");
var_dump($a);