diff --git a/src/Test/TestCases.Workflows/XamlTests.cs b/src/Test/TestCases.Workflows/XamlTests.cs index 77447780..e73a181d 100644 --- a/src/Test/TestCases.Workflows/XamlTests.cs +++ b/src/Test/TestCases.Workflows/XamlTests.cs @@ -276,6 +276,8 @@ public async Task VB_CreatePrecompiedValueAsync_ProperlyIdentifiesVariables() [InlineData(typeof(Func), "Function() (1 + 1)", true)] [InlineData(typeof(Func), "Function() (Nothing)", false)] [InlineData(typeof(Func), "Function() (\"test\")", false)] + [InlineData(typeof(string[][]), "Nothing", false)] + [InlineData(typeof(string[][][][]), "Nothing", false)] public async Task VB_CreatePrecompiedValueAsync_CorrectReturnType(Type targetType, string expressionText, bool shouldExpectError) { var location = new ActivityLocationReferenceEnvironment(); @@ -305,6 +307,8 @@ public async Task VB_CreatePrecompiedValueAsync_CorrectReturnType(Type targetTyp [InlineData(typeof(Func), "() => null", false)] [InlineData(typeof(Func), "() => 1 + 1", true)] [InlineData(typeof(Func), "() => \"test\"", false)] + [InlineData(typeof(string[][]), "default", false)] + [InlineData(typeof(string[][][][]), "default", false)] public async Task CS_CreatePrecompiedValueAsync_CorrectReturnType(Type targetType, string expressionText, bool shouldExpectError) { var location = new ActivityLocationReferenceEnvironment(); diff --git a/src/UiPath.Workflow/Activities/ExpressionCompiler.cs b/src/UiPath.Workflow/Activities/ExpressionCompiler.cs index 21b39614..f7c5c7b1 100644 --- a/src/UiPath.Workflow/Activities/ExpressionCompiler.cs +++ b/src/UiPath.Workflow/Activities/ExpressionCompiler.cs @@ -24,7 +24,7 @@ protected static Assembly GetAssemblyForType(ITypeSymbol type) { if (type is IArrayTypeSymbol arrayTypeSymbol) { - return AssemblyReference.GetAssembly(new AssemblyName(arrayTypeSymbol.ElementType.ContainingAssembly.Name)); + return AssemblyReference.GetAssembly(new AssemblyName(GetAssemblyForType(arrayTypeSymbol.ElementType).GetName().Name)); } else {