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.
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) {
Created attachment 158362 [details] IDE log
Code model misses const in parameter type
Fixed in http://hg.netbeans.org/cnd-main/rev/0fe6d94a1675
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