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 218192 - Exception: attempt to put local declaration FUNCTION_FRIEND_DEFINITION
Summary: Exception: attempt to put local declaration FUNCTION_FRIEND_DEFINITION
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: nnnnnk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-12 08:44 UTC by Vladimir Kvashin
Modified: 2012-09-12 16:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stack (1.58 KB, text/plain)
2012-09-12 08:44 UTC, Vladimir Kvashin
Details
The second stack concerning ClassCastException (1.58 KB, text/plain)
2012-09-12 08:45 UTC, Vladimir Kvashin
Details
Exception: Too many loops in resolver!!! (5.43 KB, application/octet-stream)
2012-09-12 08:47 UTC, Vladimir Kvashin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2012-09-12 08:44:49 UTC
Created attachment 124217 [details]
stack

In inaccuracy tests, there is the following exception:

java.lang.Exception: attempt to put local declaration FUNCTION_FRIEND_DEFINITION fun(fun)[1101-1125][E11086.C 38:17-38:41] [38:17-38:41]
at org.netbeans.modules.cnd.modelimpl.content.project.DeclarationContainer.putDeclaration(DeclarationContainer.java:159)
at org.netbeans.modules.cnd.modelimpl.csm.NamespaceImpl.addDeclaration(NamespaceImpl.java:494)
at org.netbeans.modules.cnd.modelimpl.csm.ClassImpl$ClassAstRenderer.render(ClassImpl.java:951)


This causes another exception:
 java.lang.ClassCastException: org.netbeans.modules.cnd.modelimpl.uid.UIDProviderIml$SelfUID cannot be cast to org.netbeans.modules.cnd.repository.support.SelfPersistent
Comment 1 Vladimir Kvashin 2012-09-12 08:45:41 UTC
Created attachment 124218 [details]
The second stack concerning ClassCastException
Comment 2 Vladimir Kvashin 2012-09-12 08:47:37 UTC
Created attachment 124220 [details]
Exception: Too many loops in resolver!!!

Exception: Too many loops in resolver!!!
I guess is caused by other ones
Comment 3 Vladimir Kvashin 2012-09-12 10:12:24 UTC
A simple example to reproduce:

void foo(void);

int main() {
    class C1 {
        friend void foo(void);
    };
}

class C2 {
    friend void foo(void);
};
Comment 4 soldatov 2012-09-12 10:53:10 UTC
I excluded this file from inaccuracy tests
Comment 5 nnnnnk 2012-09-12 16:21:47 UTC
fixed:
http://hg.netbeans.org/cnd-main/rev/3c0be7fdaeaa