Skip to content

Commit d8edc80

Browse files
Push recharacterization
We'll want to be more fine-grained later, but not crashing VS is a strong priority
1 parent 5231ba7 commit d8edc80

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

Tests/VB/ExpressionTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private static bool Do()
153153
154154
Friend Class TestClass
155155
Private Shared Function [Do]() As Boolean
156-
Dim d = New Dictionary(Of String, String)
156+
Dim d = New Dictionary(Of String, String)()
157157
Dim output As string = Nothing
158158
Return d.TryGetValue("""", output)
159159
End Function
@@ -379,7 +379,7 @@ End Class
379379
380380
Friend Class TestClass
381381
Private Sub TestMethod(ByVal str As String)
382-
Dim student2 = New StudentName With {
382+
Dim student2 As StudentName = New StudentName With {
383383
.FirstName = ""Craig"",
384384
.LastName = ""Playstead""
385385
}
@@ -432,7 +432,7 @@ Public Property Converters As IList(Of Object)
432432
End Class
433433
434434
Friend Class Converter
435-
Public Shared ReadOnly Settings = New SomeSettings With {
435+
Public Shared ReadOnly Settings As SomeSettings = New SomeSettings With {
436436
.Converters = {}
437437
}
438438
End Class");
@@ -534,7 +534,7 @@ Imports System.Collections.Generic
534534
535535
Namespace PreHOPL
536536
Friend Module Program
537-
Private ReadOnly dict = New Dictionary(Of String, ValueTuple(Of Integer, [Delegate])) From {
537+
Private ReadOnly dict As Dictionary(Of String, ValueTuple(Of Integer, [Delegate])) = New Dictionary(Of String, ValueTuple(Of Integer, [Delegate]))() From {
538538
{""SAY"", (1, CType(AddressOf System.Console.WriteLine, Action(Of String)))}
539539
}
540540

Tests/VB/MemberTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ End Property
703703
704704
Public WriteOnly Property Blanket As String
705705
Set(ByVal value As String)
706-
Throw New Exception
706+
Throw New Exception()
707707
End Set
708708
End Property
709709
End Class");

Tests/VB/NamespaceLevelTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,10 @@ Implements iDisplay
347347
348348
Private Property Item(ByVal i As Integer) As Object Implements iDisplay.Item
349349
Get
350-
Throw New NotImplementedException
350+
Throw New System.NotImplementedException()
351351
End Get
352352
Set(ByVal value As Object)
353-
Throw New NotImplementedException
353+
Throw New System.NotImplementedException()
354354
End Set
355355
End Property
356356
End Class

Tests/VB/StandaloneStatementTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ await TestConversionCSharpToVisualBasic(
2727
Inherited = false
2828
};
2929
obj = null;",
30-
@"Dim obj = New AttributeUsageAttribute With {
30+
@"Dim obj As AttributeUsageAttribute = New AttributeUsageAttribute() With {
3131
.AllowMultiple = True,
3232
.Inherited = False
3333
}

Tests/VB/StatementTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void TestMethod()
119119
}
120120
}", @"Friend Class TestClass
121121
Private Sub TestMethod()
122-
Dim b = New String(""test"")
122+
Dim b As String = New String(""test"")
123123
End Sub
124124
End Class");
125125
}

Tests/VB/TypeCastTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ await TestConversionCSharpToVisualBasic(
4848
System.Collections.Generic.List<int> l = (System.Collections.Generic.List<int>) o;
4949
}
5050
", @"Private Sub Test()
51-
Dim o As Object = New List(Of Integer)
52-
Dim l = CType(o, List(Of Integer))
51+
Dim o As Object = New System.Collections.Generic.List(Of Integer)()
52+
Dim l = CType(o, System.Collections.Generic.List(Of Integer))
5353
End Sub
5454
");
5555
}
@@ -80,8 +80,8 @@ await TestConversionCSharpToVisualBasic(
8080
System.Collections.Generic.List<int> l = o as System.Collections.Generic.List<int>;
8181
}
8282
", @"Private Sub Test()
83-
Dim o As Object = New List(Of Integer)
84-
Dim l = TryCast(o, List(Of Integer))
83+
Dim o As Object = New System.Collections.Generic.List(Of Integer)()
84+
Dim l = TryCast(o, System.Collections.Generic.List(Of Integer))
8585
End Sub
8686
");
8787
}

0 commit comments

Comments
 (0)