D7018: Allow optional parameters before non-optional ones in PHP
noreply at phabricator.kde.org
Mon Jul 31 14:31:59 UTC 2017
mtijink added a comment.
The example you provide still works for me. Maybe you meant `function foo($a = 1, $b)`? That did not work previously either, since it would show the following signature: `[returntype] foo($a, $b = 1)`. But that would be useful to show, indeed.
In a way, this code already does two passes, to record how many optional/non-optional arguments there are, but I see what you mean. The DUChain code now assumes that any default argument appears at the end of the argument list (and does not store anything for earlier arguments), which is why I chose this approach. I'll check if changing that behaviour is not too difficult.
R52 KDevelop: PHP Support
To: mtijink, #kdevelop, kfunk
Cc: kfunk, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel