Bug 162404 - CPPASTUnaryExpression implements the wrong Interface
Summary: CPPASTUnaryExpression implements the wrong Interface
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 3.1.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.0 M5   Edit
Assignee: Doug Schaefer CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2006-10-26 10:04 EDT by Emanuel Graf CLA
Modified: 2008-06-20 10:41 EDT (History)
0 users

See Also:


Attachments
Patch for CPPASTUnaryExpression (1.32 KB, patch)
2006-10-26 10:06 EDT, Emanuel Graf CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Emanuel Graf CLA 2006-10-26 10:04:36 EDT
The class CPPASTUnaryExpression implements the interface IASTUnaryExpression but it should instead implement ICPPASTUnaryExpression.
Comment 1 Emanuel Graf CLA 2006-10-26 10:06:46 EDT
Created attachment 52750 [details]
Patch for CPPASTUnaryExpression
Comment 2 Doug Schaefer CLA 2006-10-26 11:11:03 EDT
Looks like an oversight. There's only statics defined in the CPP version so functionally I don't think we rely on it. But I can see that if you need to make sure it's the CPP version (instanceof) that you'll need this.
Comment 3 Emanuel Graf CLA 2006-10-26 11:19:17 EDT
The statics in IGNUASTUnaryExp and ICPPASTUnaryExp have the same values (IASTUnaryExpression.op_last + i) so I have to use instanceof to make sure it is the CPP version.
Comment 4 Doug Schaefer CLA 2006-10-26 11:29:59 EDT
Patch Applied. Well only sort of. I just added the 'CPP' and did an organize imports. The result should be the same :).