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 249092 - StackOverflowError in org.netbeans.modules.cnd.modelimpl.csm.DeclTypeImpl.isConst(DeclTypeImpl.java:145)
Summary: StackOverflowError in org.netbeans.modules.cnd.modelimpl.csm.DeclTypeImpl.isC...
Status: RESOLVED DUPLICATE of bug 251305
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.0.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-03 18:15 UTC by Zcool31
Modified: 2015-03-22 14:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log contents (319.89 KB, text/plain)
2014-12-03 18:15 UTC, Zcool31
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zcool31 2014-12-03 18:15:42 UTC
Created attachment 150866 [details]
IDE log contents

There seems to be an infinite recursion bug when trying to resolve decltype for recursive templates.

I'm writing code in the following form (please forgive lack of tags):

template <size_t N>
struct bar {
auto operator()->decltype(std::tuple_cat(std::make_tuple(SOMETHING),
                                         bar<N-1>()())) {
    SOMETHING = makesomething; // my code does something
    return std::tuple_cat(std::make_tuple(SOMETHING),
                          bar<N-1>()());
}
};

template <>
struct bar<0> {
std::tuple<> operator() { return std::tuple<>(); }
};

Netbeans version 7.4 correctly avoided determining the return type.

Netbeans version 8.0 and up run into infinite recursion here.

I'm compiling this code with G++ 4.8.1 with std=c++11. It is valid code that compiles and runs as intended.
Comment 1 petrk 2014-12-11 19:17:38 UTC
Can you, please, check you case in development version?
Comment 2 petrk 2015-03-22 14:27:26 UTC
Most likely it has been fixed in either Bug 251299 or Bug 251305

*** This bug has been marked as a duplicate of bug 251305 ***