This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 257827 - Auto insert function stubs not copying all const keywords
Summary: Auto insert function stubs not copying all const keywords
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.1
Hardware: PC Windows 10 x64
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-03 10:48 UTC by rpbostock909
Modified: 2016-07-21 01:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (151.66 KB, text/plain)
2016-02-03 10:48 UTC, rpbostock909
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rpbostock909 2016-02-03 10:48:31 UTC
Product Version = NetBeans IDE 8.1 (Build 201510222201)
Operating System = Windows 8 version 6.2 running on amd64
Java; VM; Vendor = 1.8.0_25
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.25-b02

Reproducibility: Happens every time

STEPS:
  * Insert function in to the header void newImage(std::shared_ptr<const std::vector<uint8_t> > buffer, const Picture_data& picture_data) override;
  * Switch to the code and start typing stub
  * Press enter to autocomplete

NB Reproducibility - Repeated test on a blank class with default constructor / deconstructor and just this function e.g. 

#ifndef __MYCLASS_H__
#define __MYCLASS_H__

#include <vector>
#include <stdint.h>

class Picture_data;

class MyClass
{
public:
  MyClass();
  virtual ~MyClass();
  
  void newImage(std::shared_ptr<const std::vector<uint8_t> > buffer, const Picture_data& picture_data) override;
private:

};

#endif /* %<%GUARD_NAME%>% */

ACTUAL:
  Stub is incorrectly completed - missing const before the std::vector
void DataServer::newImage(std::shared_ptr<std::vector<uint8_t> > buffer, const Picture_data& picture_data)
{
}

EXPECTED:
  void DataServer::newImage(std::shared_ptr<const std::vector<uint8_t> > buffer, const Picture_data& picture_data)
{
Comment 1 rpbostock909 2016-02-03 10:48:36 UTC
Created attachment 158362 [details]
IDE log
Comment 2 Alexander Simon 2016-06-27 14:55:55 UTC
Code model misses const in parameter type
Comment 3 petrk 2016-07-19 17:35:57 UTC
Fixed in http://hg.netbeans.org/cnd-main/rev/0fe6d94a1675
Comment 4 Quality Engineering 2016-07-21 01:51:18 UTC
Integrated into 'main-silver', will be available in build *201607210002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/0fe6d94a1675
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Fixed #257827 - Auto insert function stubs not copying all const keywords