Version: git master (using KDE 4.6.2)
I don't know how to describe it.
I'll attach 2 images.
Important id the last "foreach" - variable $sDate, and the line "$aDateProdBal = Array();" above it.
Highlighter thinks that "y();" and "$sDate" are the same variable.
This happens in unpredictable situations (seen it many times).
If I copy/paste this code into another file or function, error disappears.
Steps to Reproduce:
I'm unable to create a reproducible code chunk.
Error appears at random, but stays there even after restart of kdev (or reopening the file).
(correct highlighting :) )
OS: Linux (x86_64) release 2.6.35-30-generic
Created attachment 63523 [details]
Created attachment 63524 [details]
sigh yeah we've had similar errors before and they are a royal pita to debug and fix. without a way to reproduce it, I won't be able to help much I'm afraid :(
if you spot it the next time, try to remember what you just wrote and repeat it. the error most likely stems from inserting/removing lines and our code not updating stuff properly
Created attachment 68113 [details]
Function with highlight error
I found a small enough part of code, which has a repeatable bug appearance.
Steps to repeat this bug:
1. cursor on beginning of line 9 ( $aBt = null;)
2. Shift+Down (selects line 9)
3. delete (removes selected line 9)
After that "fore" in "foreach" gets the same color as was the color of $aBt.
Right now I'm using ~2 months old kdevelop, and a can not upgrade now, so I hope this will be helpful.
indeed nice test - I'll investigate.
Git commit a6024bbc52b40c3d481959d390dba5ccf0ed671d by Milian Wolff.
Committed on 11/02/2012 at 17:59.
Pushed by mwolff into branch '1.3'.
properly update ranges of declarations we reuse (i.e. encounter)
M +1 -1 duchain/builders/contextbuilder.cpp
M +1 -1 duchain/builders/contextbuilder.h
M +8 -2 duchain/builders/declarationbuilder.cpp
M +43 -0 duchain/tests/duchain_multiplefiles.cpp
M +1 -1 duchain/tests/duchain_multiplefiles.h