Bug 408609 - "use function" declaration reports "Expected symbol" errors.
Summary: "use function" declaration reports "Expected symbol" errors.
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: PHP (show other bugs)
Version: 5.3.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-12 13:43 UTC by Marcus Harrison
Modified: 2020-01-13 17:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.5.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Harrison 2019-06-12 13:43:45 UTC
The "use function path\to\namespaced\function_name" reports the following "Expected symbol" errors:
    useNamespace
    statement
    topStatement
    outerTopStatement
    start

Instead, it should recognize the "use function" statement and allow parsing of the file to continue.

KDevelop Platform version 5.3.2
KDE Frameworks 5.59.0
Qt 5.12.3

Operating System: KDE neon 5.16
KDE Plasma Version: 5.16.0
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.3
Kernel Version: 4.18.0-21-generic
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-8550U CPU @ 1.80GHz
Memory: 15.4 GiB of RAM
Comment 1 Heinz Wiesinger 2020-01-13 17:55:39 UTC
Git commit 01bee88947f6dc2a6ce7f2bb46d26d716c6f8ec6 by Heinz Wiesinger, on behalf of Hugues Mitonneau.
Committed on 13/01/2020 at 17:55.
Pushed by wiesinger into branch 'master'.

Support importing functions and constants from other namespaces

Summary:
T6810
Add support for syntax `use const xxx\xxx` and `use function xxx\xxx`
FIXED-IN: 5.5.0

Reviewers: pprkut

Reviewed By: pprkut

Subscribers: pprkut, kdevelop-devel

Tags: #kdevelop

Differential Revision: https://phabricator.kde.org/D25956

M  +6    -2    duchain/builders/contextbuilder.cpp
M  +1    -1    duchain/builders/contextbuilder.h
M  +23   -6    duchain/builders/declarationbuilder.cpp
M  +4    -0    duchain/builders/declarationbuilder.h
M  +21   -4    duchain/builders/usebuilder.cpp
M  +4    -0    duchain/builders/usebuilder.h
M  +57   -0    duchain/tests/uses.cpp
M  +1    -0    duchain/tests/uses.h
M  +4    -1    parser/php.g

https://commits.kde.org/kdev-php/01bee88947f6dc2a6ce7f2bb46d26d716c6f8ec6