File tree Expand file tree Collapse file tree 4 files changed +8
-4
lines changed
Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -504,6 +504,7 @@ Public Sub TestEnumConcat()
504504 End Sub
505505End Class" ,
506506 @"using System;
507+ using System.IO;
507508
508509public partial class EnumTests
509510{
Original file line number Diff line number Diff 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+
790791public partial class DoesNotNeedConstructor
791792{
792793 private readonly ParallelOptions ClassVariable1 = new ParallelOptions() { MaxDegreeOfParallelism = 5 };
Original file line number Diff line number Diff line change @@ -377,7 +377,8 @@ End Sub
377377 Private ReadOnly ClassVariable1 As New ParallelOptions With {.MaxDegreeOfParallelism = x}
378378#End Region
379379End Class
380- " , @"
380+ " , @"using System.Threading.Tasks;
381+
381382public partial class ConversionTest8
382383{
383384 private int x = 5;
Original file line number Diff line number Diff 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+
15391540internal 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 }
You can’t perform that action at this time.
0 commit comments