File tree Expand file tree Collapse file tree
src/OneScript.Language/SyntaxAnalysis Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1506,8 +1506,13 @@ private void NewObjectDynamicConstructor(NonTerminalNode node)
15061506 {
15071507 // есть аргументы после имени
15081508 NextLexem ( ) ;
1509- }
1510- BuildCallArguments ( callArgs ) ;
1509+ BuildCallArguments ( callArgs ) ;
1510+ if ( callArgs . Children . Count > 1 )
1511+ {
1512+ AddError ( LocalizedErrors . ExtraArgumentInNew ( ) ) ;
1513+ return ;
1514+ }
1515+ }
15111516 node . AddChild ( callArgs ) ;
15121517 NextLexem ( ) ;
15131518 }
Original file line number Diff line number Diff line change @@ -160,5 +160,9 @@ public static CodeError SymbolNotFound(string symbol) =>
160160
161161 public static CodeError AsyncMethodsNotSupported ( ) =>
162162 Create ( "Асинхронные методы не поддерживаются" , "Async methods aren't supported" ) ;
163+
164+ public static CodeError ExtraArgumentInNew ( ) =>
165+ Create ( "Лишние аргументы при вызове \" Новый\" " , "Extra arguments in \" New\" call" ) ;
166+
163167 }
164168}
You can’t perform that action at this time.
0 commit comments