Fixed #7784 (Token: can't be both type and variable)
This commit is contained in:
parent
55ae961ac2
commit
b6cba4a55c
|
@ -492,10 +492,12 @@ public:
|
|||
}
|
||||
void varId(unsigned int id) {
|
||||
_varId = id;
|
||||
if (id != 0)
|
||||
if (id != 0) {
|
||||
_tokType = eVariable;
|
||||
else
|
||||
isStandardType(false);
|
||||
} else {
|
||||
update_property_info();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -830,6 +830,12 @@ private:
|
|||
// Change back to standard type
|
||||
tok.str("int");
|
||||
ASSERT_EQUALS(true, tok.isStandardType());
|
||||
|
||||
// token can't be both type and variable
|
||||
tok.str("abc");
|
||||
tok.isStandardType(true);
|
||||
tok.varId(123);
|
||||
ASSERT_EQUALS(false, tok.isStandardType());
|
||||
}
|
||||
|
||||
void updateProperties() const {
|
||||
|
|
Loading…
Reference in New Issue