Quellcode durchsuchen

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

Mark Sibly vor 8 Jahren
Ursprung
Commit
9bcd842c48
1 geänderte Dateien mit 2 neuen und 0 gelöschten Zeilen
  1. 2 0
      src/mx2cc/parser.monkey2

+ 2 - 0
src/mx2cc/parser.monkey2

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