Bug 264057 - kdevelop-php-1.1.90: problem indication for const values
Summary: kdevelop-php-1.1.90: problem indication for const values
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: PHP (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: 4.2.0
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-23 11:53 UTC by Andreas Cord-Landwehr
Modified: 2011-01-23 20:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
File to reproduce my problem (11.81 KB, text/plain)
2011-01-23 19:44 UTC, Andreas Cord-Landwehr
Details
And here how the wrong underlines + error look like. (61.07 KB, image/png)
2011-01-23 19:45 UTC, Andreas Cord-Landwehr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Cord-Landwehr 2011-01-23 11:53:07 UTC
Version:           unspecified (using KDE 4.5.3) 
OS:                Linux

I declared a class ist a const value "const kFOOBAA = 1;" in line N. Next I added a new line before this const definition, such that the const-line moved (this is new line N and const moves to line N+1). 
Next, all my const-definitions are underlined in red and an error is stated for the const definition that it cannot be redeclared since it was already declared in line N.

Reproducible: Always




OS: Linux (i686) release 2.6.32-5-686
Compiler: cc
Comment 1 Milian Wolff 2011-01-23 18:35:57 UTC
please attach a real test file instead of letting me guess-interpreting your statements. I cannot reproduce anything with this code:

<?php
class Test
{
    const B = 2; // insert newline before/after this line
    const I = 1;
}
Comment 2 Andreas Cord-Landwehr 2011-01-23 19:44:49 UTC
Created attachment 56354 [details]
File to reproduce my problem

Sorry, assumed it was easier to reproduce. With the attached file I get the wrong underlines if adding a new line 39 by pressing "ENTER" at end of line 38 and further writing "//" into the new line.
Comment 3 Andreas Cord-Landwehr 2011-01-23 19:45:40 UTC
Created attachment 56355 [details]
And here how the wrong underlines + error look like.
Comment 4 Milian Wolff 2011-01-23 20:19:30 UTC
Git commit 7af440fcb87b9781bfe38d6d45b2caaf6be92ca3 by Milian Wolff.
Pushed by mwolff into branch '1.2'.

only take encountered declarations into account when checking for redeclarations

BUG: 264057

M  +5    -5    duchain/builders/declarationbuilder.cpp     

http://commits.kde.org/41973b7c/7af440fcb87b9781bfe38d6d45b2caaf6be92ca3