widl: Fail with error on an attempt to inherit interface from itself.
This commit is contained in:
parent
bfec155345
commit
5cb75c525f
|
@ -884,6 +884,8 @@ interfacehdr: attributes interface { $$.interface = $2;
|
||||||
|
|
||||||
interfacedef: interfacehdr inherit
|
interfacedef: interfacehdr inherit
|
||||||
'{' int_statements '}' semicolon_opt { $$ = $1.interface;
|
'{' int_statements '}' semicolon_opt { $$ = $1.interface;
|
||||||
|
if($$ == $2)
|
||||||
|
error_loc("Interface can't inherit from itself\n");
|
||||||
type_interface_define($$, $2, $4);
|
type_interface_define($$, $2, $4);
|
||||||
pointer_default = $1.old_pointer_default;
|
pointer_default = $1.old_pointer_default;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue