709 references to OptionStrict
Microsoft.CodeAnalysis.Rebuild (2)
VisualBasicCompilationFactory.cs (2)
102
optionStrict: pdbOptions.OptionToEnum<
OptionStrict
>(CompilationOptionNames.OptionStrict) ??
OptionStrict
.Off,
Microsoft.CodeAnalysis.VisualBasic (99)
Binding\BackstopBinder.vb (1)
151
Public Overrides ReadOnly Property OptionStrict As
OptionStrict
Binding\Binder.vb (1)
714
Public Overridable ReadOnly Property OptionStrict As
OptionStrict
Binding\Binder_Conversions.vb (11)
514
If OptionStrict = VisualBasic.
OptionStrict
.On Then
517
ElseIf OptionStrict = VisualBasic.
OptionStrict
.Custom Then
532
If OptionStrict = VisualBasic.
OptionStrict
.On Then
549
ElseIf OptionStrict = VisualBasic.
OptionStrict
.Custom Then
985
If isExplicit OrElse OptionStrict <> VisualBasic.
OptionStrict
.On OrElse Conversions.IsWideningConversion(convKind) Then
998
If isExplicit AndAlso Me.OptionStrict <> VisualBasic.
OptionStrict
.Off Then
1004
Debug.Assert(Not isExplicit OrElse relaxationBinder.OptionStrict = VisualBasic.
OptionStrict
.Off)
1238
If isExplicit AndAlso Me.OptionStrict <> VisualBasic.
OptionStrict
.Off Then
1244
Debug.Assert(Not isExplicit OrElse reclassifyBinder.OptionStrict = VisualBasic.
OptionStrict
.Off)
1458
If isExplicit AndAlso Me.OptionStrict <> VisualBasic.
OptionStrict
.Off Then
1464
Debug.Assert(Not isExplicit OrElse relaxationBinder.OptionStrict = VisualBasic.
OptionStrict
.Off)
Binding\Binder_Delegates.vb (3)
488
If addressOfExpression.Binder.OptionStrict <> VisualBasic.
OptionStrict
.Off Then
494
Debug.Assert(resolutionBinder.OptionStrict = VisualBasic.
OptionStrict
.Off)
996
If Me.OptionStrict =
OptionStrict
.On AndAlso Conversions.IsNarrowingConversion(delegateResolutionResult.DelegateConversions) Then
Binding\Binder_Expressions.vb (8)
1591
Case VisualBasic.
OptionStrict
.On
1597
Case VisualBasic.
OptionStrict
.Custom
2171
If OptionStrict = VisualBasic.
OptionStrict
.On Then
2175
ElseIf OptionStrict = VisualBasic.
OptionStrict
.Custom Then
2181
If OptionStrict = VisualBasic.
OptionStrict
.On Then
2185
ElseIf OptionStrict = VisualBasic.
OptionStrict
.Custom Then
4654
If OptionStrict =
OptionStrict
.On Then
4657
ElseIf OptionStrict =
OptionStrict
.Custom Then
Binding\Binder_Initializers.vb (1)
173
initializerBinder.OptionStrict <> VisualBasic.
OptionStrict
.On AndAlso
Binding\Binder_Invocation.vb (3)
758
Debug.Assert(OptionStrict <> VisualBasic.
OptionStrict
.On)
2511
If OptionStrict = VisualBasic.
OptionStrict
.On Then
2579
If OptionStrict = VisualBasic.
OptionStrict
.On Then
Binding\Binder_Lambda.vb (4)
652
If OptionStrict =
OptionStrict
.On Then
654
ElseIf OptionStrict =
OptionStrict
.Custom Then
967
If OptionStrict =
OptionStrict
.On Then
977
ElseIf OptionStrict =
OptionStrict
.Custom Then
Binding\Binder_Latebound.vb (4)
39
If OptionStrict = VisualBasic.
OptionStrict
.On Then
56
ElseIf OptionStrict = VisualBasic.
OptionStrict
.Custom AndAlso Not suppressLateBindingResolutionDiagnostics Then
143
If OptionStrict = VisualBasic.
OptionStrict
.On Then
160
ElseIf OptionStrict = VisualBasic.
OptionStrict
.Custom AndAlso Not suppressLateBindingResolutionDiagnostics Then
Binding\Binder_Operators.vb (4)
381
If OptionStrict = VisualBasic.
OptionStrict
.On Then
402
ElseIf OptionStrict = VisualBasic.
OptionStrict
.Custom Then 'warn if option strict is off
1178
If OptionStrict = VisualBasic.
OptionStrict
.On Then
1180
ElseIf OptionStrict = VisualBasic.
OptionStrict
.Custom Then
Binding\Binder_Statements.vb (9)
1278
If OptionStrict =
OptionStrict
.On Then
1281
ElseIf OptionStrict =
OptionStrict
.Custom Then
1286
If OptionStrict =
OptionStrict
.On Then
1289
ElseIf OptionStrict =
OptionStrict
.Custom Then
1410
ElseIf Not symbol.IsStatic AndAlso OptionStrict <>
OptionStrict
.On AndAlso
3783
If ((collection.IsNothingLiteral OrElse collectionType.IsObjectType) AndAlso Me.OptionStrict <>
OptionStrict
.On) OrElse
3799
Debug.Assert(collectionType IsNot Nothing OrElse collection.IsNothingLiteral AndAlso Me.OptionStrict =
OptionStrict
.On)
3979
Debug.Assert(collectionType IsNot Nothing OrElse OptionStrict <>
OptionStrict
.On AndAlso collection.Kind = BoundKind.Conversion AndAlso DirectCast(collection, BoundConversion).Operand.IsNothingLiteral)
4583
(resourceType.IsObjectType() AndAlso OptionStrict <>
OptionStrict
.On) Then
Binding\Binder_XmlLiterals.vb (1)
180
If argument.Type.IsObjectType AndAlso OptionStrict <> VisualBasic.
OptionStrict
.On Then
Binding\OptionStrictOffBinder.vb (2)
26
Public Overrides ReadOnly Property OptionStrict As
OptionStrict
28
Return
OptionStrict
.Off
Binding\SourceFileBinder.vb (3)
39
Public Overrides ReadOnly Property OptionStrict As
OptionStrict
44
Return If(_sourceFile.OptionStrict.Value,
OptionStrict
.On,
OptionStrict
.Off)
Binding\SourceModuleBinder.vb (1)
41
Public Overrides ReadOnly Property OptionStrict As
OptionStrict
CommandLine\VisualBasicCommandLineParser.vb (6)
136
Dim optionStrict As
OptionStrict
=
OptionStrict
.Off
255
optionStrict = VisualBasic.
OptionStrict
.On
257
optionStrict = VisualBasic.
OptionStrict
.Custom
270
optionStrict = VisualBasic.
OptionStrict
.On
279
optionStrict = VisualBasic.
OptionStrict
.Off
Compilation\SemanticModel.vb (1)
2991
Public ReadOnly Property OptionStrict As VisualBasic.
OptionStrict
OptionStrict.vb (3)
35
Friend Function IsValid(value As
OptionStrict
) As Boolean
36
Return value >=
OptionStrict
.Off AndAlso value <=
OptionStrict
.[On]
Semantics\OverloadResolution.vb (7)
966
result = ReportOverloadResolutionFailedOrLateBound(candidates, applicableInstanceCandidateCount, lateBindingIsAllowed AndAlso binder.OptionStrict <>
OptionStrict
.On, asyncLambdaSubToFunctionMismatch)
1149
lateBindingIsAllowed AndAlso binder.OptionStrict <>
OptionStrict
.On, binder,
1184
Return ReportOverloadResolutionFailedOrLateBound(candidates, applicableCandidates, lateBindingIsAllowed AndAlso binder.OptionStrict <>
OptionStrict
.On, asyncLambdaSubToFunctionMismatch)
2972
If binder.OptionStrict =
OptionStrict
.On Then
3241
If binder.OptionStrict =
OptionStrict
.On Then
3360
If binder.OptionStrict =
OptionStrict
.On Then
4896
If binder.OptionStrict =
OptionStrict
.On AndAlso Not inferredTypeByAssumption.IsNull Then
Semantics\TypeInference\TypeArgumentInference.vb (1)
1950
(addrOf.Binder.OptionStrict =
OptionStrict
.On AndAlso Conversions.IsNarrowingMethodConversion(methodConversions, isForAddressOf:=True)) Then
Symbols\Source\CustomEventAccessorSymbol.vb (1)
198
(binder.OptionStrict =
OptionStrict
.On AndAlso Conversions.IsNarrowingMethodConversion(conversion, False))) Then
Symbols\Source\SourceComplexParameterSymbol.vb (2)
333
If binder.OptionStrict =
OptionStrict
.On Then
335
ElseIf binder.OptionStrict =
OptionStrict
.Custom Then
Symbols\Source\SourceDelegateMethodSymbol.vb (2)
114
If binder.OptionStrict =
OptionStrict
.On Then
116
ElseIf binder.OptionStrict =
OptionStrict
.Custom Then
Symbols\Source\SourceMemberFieldSymbol.vb (2)
178
If binder.OptionStrict =
OptionStrict
.On Then
180
ElseIf binder.OptionStrict =
OptionStrict
.Custom Then
Symbols\Source\SourceMethodSymbol.vb (2)
2276
If binder.OptionStrict =
OptionStrict
.On Then
2278
ElseIf binder.OptionStrict =
OptionStrict
.Custom Then
Symbols\Source\SourcePropertySymbol.vb (2)
362
If binder.OptionStrict =
OptionStrict
.On Then
364
ElseIf binder.OptionStrict =
OptionStrict
.Custom Then
VisualBasicCompilationOptions.vb (13)
21
Private _optionStrict As
OptionStrict
44
''' <param name="optionStrict">An optional parameter to specify the default Option Strict behavior. <see cref="VisualBasic.
OptionStrict
"/></param>
75
Optional optionStrict As
OptionStrict
=
OptionStrict
.Off,
152
optionStrict As
OptionStrict
,
220
optionStrict As
OptionStrict
,
391
Public ReadOnly Property OptionStrict As
OptionStrict
573
''' <param name="value">The Option Strict setting. <see cref="Microsoft.CodeAnalysis.VisualBasic.
OptionStrict
"/></param>
575
Public Shadows Function WithOptionStrict(value As
OptionStrict
) As VisualBasicCompilationOptions
1151
optionStrict As
OptionStrict
,
1216
optionStrict As
OptionStrict
,
1282
Optional optionStrict As
OptionStrict
=
OptionStrict
.Off,
VisualBasicExtensions.vb (1)
665
Public Function OptionStrict(semanticModel As SemanticModel) As
OptionStrict
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (2)
CastAnalyzer.vb (1)
339
Not _semanticModel.OptionStrict =
OptionStrict
.On Then
SpeculationAnalyzer.vb (1)
561
If Me.OriginalSemanticModel.OptionStrict() <>
OptionStrict
.Off AndAlso
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests (1)
AddExplicitCastTests.vb (1)
514
End Enum", compilationOptions:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication, optionStrict:=
OptionStrict
.Off))
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (6)
CommandLineTests.vb (6)
2205
Assert.Equal(VisualBasic.
OptionStrict
.On, parsedArgs.CompilationOptions.OptionStrict)
2209
Assert.Equal(VisualBasic.
OptionStrict
.On, parsedArgs.CompilationOptions.OptionStrict)
2213
Assert.Equal(VisualBasic.
OptionStrict
.Off, parsedArgs.CompilationOptions.OptionStrict)
2217
Assert.Equal(VisualBasic.
OptionStrict
.Custom, parsedArgs.CompilationOptions.OptionStrict)
2221
Assert.Equal(VisualBasic.
OptionStrict
.Off, parsedArgs.CompilationOptions.OptionStrict)
2225
Assert.Equal(VisualBasic.
OptionStrict
.Custom, parsedArgs.CompilationOptions.OptionStrict)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (1)
AddExplicitCastTests.vb (1)
514
End Enum", compilationOptions:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication, optionStrict:=
OptionStrict
.Off))
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (18)
CodeGen\CodeGenDelegateCreation.vb (4)
2041
CompileAndVerify(source, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
2046
CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom)).
2431
Dim c = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, options:=TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
2443
c = c.WithOptions(c.Options.WithOptionStrict(
OptionStrict
.On))
CodeGen\CodeGenLateBound.vb (1)
3791
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
CodeGen\CodeGenNullable.vb (9)
1751
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
3574
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(source, options:=TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Off).WithOptionInfer(False))
3601
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Off).WithOptionInfer(True))
3637
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On).WithOptionInfer(False))
3685
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On).WithOptionInfer(True))
3773
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(source, options:=TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Off).WithOptionInfer(False))
3797
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Off).WithOptionInfer(True))
3821
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On).WithOptionInfer(False))
3845
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On).WithOptionInfer(True))
PDB\VisualBasicDeterministicBuildCompilationTests.vb (1)
196
optionStrict:=
OptionStrict
.Off,
XmlLiteralTests.vb (3)
4388
</compilation>, Net40XmlReferences, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Off))
4395
compilation = compilation.WithOptions(compilation.Options.WithOptionStrict(
OptionStrict
.Custom))
4402
compilation = compilation.WithOptions(compilation.Options.WithOptionStrict(
OptionStrict
.On))
Microsoft.CodeAnalysis.VisualBasic.Features (1)
GenerateMember\GenerateParameterizedMember\VisualBasicCommonGenerationServiceMethods.vb (1)
22
Return options.OptionStrict =
OptionStrict
.On
Microsoft.CodeAnalysis.VisualBasic.Scripting (1)
VisualBasicScriptCompiler.vb (1)
82
optionStrict:=
OptionStrict
.Off,
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (503)
Binding\BindingErrorTests.vb (25)
9157
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
9168
compilation = compilation.WithOptions(compilation.Options.WithOptionStrict(
OptionStrict
.Custom))
9203
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
9243
</compilation>, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
9252
compilation = compilation.WithOptions(compilation.Options.WithOptionStrict(
OptionStrict
.Custom))
18420
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
18681
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
18705
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
18731
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
18757
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
18779
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
18812
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
18908
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
18931
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
18952
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
18973
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
18994
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
19588
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
19639
</compilation>, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Custom))
19665
</compilation>, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Custom))
24247
</compilation>, {Net40.SystemCore}, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
24285
</compilation>, {Net40.SystemCore}, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
24320
</compilation>, {Net40.SystemCore}, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
24368
</compilation>, {Net40.SystemCore}, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
24411
</compilation>, {Net40.SystemCore}, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
Binding\ForEachTests.vb (4)
1117
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, options:=TestOptions.ReleaseDll.WithOptionInfer(True).WithOptionStrict(
OptionStrict
.Off))
1129
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionInfer(False).WithOptionStrict(
OptionStrict
.Off))
1138
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionInfer(False).WithOptionStrict(
OptionStrict
.On))
1150
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionInfer(True).WithOptionStrict(
OptionStrict
.On))
Compilation\SemanticModelAPITests.vb (3)
4149
</compilation>, Nothing, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Off))
4169
</compilation>, Nothing, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
4475
</compilation>, Nothing, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
Compilation\VisualBasicCompilationOptionsTests.vb (3)
97
TestProperty(Function(old, value) old.WithOptionStrict(value), Function(opt) opt.OptionStrict,
OptionStrict
.On)
189
AssertTheseDiagnostics(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(CType(3,
OptionStrict
)).Errors,
292
AssertTheseDiagnostics(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication, optionStrict:=CType(3,
OptionStrict
)).Errors,
Semantics\ArrayLiteralTests.vb (9)
24
Private ReadOnly _strictOff As VisualBasicCompilationOptions = New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Off)
25
Private ReadOnly _strictOn As VisualBasicCompilationOptions = New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On)
26
Private ReadOnly _strictCustom As VisualBasicCompilationOptions = New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Custom)
803
Dim strictOffOverflowChecksOff = New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Off).WithOverflowChecks(False)
810
Dim strictOnOverflowChecksOff = New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On).WithOverflowChecks(False)
845
Dim strictOffOverflowChecksOff = New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Off).WithOverflowChecks(False)
852
Dim strictOnOverflowChecksOff = New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On).WithOverflowChecks(False)
887
Dim strictOffOverflowChecksOff = New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Off).WithOverflowChecks(False)
895
Dim strictOnOverflowChecksOff = New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On).WithOverflowChecks(False)
Semantics\AsyncAwait.vb (2)
820
compilation = compilation.WithOptions(compilation.Options.WithOptionStrict(
OptionStrict
.Custom))
832
compilation = compilation.WithOptions(compilation.Options.WithOptionStrict(
OptionStrict
.On))
Semantics\BinaryOperators.vb (3)
746
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Custom))
747
Assert.Equal(
OptionStrict
.Custom, compilation.Options.OptionStrict)
768
</compilation>, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
Semantics\CompoundAssignment.vb (2)
218
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
291
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
Semantics\ConditionalAccessTests.vb (2)
3344
TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
3987
TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
Semantics\ConditionalExpressionsTests.vb (31)
41
TestCondition("if(nothing, GetString, 1.234)", strict:=
OptionStrict
.On, errors:=
47
TestCondition("if(nothing, GetString, 1.234)", expectedType:="System.Object", strict:=
OptionStrict
.Custom, errors:=
53
TestCondition("if(nothing, GetString, 1.234)", expectedType:="System.Object", strict:=
OptionStrict
.Off)
60
TestCondition("if(""string"", #1/1/1#)", expectedType:="System.String", strict:=
OptionStrict
.Off)
81
TestCondition("if(GetString, 1.234)", strict:=
OptionStrict
.On, errors:=
87
TestCondition("if(GetString, 1.234)", expectedType:="System.Object", strict:=
OptionStrict
.Custom)
88
TestCondition("if(GetString, 1.234)", expectedType:="System.Object", strict:=
OptionStrict
.Off)
99
TestCondition("if(GetBoolean(), GetUserGeneric(Of T), ""abc"")", strict:=
OptionStrict
.On, errors:=
105
TestCondition("if(GetBoolean(), GetUserGeneric(Of T), ""abc"")", expectedType:="System.Object", strict:=
OptionStrict
.Custom, errors:=
111
TestCondition("if(GetBoolean(), GetUserGeneric(Of T), ""abc"")", expectedType:="System.Object", strict:=
OptionStrict
.Off)
123
TestCondition("if(GetUserGeneric(Of T), ""abc"")", strict:=
OptionStrict
.On, errors:=
129
TestCondition("if(GetUserGeneric(Of T), ""abc"")", expectedType:="System.Object", strict:=
OptionStrict
.Custom, errors:=
135
TestCondition("if(GetUserGeneric(Of T), ""abc"")", expectedType:="System.Object", strict:=
OptionStrict
.Off)
157
TestCondition("if(nothing, nothing, nothing)", expectedType:="System.Object", strict:=
OptionStrict
.Off)
158
TestCondition("if(nothing, nothing, nothing)", expectedType:="System.Object", strict:=
OptionStrict
.Custom)
159
TestCondition("if(nothing, nothing, nothing)", expectedType:="System.Object", strict:=
OptionStrict
.On)
161
TestCondition("if(""yes"", nothing, nothing)", expectedType:="System.Object", strict:=
OptionStrict
.Off)
162
TestCondition("if(""yes"", nothing, nothing)", expectedType:="System.Object", strict:=
OptionStrict
.Custom)
163
TestCondition("if(""yes"", nothing, nothing)", strict:=
OptionStrict
.On, errors:=
186
TestCondition("if(1 > 2, AddressOf Func1, AddressOf Func2)", strict:=
OptionStrict
.On, errors:=
222
TestCondition("if(AddressOf Func1, AddressOf Func2)", strict:=
OptionStrict
.On, errors:=
246
Optional strict As
OptionStrict
=
OptionStrict
.On)
522
Private Sub TestInvalidTernaryIfOperatorsStrict(strict As
OptionStrict
, errs As XElement)
584
TestInvalidTernaryIfOperatorsStrict(
OptionStrict
.On,
616
TestInvalidTernaryIfOperatorsStrict(
OptionStrict
.Custom,
654
TestInvalidTernaryIfOperatorsStrict(
OptionStrict
.Off,
672
Private Sub TestInvalidBinaryIfOperatorsStrict(strict As
OptionStrict
, errs As XElement)
744
TestInvalidBinaryIfOperatorsStrict(
OptionStrict
.On,
785
TestInvalidBinaryIfOperatorsStrict(
OptionStrict
.Custom,
839
TestInvalidBinaryIfOperatorsStrict(
OptionStrict
.Off,
Semantics\Conversions.vb (44)
2761
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On))
2815
compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Off))
2866
compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Custom))
3032
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On))
3069
compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Off))
3209
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On))
3237
compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Off))
4453
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Off).WithOverflowChecks(False))
4456
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Custom).WithOverflowChecks(False))
4459
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.On).WithOverflowChecks(False))
4462
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Off).WithOverflowChecks(True))
4465
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Custom).WithOverflowChecks(True))
4468
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.On).WithOverflowChecks(True))
4492
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Off).WithOverflowChecks(False))
4495
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Custom).WithOverflowChecks(False))
4498
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.On).WithOverflowChecks(False))
4501
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Off).WithOverflowChecks(True))
4504
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Custom).WithOverflowChecks(True))
4507
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.On).WithOverflowChecks(True))
4526
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Off).WithOverflowChecks(False))
4529
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Custom).WithOverflowChecks(False))
4532
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.On).WithOverflowChecks(False))
4541
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Off).WithOverflowChecks(True))
4544
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Custom).WithOverflowChecks(True))
4547
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.On).WithOverflowChecks(True))
4582
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Off).WithOverflowChecks(False))
4587
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Custom).WithOverflowChecks(False))
4592
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.On).WithOverflowChecks(False))
4603
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Off).WithOverflowChecks(True))
4606
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Custom).WithOverflowChecks(True))
4609
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.On).WithOverflowChecks(True))
4628
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Off).WithOverflowChecks(False))
4631
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Custom).WithOverflowChecks(False))
4634
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.On).WithOverflowChecks(False))
4637
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Off).WithOverflowChecks(True))
4640
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Custom).WithOverflowChecks(True))
4643
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.On).WithOverflowChecks(True))
4662
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Off).WithOverflowChecks(False))
4665
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Custom).WithOverflowChecks(False))
4668
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.On).WithOverflowChecks(False))
4671
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Off).WithOverflowChecks(True))
4674
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Custom).WithOverflowChecks(True))
4677
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.On).WithOverflowChecks(True))
4701
compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(
OptionStrict
.Off).WithOverflowChecks(False))
Semantics\Conversions_AnonymousDelegates.vb (83)
39
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
130
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
187
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
275
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
354
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
356
Assert.Equal(
OptionStrict
.Custom, compilation.Options.OptionStrict)
378
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
380
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
424
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
503
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
505
Assert.Equal(
OptionStrict
.Custom, compilation.Options.OptionStrict)
533
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
535
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
582
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
674
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
762
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
850
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
939
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
1026
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
1078
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
1181
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
1231
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
1308
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1310
Assert.Equal(
OptionStrict
.Custom, compilation.Options.OptionStrict)
1339
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
1341
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
1390
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
1495
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
1581
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
1631
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
1707
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1709
Assert.Equal(
OptionStrict
.Custom, compilation.Options.OptionStrict)
1730
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
1732
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
1777
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
1825
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
1883
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
1978
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1980
Assert.Equal(
OptionStrict
.Custom, compilation.Options.OptionStrict)
2009
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
2011
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
2161
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
2208
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
2285
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
2328
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
2369
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
2378
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
2429
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
2484
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
Semantics\Lambda_AnonymousDelegateInference.vb (15)
55
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
69
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
71
Assert.Equal(
OptionStrict
.Custom, compilation.Options.OptionStrict)
93
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
95
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
160
For Each strict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
322
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
331
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
333
Assert.Equal(
OptionStrict
.Custom, compilation.Options.OptionStrict)
350
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
352
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
434
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
553
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
Semantics\Lambda_Relaxation.vb (81)
35
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
109
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
111
Assert.Equal(
OptionStrict
.Custom, compilation.Options.OptionStrict)
118
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
120
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
148
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
246
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
344
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
441
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
516
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
518
Assert.Equal(
OptionStrict
.Custom, compilation.Options.OptionStrict)
544
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
546
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
592
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
676
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
760
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
845
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
921
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
966
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
1019
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
1175
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
1238
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
1290
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
1401
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1403
Assert.Equal(
OptionStrict
.Custom, compilation.Options.OptionStrict)
1446
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
1448
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
1512
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
1611
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
1688
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
1742
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
1902
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
1994
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
2050
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
2140
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
2142
Assert.Equal(
OptionStrict
.Custom, compilation.Options.OptionStrict)
2168
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
2170
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
2222
For Each optStrict In {
OptionStrict
.Off,
OptionStrict
.On,
OptionStrict
.Custom}
2542
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
2608
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
2735
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
2783
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
Semantics\LambdaTests.vb (42)
781
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
788
compilation = compilation.WithOptions(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On))
790
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
833
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
840
compilation = compilation.WithOptions(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On))
842
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
889
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
898
compilation = compilation.WithOptions(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On))
900
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
943
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
950
compilation = compilation.WithOptions(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On))
952
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
1047
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
1058
compilation = compilation.WithOptions(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On))
1060
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
1092
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
1098
compilation = compilation.WithOptions(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On))
1100
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
1147
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
1154
compilation = compilation.WithOptions(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On))
1156
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
1203
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
1210
compilation = compilation.WithOptions(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On))
1212
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
1261
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
1267
compilation = compilation.WithOptions(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On))
1269
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
1355
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
1556
Dim comp1 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Off))
1558
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
1576
Dim comp1 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Off))
1578
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
1599
Dim comp1 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Off))
1601
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
1619
Dim comp1 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Off))
1621
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
1646
Dim comp1 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Off))
1648
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
1669
Dim comp1 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Off))
1671
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
1693
Dim comp1 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Off))
1695
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
Semantics\MethodCalls.vb (2)
2809
New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Custom)).
5020
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
Semantics\MultiDimensionalTest.vb (4)
683
Dim compilation = CreateCompilationWithCustomILSource(source, s_arraysOfRank1IlSource, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
707
compilation = compilation.WithOptions(compilation.Options.WithOptionStrict(
OptionStrict
.Off))
792
Dim compilation = CreateCompilationWithCustomILSource(source, ilSource, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
810
compilation = compilation.WithOptions(compilation.Options.WithOptionStrict(
OptionStrict
.Off))
Semantics\NewOnInterfaceTests.vb (2)
678
</compilation>, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
730
</compilation>, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Off))
Semantics\OptionApis.vb (4)
36
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom).WithOptionInfer(False).WithOptionExplicit(True).WithOptionCompareText(False))
39
Assert.Equal(
OptionStrict
.On, semanticModelAllOn.OptionStrict)
45
Assert.Equal(
OptionStrict
.Off, semanticModelAllOff.OptionStrict)
51
Assert.Equal(
OptionStrict
.Custom, semanticModelEmpty.OptionStrict)
Semantics\OverloadResolution.vb (18)
3857
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Custom))
3859
Assert.Equal(
OptionStrict
.Custom, compilation.Options.OptionStrict)
4053
compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
4055
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
4066
compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
4068
Assert.Equal(
OptionStrict
.Custom, compilation.Options.OptionStrict)
4090
compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
4092
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
4126
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On))
4129
compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Off))
4157
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On))
4192
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On))
4230
compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On))
4238
compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Off))
4754
Dim Compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Off))
4790
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Off))
5008
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Off))
5043
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Off))
Semantics\QueryExpressions.vb (4)
2823
Assert.Equal(
OptionStrict
.Off, compilation.Options.OptionStrict)
2844
compilation = compilation.WithOptions(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On))
2845
Assert.Equal(
OptionStrict
.On, compilation.Options.OptionStrict)
3623
Dim verifier = CompileAndVerify(compilationDef, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Custom),
Semantics\SelectCaseTests.vb (1)
607
</compilation>, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
Semantics\TypeArgumentInference.vb (6)
852
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On))
861
compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Off))
1033
Dim comp1 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Off))
1035
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On))
1813
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntimeAndReferences(compilationDef, {SystemCoreRef}, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1824
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
Semantics\UnaryOperators.vb (2)
560
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
561
Assert.Equal(
OptionStrict
.Custom, compilation.Options.OptionStrict)
Semantics\UserDefinedBinaryOperators.vb (8)
1843
options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1933
options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1980
options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
2039
options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
2125
options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
2193
options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
2281
options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
2516
options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
Semantics\UserDefinedConversions.vb (51)
167
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
229
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
286
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
326
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
362
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
402
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
492
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
544
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
597
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
650
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
703
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
793
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
843
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
1008
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
1050
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
1101
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
1446
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
1502
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
1561
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
1617
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
1851
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
1922
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
2645
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
2688
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
2746
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
2790
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
2917
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
3016
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
3075
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
3126
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom).WithOverflowChecks(True))
3189
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom).WithOverflowChecks(True),
3243
options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom).WithOverflowChecks(False))
3309
options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom).WithOverflowChecks(False))
3376
options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom).WithOverflowChecks(False))
3436
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom).WithOverflowChecks(False),
3482
options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom).WithOverflowChecks(False))
3645
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
3711
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
3765
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
3818
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
3858
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
3925
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
3977
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
4045
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
4132
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
4200
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
4259
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
4312
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
4349
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
4388
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
4449
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
Semantics\UsingStatementTest.vb (3)
233
</compilation>, expectedOutput:="Hi there", options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Off)).
283
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
295
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
Semantics\VariableTypeInference.vb (15)
426
</compilation>, TestOptions.ReleaseDll.WithOptionInfer(True).WithOptionStrict(
OptionStrict
.On))
429
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionInfer(False).WithOptionStrict(
OptionStrict
.On))
444
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionInfer(False).WithOptionStrict(
OptionStrict
.Off))
469
</compilation>, TestOptions.ReleaseDll.WithOptionInfer(True).WithOptionStrict(
OptionStrict
.On))
477
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionInfer(True).WithOptionStrict(
OptionStrict
.Off))
484
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionInfer(False).WithOptionStrict(
OptionStrict
.On))
491
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionInfer(False).WithOptionStrict(
OptionStrict
.Off))
497
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionInfer(True).WithOptionStrict(
OptionStrict
.Custom))
504
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionInfer(False).WithOptionStrict(
OptionStrict
.Custom))
533
</compilation>, TestOptions.ReleaseDll.WithOptionInfer(True).WithOptionStrict(
OptionStrict
.On))
542
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionInfer(True).WithOptionStrict(
OptionStrict
.Off))
549
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionInfer(False).WithOptionStrict(
OptionStrict
.On))
556
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionInfer(False).WithOptionStrict(
OptionStrict
.Off))
562
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionInfer(True).WithOptionStrict(
OptionStrict
.Custom))
570
compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOptionInfer(False).WithOptionStrict(
OptionStrict
.Custom))
Semantics\VarianceConversions.vb (34)
427
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
677
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
764
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
788
compilation = compilation.WithOptions(compilation.Options.WithOptionStrict(
OptionStrict
.On))
892
TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1000
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1057
compilation = compilation.WithOptions(TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
1170
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1275
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1443
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1562
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1609
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1650
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1705
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1759
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1809
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1859
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1901
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1943
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
1988
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
2033
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
2081
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
2136
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
2192
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
2249
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
2288
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
2519
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
2579
compilation = compilation.WithOptions(compilation.Options.WithOptionStrict(
OptionStrict
.On))
2670
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
2703
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
2712
compilation = compilation.WithOptions(compilation.Options.WithOptionStrict(
OptionStrict
.On))
2752
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom),
2796
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
2838
Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On),
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (62)
SymbolsTests\ExtensionMethods\LookupAndInvocation.vb (4)
1486
CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Off),
1503
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
1615
CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On),
2615
Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
SymbolsTests\Source\BindingsTests.vb (14)
144
Assert.Equal(
OptionStrict
.Off, context.OptionStrict)
150
Assert.Equal(
OptionStrict
.Off, context.OptionStrict)
156
Assert.Equal(
OptionStrict
.Off, context.OptionStrict)
162
Assert.Equal(
OptionStrict
.Off, context.OptionStrict)
168
Assert.Equal(
OptionStrict
.Off, context.OptionStrict)
174
Assert.Equal(
OptionStrict
.On, context.OptionStrict)
181
Assert.Equal(
OptionStrict
.On, context.OptionStrict)
188
Assert.Equal(
OptionStrict
.Off, context.OptionStrict)
193
Assert.Equal(
OptionStrict
.On, context.OptionStrict)
241
Assert.Equal(
OptionStrict
.Off, context.OptionStrict)
247
Assert.Equal(
OptionStrict
.Off, context.OptionStrict)
253
Assert.Equal(
OptionStrict
.Off, context.OptionStrict)
260
Assert.Equal(
OptionStrict
.Off, context.OptionStrict)
267
Assert.Equal(
OptionStrict
.Off, context.OptionStrict)
SymbolsTests\Source\DelegateTests.vb (6)
392
Dim comp1 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Off))
394
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
410
Dim comp1 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Off))
412
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
428
Dim comp1 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Off))
430
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
SymbolsTests\Source\EnumTests.vb (1)
201
comp = CompilationUtils.CreateCompilationWithMscorlib40(text, options:=TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
SymbolsTests\Source\EventTests.vb (17)
120
Dim comp = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
150
options:=TestOptions.DebugDll.WithOptionStrict(
OptionStrict
.On))
188
Dim comp = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
218
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
241
Dim comp1 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Off))
243
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
362
Dim comp1 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Off))
364
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
385
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
422
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
453
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
482
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
511
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
550
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
594
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
638
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
800
Dim comp2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.On))
SymbolsTests\Source\VarianceTests.vb (5)
54
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom))
208
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
279
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
501
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
553
Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.On))
SymbolsTests\SymbolErrorTests.vb (15)
19731
</compilation>, New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary, optionStrict:=
OptionStrict
.Custom))
19844
</compilation>, TestOptions.ReleaseExe.WithOptionInfer(False).WithOptionStrict(
OptionStrict
.Custom))
19859
compilation1 = compilation1.WithOptions(TestOptions.ReleaseExe.WithOptionInfer(False).WithOptionStrict(
OptionStrict
.Off))
19877
</compilation>, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionInfer(True).WithOptionStrict(
OptionStrict
.Custom))
19885
compilation1 = compilation1.WithOptions(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionInfer(True).WithOptionStrict(
OptionStrict
.Off))
19889
compilation1 = compilation1.WithOptions(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionInfer(True).WithOptionStrict(
OptionStrict
.On))
19940
</compilation>, TestOptions.ReleaseDll.WithOptionInfer(True).WithOptionStrict(
OptionStrict
.On))
19958
</compilation>, TestOptions.ReleaseExe.WithOptionInfer(True).WithOptionStrict(
OptionStrict
.On))
19962
compilation2 = compilation2.WithOptions(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionInfer(False).WithOptionStrict(
OptionStrict
.On))
19984
</compilation>, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionInfer(True).WithOptionStrict(
OptionStrict
.On))
20018
</compilation>, TestOptions.ReleaseExe.WithOptionStrict(
OptionStrict
.Custom).WithOptionInfer(True))
20033
compilation1 = compilation1.WithOptions(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Off).WithOptionInfer(True))
20059
</compilation>, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.On).WithOptionInfer(True))
20088
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom))
20534
</compilation>, New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary, optionStrict:=
OptionStrict
.Custom))
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (5)
TestSyntaxNodes.vb (5)
3307
New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(
OptionStrict
.Custom))
3478
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom).WithOptionInfer(False).WithOptionExplicit(True).WithOptionCompareText(False))
3488
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom).WithOptionInfer(False).WithOptionExplicit(False).WithOptionCompareText(False))
3498
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom).WithOptionInfer(False).WithOptionExplicit(True).WithOptionCompareText(False))
3520
</compilation>, TestOptions.ReleaseDll.WithOptionStrict(
OptionStrict
.Custom).WithOptionInfer(False).WithOptionExplicit(True).WithOptionCompareText(False))
Microsoft.CodeAnalysis.VisualBasic.Workspaces (3)
CastAnalyzer.vb (1)
339
Not _semanticModel.OptionStrict =
OptionStrict
.On Then
Serialization\VisualBasicOptionsSerializationService.vb (1)
91
Dim optionStrict = CType(reader.ReadInt32(),
OptionStrict
)
SpeculationAnalyzer.vb (1)
561
If Me.OriginalSemanticModel.OptionStrict() <>
OptionStrict
.Off AndAlso
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
VisualStudioMSBuildWorkspaceTests.cs (3)
1732
await AssertVBCompilationOptionsAsync(VB.
OptionStrict
.On, options => options.OptionStrict);
1743
await AssertVBCompilationOptionsAsync(VB.
OptionStrict
.Custom, options => options.OptionStrict);
1750
await AssertVBCompilationOptionsAsync(VB.
OptionStrict
.Custom, options => options.OptionStrict);
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)
ProjectSystemShim\VisualBasicProject.OptionsProcessor.vb (2)
88
.WithOptionStrict(If(compilerOptions.bOptionStrictOff,
OptionStrict
.Custom,
OptionStrict
.On)) _