Jacek Caban : widl: Fail with error on an attempt to inherit interface from itself.

Alexandre Julliard julliard at winehq.org
Wed Aug 29 15:01:38 CDT 2012


Module: wine
Branch: master
Commit: 5cb75c525fc55fb01033e38277e10a30111fae62
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5cb75c525fc55fb01033e38277e10a30111fae62

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Aug 28 21:33:57 2012 +0200

widl: Fail with error on an attempt to inherit interface from itself.

---

 tools/widl/parser.y |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 55b2df9..616a538 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -884,6 +884,8 @@ interfacehdr: attributes interface		{ $$.interface = $2;
 
 interfacedef: interfacehdr inherit
 	  '{' int_statements '}' semicolon_opt	{ $$ = $1.interface;
+						  if($$ == $2)
+						    error_loc("Interface can't inherit from itself\n");
 						  type_interface_define($$, $2, $4);
 						  pointer_default = $1.old_pointer_default;
 						}




More information about the wine-cvs mailing list