Skip to content

Commit f4b2f84

Browse files
These changes seem ok
1 parent ebff467 commit f4b2f84

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

Tests/CSharp/ExpressionTests/StringExpressionTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ Public Sub TestEnumConcat()
504504
End Sub
505505
End Class",
506506
@"using System;
507+
using System.IO;
507508
508509
public partial class EnumTests
509510
{

Tests/CSharp/MemberTests/MemberTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,8 @@ public async Task FieldWithInstanceOperationOfDifferingTypeAsync()
786786
{
787787
await TestConversionVisualBasicToCSharpAsync(@"Public Class DoesNotNeedConstructor
788788
Private ReadOnly ClassVariable1 As New ParallelOptions With {.MaxDegreeOfParallelism = 5}
789-
End Class", @"
789+
End Class", @"using System.Threading.Tasks;
790+
790791
public partial class DoesNotNeedConstructor
791792
{
792793
private readonly ParallelOptions ClassVariable1 = new ParallelOptions() { MaxDegreeOfParallelism = 5 };

Tests/CSharp/TriviaTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,8 @@ End Sub
377377
Private ReadOnly ClassVariable1 As New ParallelOptions With {.MaxDegreeOfParallelism = x}
378378
#End Region
379379
End Class
380-
", @"
380+
", @"using System.Threading.Tasks;
381+
381382
public partial class ConversionTest8
382383
{
383384
private int x = 5;

Tests/CSharp/TypeCastTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,7 +1535,8 @@ End Function
15351535
Private Shared Function GenericFunctionWithCastThatExistsInCsharp(Of T As {TestGenericCast})() As T
15361536
Return New TestGenericCast
15371537
End Function
1538-
End Class", @"
1538+
End Class", @"using Microsoft.VisualBasic.CompilerServices; // Install-Package Microsoft.VisualBasic
1539+
15391540
internal partial class TestGenericCast
15401541
{
15411542
private static T GenericFunctionWithCTypeCast<T>()
@@ -1552,7 +1553,7 @@ private static T GenericFunctionWithCast<T>()
15521553
}
15531554
private static T GenericFunctionWithCastThatExistsInCsharp<T>() where T : TestGenericCast
15541555
{
1555-
return (T)new TestGenericCast();
1556+
return Conversions.ToGenericParameter<T>(new TestGenericCast());
15561557
}
15571558
}");
15581559
}

0 commit comments

Comments
 (0)