mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 334955: Overloaded comma operator with const class reference.
This commit is contained in:
parent
d9c1b0b0c4
commit
00b07da35e
2 changed files with 12 additions and 1 deletions
|
@ -9334,4 +9334,15 @@ public class AST2CPPTests extends AST2BaseTest {
|
|||
public void testResolutionInTrailingReturnType_333256() throws Exception {
|
||||
parseAndCheckBindings();
|
||||
}
|
||||
|
||||
// struct CHAINER {
|
||||
// CHAINER const & operator,(int x) const;
|
||||
// };
|
||||
// void test(const CHAINER& x) {
|
||||
// CHAINER c;
|
||||
// test((c,0,1));
|
||||
// }
|
||||
public void testOverloadedCommaOpWithConstClassRef_334955() throws Exception {
|
||||
parseAndCheckBindings();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3208,7 +3208,7 @@ public class CPPSemantics {
|
|||
dummy.setParent(first);
|
||||
|
||||
IASTExpression[] args = new IASTExpression[] { dummy , second };
|
||||
return findOverloadedOperator(dummy, args, lookupType, OverloadableOperator.COMMA, LookupMode.LIMITED_GLOBALS);
|
||||
return findOverloadedOperator(dummy, args, op1type, OverloadableOperator.COMMA, LookupMode.LIMITED_GLOBALS);
|
||||
}
|
||||
|
||||
private static enum LookupMode {NO_GLOBALS, LIMITED_GLOBALS, ALL_GLOBALS}
|
||||
|
|
Loading…
Add table
Reference in a new issue