Fix invalid code generated for "%constant enum EnumType ..." and add a test.
This commit is contained in:
parent
0ff6893b2d
commit
06345e2aa5
3 changed files with 8 additions and 2 deletions
|
|
@ -14,6 +14,11 @@ struct Type1 {
|
|||
Type1(int val = 0) : val(val) {}
|
||||
int val;
|
||||
};
|
||||
enum EnumType
|
||||
{
|
||||
EnumValue
|
||||
};
|
||||
EnumType enumValue = EnumValue;
|
||||
/* Typedefs for const Type and its pointer */
|
||||
typedef const Type1 Type1Const;
|
||||
typedef const Type1* Type1Cptr;
|
||||
|
|
@ -46,3 +51,4 @@ Type1 getType1Instance() { return Type1(111); }
|
|||
%constant Type1Cfptr TYPE1CFPTR1DEF_CONSTANT1 = getType1Instance;
|
||||
/* Regular constant */
|
||||
%constant int TYPE_INT = 0;
|
||||
%constant enum EnumType newValue = enumValue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue