Type: LanguageService
Describe the bug
- OS and Version: macOS 10.14.3
- VS Code Version: 1.13.1
- C/C++ Extension Version: 0.21.0
- Other extensions you installed (and if the issue persists after disabling them): too many... yes
- A clear and concise description of what the bug is: A value of type X cannot be used to initialize an entity of type X
To Reproduce
- Create a new document, select the language to be "C++", and type:
struct Value {
struct Array;
struct Dict;
struct Primitive;
Value() {}
virtual ~Value() {}
virtual Array * asArray() { assert(false); }
virtual Dict * asDict() { assert(false); }
virtual Primitive * asPrimitive() { assert(false); }
int asInt();
double asDouble();
std::string asDate();
std::string asString();
};
struct Value::Array : public Value {
Array() {}
~Array() {}
Value::Array * asArray() {
Value::Array * result = this;
return result;
}
};
- Wait for the IntelliSence's error squiggle and message (shown in screenshot).
Expected behavior
This is a legitimate assignment and there should not be an error.
Screenshots

other info:
Might related to this on StackOverflow, though it's not clear whether the problem described in that post occurred in VSCode or other IDE/editor.
Type: LanguageService
Describe the bug
To Reproduce
Expected behavior
This is a legitimate assignment and there should not be an error.
Screenshots

other info:
Might related to this on StackOverflow, though it's not clear whether the problem described in that post occurred in VSCode or other IDE/editor.