diff --git a/src/Compilers/VisualBasic/Test/Semantic/Binding/ImplicitVariableTests.vb b/src/Compilers/VisualBasic/Test/Semantic/Binding/ImplicitVariableTests.vb index 34d879ab79db2..61649682b8aaa 100644 --- a/src/Compilers/VisualBasic/Test/Semantic/Binding/ImplicitVariableTests.vb +++ b/src/Compilers/VisualBasic/Test/Semantic/Binding/ImplicitVariableTests.vb @@ -1082,7 +1082,7 @@ End Module - Public Sub NotDeclaredTupleDeconstructionsAreConsideredObjects() + Public Sub NotDeclaredTupleDeconstructionsAreConsideredObjects_ExplicitOff() Dim compilation = CreateCompilationWithMscorlibAndVBRuntime( Option Explicit Off @@ -1121,6 +1121,34 @@ BC42104: Variable 'member2' is used before it has been assigned a value. A null Assert.Equal("Object", tupleSymbol.Type.TupleElementTypes(1).Name) End Sub + + + Public Sub NotDeclaredTupleDeconstructionsProduceErrors_ExplicitOn() + Dim compilation = CreateCompilationWithMscorlibAndVBRuntime( + +Option Explicit On +Module TestModule + Sub Main() + Dim tuple = (member1, member2) + System.Console.WriteLine(tuple) + End Sub +End Module + , + additionalRefs:={ValueTupleRef, SystemRuntimeFacadeRef}, + options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication)) + + CompilationUtils.AssertTheseDiagnostics(compilation, + + ) + End Sub + Public Sub DeclaringImplicitlyDeclaredTupleArgumentsAgainInSameScopeErrorsOut()