Bug 280720 - wrong datatype if a cast is used in Array declaration
Summary: wrong datatype if a cast is used in Array declaration
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (other bugs)
Version First Reported In: git master
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-24 16:07 UTC by Bernd Buschinski
Modified: 2016-12-13 08:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.0.0
Sentry Crash Report:


Attachments
patch adds tests for this bug, no fix (1.71 KB, patch)
2011-10-29 14:29 UTC, Bernd Buschinski
Details
Data type displayed if a cast is used in array declaration (542.28 KB, image/png)
2016-05-09 06:41 UTC, chaitanya srinivas ponnapalli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Buschinski 2011-08-24 16:07:36 UTC
Version:           git master (using KDE 4.7.0) 
OS:                Linux

Kdevelop shows wrong datatype if a cast is used in Array declaration.

Working Example:

bool Array[4];
Array[2] = false;

if I move my mouse over Array[2] I get
"bool[4] Array"
Sofar so good, the expected Result.


Reproducible: Always

Steps to Reproduce:
Broken datatype Example:

bool Array[(int)4];
Array[2] = false;

Actual Results:  
if I move my mouse over Array[2] I get
"int Array"
which is wrong, as Array is still an array of bools, not a single int

Expected Results:  
"bool[4] Array"
or even "bool[(int)4] Array"
which looks a bit weird, but is not wrong
Comment 1 Bernd Buschinski 2011-10-29 14:29:47 UTC
Created attachment 65013 [details]
patch adds tests for this bug, no fix

test runs fine for simple case
"bool Array[3];"
but fails with
"bool Array[(int)3];"
Comment 2 chaitanya srinivas ponnapalli 2016-05-09 06:41:42 UTC
Created attachment 98851 [details]
Data type displayed if a cast is used in array declaration

Reproduced the steps as described in the issue:
1. Created array of bool as shown:
bool Array[(int)4];
2. The resultant datatype after pointing the mouse at it, is shown correctly as array of bool and not as "int Array".
3. The issue is fixed.
4. Attached screenshot for reference.
Comment 3 Kevin Funk 2016-05-09 08:20:57 UTC
Appears fixed under KDevelop 5