浏览代码

Fixed 'struct extends...' not generating an error.

Mark Sibly 8 年之前
父节点
当前提交
9bcd842c48
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/mx2cc/parser.monkey2

+ 2 - 0
src/mx2cc/parser.monkey2

@@ -344,6 +344,8 @@ Class Parser
 			
 			If CParse( "extends" )
 			
+				If decl.kind="struct" Error( "Structs cannot use 'Extends'" )
+			
 				If flags & DECL_EXTENSION Error( "Extension classes cannot use 'Extends'" )
 				
 				If decl.kind="interface" Or decl.kind="protocol"