Skip to content

Commit 5f6ef53

Browse files
authored
Merge pull request #1362 from Mr-Rm/develop
v2: Передача в делегат (объект `Действие`) значений переменных
2 parents d39c6c7 + 36de8cd commit 5f6ef53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/OneScript.StandardLibrary/DelegateAction.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public DelegateAction(Func<IValue[], IValue> action)
4242

4343
public DelegateAction(Func<BslValue[], BslValue> action)
4444
{
45-
_action = parameters => (IValue)action(parameters.Cast<BslValue>().ToArray());
45+
_action = parameters => action( parameters.Select(x=>x.GetRawValue())
46+
.Cast<BslValue>().ToArray() );
4647
}
4748

4849
public override bool DynamicMethodSignatures => true;

0 commit comments

Comments
 (0)