Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 3.2.1, Qt Creator 3.3.0-rc1
-
None
Description
If a function override accepts const and the value that is passed to it is non-const, the wrong override is resolved - it always picks the last one.
class Foo {}; void foo(int v) {} void foo(const char *v) {} void foo(const Foo &v) {} void foo(char v) {} void test() { foo(5); foo("hoo"); foo('a'); char *var = "var"; foo(var); // Jumps to last override, regardless of its type Foo f; foo(f); // Jumps to last override }
Attachments
Issue Links
- relates to
-
QTCREATORBUG-5322 "Follow symbol under cursor" doesn't recognize const in functions
- Closed