IInvocationOperation (System.Boolean Test.TakeOutParam(System.Object y, out System.Int32 x)) (OperationKind.Invocation, Type: System.Boolean, IsInvalid) (Syntax: 'TakeOutPara ... out int x3)')
@@ -5236,6 +5267,7 @@ static bool TakeOutParam(object y, out int x)
VerifyNotInScope(model, x7Ref[2]);
}
[CompilerTrait(CompilerFeature.IOperation)]
[Fact]
public void FieldInitializers_01()
{
...
...
@@ -5272,6 +5304,39 @@ static bool TakeOutParam(int y, out int x)
// static bool Test1 = TakeOutParam(1, out int x1) && Dummy(x1);
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion7_2, "int x1").WithArguments("declaration of expression variables in member initializers and queries", "7.3").WithLocation(9, 45)
);
var tree = compilation.SyntaxTrees.Single();
var node = tree.GetRoot().DescendantNodes().OfType<EqualsValueClauseSyntax>().Single();
IInvocationOperation (System.Boolean X.TakeOutParam(System.Int32 y, out System.Int32 x)) (OperationKind.Invocation, Type: System.Boolean) (Syntax: 'TakeOutPara ... out int x1)')
IInvocationOperation (System.Boolean X.TakeOutParam(System.Int32 y, out System.Int32 x)) (OperationKind.Invocation, Type: System.Boolean, IsInvalid) (Syntax: 'TakeOutPara ... out int x3)')
@@ -10688,6 +10783,7 @@ static bool TakeOutParam(int y, out int x)
VerifyNotInScope(model, x7Ref[2]);
}
[CompilerTrait(CompilerFeature.IOperation)]
[Fact]
public void PropertyInitializers_01()
{
...
...
@@ -10724,6 +10820,38 @@ static bool TakeOutParam(int y, out int x)
// static bool Test1 {get;} = TakeOutParam(1, out int x1) && Dummy(x1);
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion7_2, "int x1").WithArguments("declaration of expression variables in member initializers and queries", "7.3").WithLocation(9, 52)
);
var tree = compilation.SyntaxTrees.Single();
var node = tree.GetRoot().DescendantNodes().OfType<EqualsValueClauseSyntax>().Single();
IInvocationOperation (System.Boolean X.TakeOutParam(System.Int32 y, out System.Int32 x)) (OperationKind.Invocation, Type: System.Boolean) (Syntax: 'TakeOutPara ... out int x1)')
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.