-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 2.7.0, Qt Creator 2.8.0-beta
-
bfbf93e64f91630d7fad0bad1c4d38898ed5086b
Consider the following code
struct A {
void foo();
struct B {
int b;
};
};
template<typename T>
struct Smart
{
T* get() { return 0; }
};
namespace foo {
struct B {
};
}
using namespace foo;
void A::foo()
{
Smart<B> sb1;
sb1.get()->b;
Smart<A::B> sb2;
sb2.get()->b;
}
Creator thinks that that "sb1.get()" returns an instance of the foo::B class but it in fact returns an instance of A::B, you can see this by placing the cursor on the lower case b, it doesn't reference anything. This works fine in a regular compiler like Clang or GCC.
The "sb2.get()->b" statement works just fine.