Review Request 117544: Use assignations to variables tu deduce their types
Sven Brauch
svenbrauch at googlemail.com
Sun Apr 13 15:16:49 UTC 2014
> On April 13, 2014, 3:14 p.m., Miquel Sabaté Solà wrote:
> > I agree with the nitpicks pointed out by Sven, so fix them first. Moreover, I'd like to point out that you should probably initialize pointers with C++11's nullptr instead of NULL. Apart from that, it looks good, thanks !
+1 to nullptr, but I didn't nitpick that because the code will be removed by addressing my other nitpick ;))
- Sven
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117544/#review55606
-----------------------------------------------------------
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/4fa1d18c/attachment-0001.html>
More information about the KDevelop-devel
mailing list