Review Request 117544: Use assignations to variables tu deduce their types
Commit Hook
null at kde.org
Sun Apr 13 16:07:45 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117544/#review55611
-----------------------------------------------------------
This review has been submitted with commit 0151eb7fdbc6bf3eca06bea5a557b42458c5ec10 by Denis Steckelmacher to branch master.
- Commit Hook
On April 13, 2014, 2:28 p.m., Denis Steckelmacher wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/117544/
> -----------------------------------------------------------
>
> (Updated April 13, 2014, 2:28 p.m.)
>
>
> Review request for KDevelop.
>
>
> Repository: kdev-qmljs
>
>
> Description
> -------
>
> This patch adds support variables whose types become known only after an assignation, like in "var a; a = 3;". When a variable is assigned multiple values, the types of all the expressions assigned to the variable are merged into an unsure type.
>
> ExpressionVisitor and ContextBuilder::findType are modified in order to return the last declaration corresponding to the type of an expression, if any. For instance, "a" is an expression of type int and its corresponding declaration is the "var a;" of the previous paragraph. This is needed because there is no way to find the declaration that "owns" a type, as it is possible for context.
>
>
> Diffs
> -----
>
> duchain/contextbuilder.h d53b2fe
> duchain/contextbuilder.cpp 350ff0c
> duchain/declarationbuilder.h 532bb56
> duchain/declarationbuilder.cpp 5594616
> duchain/expressionvisitor.h da35686
> duchain/expressionvisitor.cpp 049e68f
> tests/files/helloworld.js 83c121b
>
> Diff: https://git.reviewboard.kde.org/r/117544/diff/
>
>
> Testing
> -------
>
> This patch adds one unit test.
>
>
> Thanks,
>
> Denis Steckelmacher
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140413/1f1ca777/attachment.html>
More information about the KDevelop-devel
mailing list