mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Bug 326778: Bogus ambiguity due to different using declarations for the same variable.
This commit is contained in:
parent
3178c362a2
commit
d212cbc763
2 changed files with 23 additions and 2 deletions
|
@ -1279,7 +1279,6 @@ public class IndexCPPBindingResolutionBugs extends IndexBindingResolutionTestBas
|
|||
// char32_t c32;
|
||||
// f(c16); f(c32);
|
||||
// }
|
||||
|
||||
public void testChar16_Bug319186() throws Exception {
|
||||
IFunction f= getBindingFromASTName("f(c16)", 1);
|
||||
assertEquals("char16_t", ASTTypeUtil.getType(f.getType().getParameterTypes()[0]));
|
||||
|
@ -1287,4 +1286,26 @@ public class IndexCPPBindingResolutionBugs extends IndexBindingResolutionTestBas
|
|||
f= getBindingFromASTName("f(c32)", 1);
|
||||
assertEquals("char32_t", ASTTypeUtil.getType(f.getType().getParameterTypes()[0]));
|
||||
}
|
||||
|
||||
// namespace ns {
|
||||
// extern int* var;
|
||||
// void fun();
|
||||
// typedef int Type;
|
||||
// }
|
||||
// using ns::var;
|
||||
// using ns::fun;
|
||||
// using ns::Type;
|
||||
|
||||
// #include "header.h"
|
||||
// using namespace ::ns;
|
||||
// void sabel() {
|
||||
// var = 0;
|
||||
// fun();
|
||||
// Type x;
|
||||
// }
|
||||
public void test_Bug326778() throws Exception {
|
||||
IVariable v= getBindingFromASTName("var", 0);
|
||||
IFunction f= getBindingFromASTName("fun", 0);
|
||||
ITypedef t= getBindingFromASTName("Type", 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1926,7 +1926,7 @@ public class CPPSemantics {
|
|||
} else {
|
||||
if (obj == null) {
|
||||
obj = temp;
|
||||
} else if (obj == temp) {
|
||||
} else if (obj.equals(temp)) {
|
||||
// Ok, delegates are synonyms.
|
||||
} else {
|
||||
int c = compareByRelevance(data.tu, obj, temp);
|
||||
|
|
Loading…
Add table
Reference in a new issue