238 references to None
GenerateDocumentationAndConfigFiles (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationParameterSymbol.cs (1)
62
public ScopedKind ScopedKind => ScopedKind.
None
;
Microsoft.CodeAnalysis.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationParameterSymbol.cs (1)
62
public ScopedKind ScopedKind => ScopedKind.
None
;
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationParameterSymbol.cs (1)
62
public ScopedKind ScopedKind => ScopedKind.
None
;
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationParameterSymbol.cs (1)
62
public ScopedKind ScopedKind => ScopedKind.
None
;
Microsoft.CodeAnalysis.CSharp (49)
Binder\Binder.QueryUnboundLambdaState.cs (1)
51
public override ScopedKind DeclaredScope(int index) => ScopedKind.
None
;
Binder\Binder.ValueChecks.cs (2)
3408
return ScopedKind.
None
;
3413
return ScopedKind.
None
;
Binder\Binder_AnonymousTypes.cs (1)
97
ScopedKind.
None
);
Binder\Binder_Expressions.cs (4)
11344
(parameters.Any(p => p.EffectiveScope != ScopedKind.
None
) ? parameters.SelectAsArray(p => p.EffectiveScope) : default);
11377
(parameterScopes.IsDefault || parameterScopes.All(scope => scope == ScopedKind.
None
)) &&
11411
parameterScopes.IsDefault ? ScopedKind.
None
: parameterScopes[i],
11416
fieldsBuilder.Add(new AnonymousTypeField(name: "", location, returnType, returnRefKind, ScopedKind.
None
));
Binder\Binder_Lambda.cs (1)
227
if (scopesBuilder.Any(s => s != ScopedKind.
None
))
Binder\Binder_Query.cs (1)
829
new AnonymousTypeField(fieldName, fieldValue.Syntax.Location, TypeWithAnnotations.Create(TypeOrError(fieldValue)), RefKind.None, ScopedKind.
None
);
Binder\RefSafetyAnalysis.cs (4)
507
var scopedModifier = _useUpdatedEscapeRules ? local.Scope : ScopedKind.
None
;
508
if (scopedModifier != ScopedKind.
None
)
548
if (_useUpdatedEscapeRules && localSymbol.Scope != ScopedKind.
None
)
673
tryGetReceiverParameter(m)?.EffectiveScope == ScopedKind.
None
)
BoundTree\UnboundLambda.cs (3)
703
if (scope == ScopedKind.
None
)
786
if (((DeclaredScope(i) == ScopedKind.
None
&& parameterScopesBuilder[i] == ScopedKind.ScopedRef) ||
1607
return _parameterDeclaredScopes.IsDefault ? ScopedKind.
None
: _parameterDeclaredScopes[index];
CodeGen\CodeGenerator_RefSafety.cs (1)
105
else if (parameter.RefKind != RefKind.None && parameter.EffectiveScope == ScopedKind.
None
)
CodeGen\Optimizer.cs (1)
2445
internal override ScopedKind Scope => ScopedKind.
None
;
Compilation\CSharpCompilation.cs (1)
4333
fields.Add(new AnonymousTypeField(name, location, TypeWithAnnotations.Create(type, nullableAnnotation), RefKind.None, ScopedKind.
None
));
Emitter\Model\PEModuleBuilder.cs (1)
1848
Debug.Assert(scope != ScopedKind.
None
);
FlowAnalysis\NullableWalker.PlaceholderLocal.cs (1)
73
internal override ScopedKind Scope => ScopedKind.
None
;
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (1)
317
(ScopedKind.
None
, false) => true,
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (1)
61
new SynthesizedDelegateInvokeMethod.ParameterDescription(TypeWithAnnotations.Create(typeParams[i]), refKinds.IsNull ? RefKind.None : refKinds[i], ScopedKind.
None
, defaultValue: null, isParams: false, hasUnscopedRefAttribute: false));
Symbols\FunctionPointers\FunctionPointerParameterSymbol.cs (1)
36
=> ParameterHelpers.IsRefScopedByDefault(this) ? ScopedKind.ScopedRef : ScopedKind.
None
;
Symbols\Metadata\PE\PEParameterSymbol.cs (2)
259
ScopedKind scope = ScopedKind.
None
;
327
scope = ScopedKind.
None
;
Symbols\SignatureOnlyParameterSymbol.cs (1)
61
=> ParameterHelpers.IsRefScopedByDefault(this) ? ScopedKind.ScopedRef : ScopedKind.
None
;
Symbols\Source\ParameterHelpers.cs (3)
321
Debug.Assert(parameter is SourceComplexParameterSymbolBase || parameter is not SourceParameterSymbol s || s.DeclaredScope == ScopedKind.
None
); // Only SourceComplexParameterSymbolBase validates 'scope'.
436
if (scope == ScopedKind.
None
)
1186
scope = ScopedKind.
None
;
Symbols\Source\SourceComplexParameterSymbol.cs (3)
217
if (scope != ScopedKind.
None
&&
221
return ScopedKind.
None
;
901
else if (DeclaredScope != ScopedKind.
None
)
Symbols\Source\SourceLocalSymbol.cs (2)
101
? isScoped ? ScopedKind.ScopedRef : ScopedKind.
None
102
: isScoped ? ScopedKind.ScopedValue : ScopedKind.
None
;
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
1411
p is { EffectiveScope: ScopedKind.
None
, RefKind: RefKind.Ref } or { EffectiveScope: ScopedKind.ScopedRef, RefKind: RefKind.Out } &&
1514
return allowVariance && baseScope == ScopedKind.
None
;
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (1)
397
if (extensionParameter.DeclaredScope != ScopedKind.
None
)
Symbols\Source\SourceParameterSymbol.cs (2)
83
scope == ScopedKind.
None
)
239
if (declaredScope == ScopedKind.
None
)
Symbols\Source\SourceSimpleParameterSymbol.cs (1)
39
: base(owner, ordinal, refKind, ScopedKind.
None
, name, location)
Symbols\Source\ThisParameterSymbol.cs (3)
192
var scope = _containingType.IsStructType() ? ScopedKind.ScopedRef : ScopedKind.
None
;
193
if (scope != ScopedKind.
None
&&
197
return ScopedKind.
None
;
Symbols\Synthesized\SynthesizedAccessorValueParameterSymbol.cs (1)
29
scope: ScopedKind.
None
)
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (1)
471
) : base(container, TypeWithAnnotations.Create(type), ordinal, RefKind.None, ScopedKind.
None
, name)
Symbols\Synthesized\SynthesizedLocal.cs (1)
188
internal sealed override ScopedKind Scope => ScopedKind.
None
;
Symbols\Synthesized\SynthesizedParameterSymbol.cs (1)
263
ScopedKind scope = ScopedKind.
None
,
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (28)
Attributes\AttributeTests_LifetimeAnnotation.cs (1)
268
Assert.Equal(ScopedKind.
None
, parameter.EffectiveScope);
RefStructInterfacesTests.cs (3)
21910
Assert.Equal(ScopedKind.
None
, p.EffectiveScope);
22055
Assert.Equal(ScopedKind.
None
, p.EffectiveScope);
22118
Assert.Equal(ScopedKind.
None
, p.EffectiveScope);
Semantics\ParamsCollectionTests.cs (24)
8664
assertScope(ScopedKind.
None
, p);
8670
symbolValidator: (m) => verifyScopeOnImport(m, ScopedKind.
None
)).VerifyDiagnostics();
8713
assertScope(ScopedKind.
None
, p);
8738
assertScope(ScopedKind.
None
, p);
8765
assertScope(ScopedKind.
None
, p);
8769
symbolValidator: (m) => verifyScopeOnImport(m, ScopedKind.
None
)).VerifyDiagnostics();
8812
assertScope(ScopedKind.
None
, p);
8837
assertScope(ScopedKind.
None
, p);
8949
assertScope(ScopedKind.
None
, p);
8954
symbolValidator: (m) => verifyScopeOnImport(m, ScopedKind.
None
, expectUnscopedRefAttribute: true)).VerifyDiagnostics();
8973
assertScope(ScopedKind.
None
, p);
9010
case ScopedKind.
None
:
9259
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C1.Test1").Parameters.Single().EffectiveScope);
9263
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C1.Test2").Parameters.Single().EffectiveScope);
9267
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C1.Test3").Parameters.Single().EffectiveScope);
9301
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C2.Test1").Parameters.Single().EffectiveScope);
9305
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C2.Test2").Parameters.Single().EffectiveScope);
9309
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C2.Test3").Parameters.Single().EffectiveScope);
10055
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C1.Test1").Parameters.Single().EffectiveScope);
10056
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C1.Test2").Parameters.Single().EffectiveScope);
10057
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C1.Test3").Parameters.Single().EffectiveScope);
10111
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C1.Test1").Parameters.Single().EffectiveScope);
10112
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C1.Test2").Parameters.Single().EffectiveScope);
10113
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C1.Test3").Parameters.Single().EffectiveScope);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (149)
Semantics\LambdaTests.cs (3)
9011
Assert.Equal(ScopedKind.
None
, symbol.Parameters[0].ScopedKind);
9040
Assert.Equal(ScopedKind.
None
, symbol.Parameters[0].ScopedKind);
9067
Assert.Equal(ScopedKind.
None
, symbol.Parameters[0].ScopedKind);
Semantics\RefFieldTests.cs (144)
10981
VerifyParameterSymbol(parameters[0], "R x1", RefKind.None, ScopedKind.
None
);
10985
VerifyParameterSymbol(parameters[0], "ref R x2", RefKind.Ref, ScopedKind.
None
);
10989
VerifyParameterSymbol(parameters[0], "in R x3", RefKind.In, ScopedKind.
None
);
10993
VerifyParameterSymbol(parameters[0], "out R x4", RefKind.Out, useUpdatedEscapeRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
11090
VerifyParameterSymbol(localFunctions[0].Parameters[0], "R x1", RefKind.None, ScopedKind.
None
);
11092
VerifyParameterSymbol(localFunctions[1].Parameters[0], "ref System.Int32 x2", RefKind.Ref, ScopedKind.
None
);
11094
VerifyParameterSymbol(localFunctions[2].Parameters[0], "in System.Int32 x3", RefKind.In, ScopedKind.
None
);
11096
VerifyParameterSymbol(localFunctions[3].Parameters[0], "out System.Int32 x4", RefKind.Out, useUpdatedEscapeRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
11098
VerifyParameterSymbol(localFunctions[4].Parameters[0], "ref R x5", RefKind.Ref, ScopedKind.
None
);
11100
VerifyParameterSymbol(localFunctions[5].Parameters[0], "in R x6", RefKind.In, ScopedKind.
None
);
11102
VerifyParameterSymbol(localFunctions[6].Parameters[0], "out R x7", RefKind.Out, useUpdatedEscapeRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
11163
verifyParameter(delegateTypesAndLambdas[0], 0, "R", "x1", RefKind.None, ScopedKind.
None
, false, false);
11165
verifyParameter(delegateTypesAndLambdas[1], 0, "ref System.Int32", "x2", RefKind.Ref, ScopedKind.
None
, false, false);
11167
verifyParameter(delegateTypesAndLambdas[2], 0, "in System.Int32", "x3", RefKind.In, ScopedKind.
None
, false, false);
11169
verifyParameter(delegateTypesAndLambdas[3], 0, "out System.Int32", "x4", RefKind.Out, useUpdatedEscapeRules ? ScopedKind.ScopedRef : ScopedKind.
None
, false, false);
11171
verifyParameter(delegateTypesAndLambdas[3], 2, "out System.Int32", "z4", RefKind.Out, ScopedKind.
None
, true, useUpdatedEscapeRules);
11172
verifyParameter(delegateTypesAndLambdas[4], 0, "ref R", "x5", RefKind.Ref, ScopedKind.
None
, false, false);
11174
verifyParameter(delegateTypesAndLambdas[5], 0, "in R", "x6", RefKind.In, ScopedKind.
None
, false, false);
11176
verifyParameter(delegateTypesAndLambdas[6], 0, "out R", "x7", RefKind.Out, useUpdatedEscapeRules ? ScopedKind.ScopedRef : ScopedKind.
None
, false, false);
11286
VerifyParameterSymbol(methods[0].Parameters[0], "R", RefKind.None, ScopedKind.
None
);
11287
VerifyParameterSymbol(methods[1].Parameters[0], "ref R", RefKind.Ref, ScopedKind.
None
);
11288
VerifyParameterSymbol(methods[1].Parameters[1], "ref System.Int32", RefKind.Ref, ScopedKind.
None
);
11289
VerifyParameterSymbol(methods[2].Parameters[0], "ref R", RefKind.Ref, ScopedKind.
None
);
11422
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F0").Parameters[0], "scoped s", RefKind.None, ScopedKind.
None
);
11424
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F2").Parameters[0], "ref scoped s", RefKind.Ref, ScopedKind.
None
);
11426
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F5").Parameters[0], "in scoped s", RefKind.In, ScopedKind.
None
);
11458
VerifyParameterSymbol(lambdas[0].Parameters[0], "R r1", RefKind.None, ScopedKind.
None
);
11459
VerifyParameterSymbol(lambdas[1].Parameters[0], "R r2", RefKind.None, ScopedKind.
None
);
11538
VerifyParameterSymbol(parameters[0], "R a", RefKind.None, ScopedKind.
None
);
11539
VerifyParameterSymbol(parameters[1], "ref R b", RefKind.Ref, ScopedKind.
None
);
11540
VerifyParameterSymbol(parameters[2], "in R c", RefKind.In, ScopedKind.
None
);
11616
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("C..ctor").ThisParameter, "C this", RefKind.None, ScopedKind.
None
);
11617
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("C.F1").ThisParameter, "C this", RefKind.None, ScopedKind.
None
);
11669
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Extensions.F0").Parameters[0], "R<System.Object> r", RefKind.None, ScopedKind.
None
);
11671
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Extensions.F2").Parameters[0], "scoped", RefKind.None, ScopedKind.
None
);
11990
verifyValueParameter(comp.GetMember<PropertySymbol>("R2.P2"), "R1 value", RefKind.None, ScopedKind.
None
);
11991
verifyValueParameter(comp.GetMember<PropertySymbol>("R2.P3"), "R1 value", RefKind.None, ScopedKind.
None
);
13221
VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.
None
);
13222
VerifyLocalSymbol(locals[1], "ref scoped s2", RefKind.Ref, ScopedKind.
None
);
13223
VerifyLocalSymbol(locals[2], "ref scoped s3", RefKind.Ref, ScopedKind.
None
);
13276
VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.
None
);
13277
VerifyLocalSymbol(locals[1], "ref scoped s2", RefKind.Ref, ScopedKind.
None
);
13278
VerifyLocalSymbol(locals[2], "ref scoped s3", RefKind.Ref, ScopedKind.
None
);
13335
VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.
None
);
13336
VerifyLocalSymbol(locals[2], "scoped s3", RefKind.None, ScopedKind.
None
);
13380
VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.
None
);
13381
VerifyLocalSymbol(locals[1], "scoped s3", RefKind.None, ScopedKind.
None
);
13407
VerifyLocalSymbol(locals[0], "System.Boolean scoped", RefKind.None, ScopedKind.
None
);
13432
VerifyLocalSymbol(locals[0], "System.Boolean scoped", RefKind.None, ScopedKind.
None
);
13452
VerifyLocalSymbol(locals[0], "System.Boolean scoped", RefKind.None, ScopedKind.
None
);
13474
VerifyLocalSymbol(locals[0], "System.Boolean scoped", RefKind.None, ScopedKind.
None
);
13785
VerifyLocalSymbol(locals[0], "ref System.Int32 a", RefKind.Ref, ScopedKind.
None
);
13786
VerifyLocalSymbol(locals[1], "ref System.Int32 b", RefKind.Ref, ScopedKind.
None
);
14592
VerifyLocalSymbol(locals[0], "R r11", RefKind.None, ScopedKind.
None
);
14593
VerifyLocalSymbol(locals[1], "R r12", RefKind.None, ScopedKind.
None
);
14597
VerifyLocalSymbol(locals[4], "ref R r31", RefKind.Ref, ScopedKind.
None
);
14598
VerifyLocalSymbol(locals[5], "ref R r32", RefKind.Ref, ScopedKind.
None
);
15121
VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.
None
);
15122
VerifyLocalSymbol(locals[1], "ref scoped s2", RefKind.Ref, ScopedKind.
None
);
15123
VerifyLocalSymbol(locals[2], "ref scoped s3", RefKind.Ref, ScopedKind.
None
);
15147
VerifyLocalSymbol(locals[0], "System.Boolean scoped", RefKind.None, ScopedKind.
None
);
15828
VerifyParameterSymbol(method.Parameters[0], "ref System.Int32 i", RefKind.Ref, ScopedKind.
None
);
18016
VerifyParameterSymbol(delegateInvokeMethods[0].Parameters[0], "R arg1", RefKind.None, ScopedKind.
None
);
23442
VerifyParameterSymbol(type.GetMethod("Get").ThisParameter, "ref R2<System.Int32> this", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
23443
VerifyParameterSymbol(type.GetMethod("get_Item").ThisParameter, "ref R2<System.Int32> this", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
23512
VerifyParameterSymbol(type.GetMethod("Get").ThisParameter, "ref R2<System.Int32> this", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
23513
VerifyParameterSymbol(type.GetMethod("get_Item").ThisParameter, "ref R2<System.Int32> this", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
23661
VerifyParameterSymbol(parameters[2], "ref R y", RefKind.Ref, ScopedKind.
None
);
23723
VerifyParameterSymbol(baseType.GetMethod("F1A").Parameters[0], "ref R<System.Int32> r1", RefKind.Ref, ScopedKind.
None
);
23812
VerifyParameterSymbol(type.GetMethod("F1").Parameters[0], "ref R<T> r1", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
23813
VerifyParameterSymbol(type.GetMethod("F2").Parameters[0], "out T t2", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
23814
VerifyParameterSymbol(type.GetMethod("F3").Parameters[0], "in R<T> t3", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
23815
VerifyParameterSymbol(type.GetMethod("F4").Parameters[0], "R<T> t4", RefKind.None, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
23896
VerifyParameterSymbol(baseType.GetMethod("F4A").Parameters[0], "ref R<System.Int32> r4", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
23948
VerifyParameterSymbol(parameters[2], "out System.Int32 y", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24008
VerifyParameterSymbol(baseType.GetMethod("F3A").Parameters[0], "out System.Int32 t3", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24071
VerifyParameterSymbol(baseType.GetMethod("F1A").Parameters[0], "ref System.Int32 t1", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
24073
VerifyParameterSymbol(baseType.GetMethod("F3A").Parameters[0], "ref System.Int32 t3", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24074
VerifyParameterSymbol(baseType.GetMethod("F4A").Parameters[0], "ref System.Int32 t4", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24137
VerifyParameterSymbol(baseType.GetMethod("F1A").Parameters[0], "in System.Int32 t1", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
24139
VerifyParameterSymbol(baseType.GetMethod("F3A").Parameters[0], "in System.Int32 t3", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24140
VerifyParameterSymbol(baseType.GetMethod("F4A").Parameters[0], "in System.Int32 t4", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24227
VerifyParameterSymbol(baseType.GetMethod("F1A").Parameters[0], "R<System.Int32> r1", RefKind.None, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
24229
VerifyParameterSymbol(baseType.GetMethod("F3A").Parameters[0], "R<System.Int32> r3", RefKind.None, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24230
VerifyParameterSymbol(baseType.GetMethod("F4A").Parameters[0], "R<System.Int32> r4", RefKind.None, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24255
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F1").Parameters[0], "R<T> r1", RefKind.None, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24256
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F2").Parameters[0], "ref R<T> r2", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24257
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F3").Parameters[0], "in R<T> r3", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24258
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F4").Parameters[0], "out R<T> r4", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24505
VerifyParameterSymbol(lambdas[1].Parameters[0], "out System.Int32 i2", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24507
VerifyParameterSymbol(lambdas[3].Parameters[0], "out System.Object o2", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24540
VerifyParameterSymbol(lambdas[0].Parameters[0], "ref System.Int32 i1", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
24541
VerifyParameterSymbol(lambdas[1].Parameters[0], "ref System.Int32 i2", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24542
VerifyParameterSymbol(lambdas[2].Parameters[0], "ref System.Object o1", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
24543
VerifyParameterSymbol(lambdas[3].Parameters[0], "ref System.Object o2", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24578
VerifyParameterSymbol(lambdas[1].Parameters[0], "ref R<System.Int32> r2", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
24580
VerifyParameterSymbol(lambdas[3].Parameters[0], "ref R<System.Object> r2", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
25003
VerifyParameterSymbol(typeA.GetMethod("UnscopedRefOnly").Parameters[0], "out System.Int32 i", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
25004
VerifyParameterSymbol(typeA.GetMethod("ScopedRefAndUnscopedRef").Parameters[0], "out System.Int32 i", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
25103
VerifyParameterSymbol(typeA.GetMethod("NoAttributes").Parameters[0], "ref R x", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
25105
VerifyParameterSymbol(typeA.GetMethod("UnscopedRefOnly").Parameters[0], "ref R x", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
25106
VerifyParameterSymbol(typeA.GetMethod("ScopedRefAndUnscopedRef").Parameters[0], "ref R x", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
25211
VerifyParameterSymbol(typeA.GetMethod("NoAttributes").Parameters[0], "in R x", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
25213
VerifyParameterSymbol(typeA.GetMethod("UnscopedRefOnly").Parameters[0], "in R x", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
25214
VerifyParameterSymbol(typeA.GetMethod("ScopedRefAndUnscopedRef").Parameters[0], "in R x", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
25271
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("A.F3").Parameters[0], "out System.Int32 i3", RefKind.Out, useUpdatedRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
25272
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("A.F4").Parameters[0], "ref R r4", RefKind.Ref, ScopedKind.
None
);
25273
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("A.F5").Parameters[0], "in R r5", RefKind.In, ScopedKind.
None
);
25314
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("A.F3").Parameters[0], "out System.Int32 i3", RefKind.Out, useUpdatedRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
25315
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("A.F4").Parameters[0], "ref R r4", RefKind.Ref, ScopedKind.
None
);
25316
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("A.F5").Parameters[0], "in R r5", RefKind.In, ScopedKind.
None
);
25346
verifyParameter(delegateTypesAndLambdas[0], 0, "out System.Int32", "i1", RefKind.Out, useUpdatedRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
25347
verifyParameter(delegateTypesAndLambdas[1], 0, "R", "r2", RefKind.None, ScopedKind.
None
);
25348
verifyParameter(delegateTypesAndLambdas[2], 0, "ref R", "r3", RefKind.Ref, ScopedKind.
None
);
25349
verifyParameter(delegateTypesAndLambdas[3], 0, "in R", "r4", RefKind.In, ScopedKind.
None
);
25350
verifyParameter(delegateTypesAndLambdas[4], 0, "out R", "r5", RefKind.Out, useUpdatedRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
25396
VerifyParameterSymbol(getFunctionPointerMethod(comp, "A.F1").Parameters[0], "out modreq(System.Runtime.InteropServices.OutAttribute) System.Int32", RefKind.Out, useUpdatedRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
25397
VerifyParameterSymbol(getFunctionPointerMethod(comp, "A.F2").Parameters[0], "R", RefKind.None, ScopedKind.
None
);
25398
VerifyParameterSymbol(getFunctionPointerMethod(comp, "A.F3").Parameters[0], "ref R", RefKind.Ref, ScopedKind.
None
);
25399
VerifyParameterSymbol(getFunctionPointerMethod(comp, "A.F4").Parameters[0], "in modreq(System.Runtime.InteropServices.InAttribute) R", RefKind.In, ScopedKind.
None
);
25400
VerifyParameterSymbol(getFunctionPointerMethod(comp, "A.F5").Parameters[0], "out modreq(System.Runtime.InteropServices.OutAttribute) R", RefKind.Out, useUpdatedRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
25465
var scopedRefInCSharp10 = languageVersion == LanguageVersion.CSharp11 ? ScopedKind.
None
: ScopedKind.ScopedRef;
25468
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F1").Parameters[0], "out System.Int32 i1", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
25469
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F2").Parameters[0], "R r2", RefKind.None, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
25470
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F3").Parameters[0], "ref R r3", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
25471
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F4").Parameters[0], "in R r4", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
25472
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F5").Parameters[0], "out R r5", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
26085
VerifyParameterSymbol(typeA.GetMethod("F1").Parameters[0], "ref R x", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
26086
VerifyParameterSymbol(typeA.GetMethod("F2").Parameters[0], "ref R x", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
26087
VerifyParameterSymbol(typeA.GetMethod("F3").Parameters[0], "in R x", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
26088
VerifyParameterSymbol(typeA.GetMethod("F4").Parameters[0], "in R x", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
27041
VerifyParameterSymbol(method.Parameters[0], "out System.Int32 i", RefKind.Out, version == 11 ? ScopedKind.ScopedRef : ScopedKind.
None
);
27080
VerifyParameterSymbol(method.Parameters[0], "out System.Int32 i", RefKind.Out, ScopedKind.
None
);
27119
VerifyParameterSymbol(method.Parameters[0], "out System.Int32 i", RefKind.Out, ScopedKind.
None
);
27169
VerifyParameterSymbol(method.Parameters[0], "out T t", RefKind.Out, expectedUseUpdatedEscapeRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
27405
Assert.Equal(ScopedKind.
None
, type.DelegateInvokeMethod.Parameters.Single().EffectiveScope);
27457
Assert.Equal(ScopedKind.
None
, type.DelegateInvokeMethod.Parameters.Single().EffectiveScope);
27509
Assert.Equal(ScopedKind.
None
, type.DelegateInvokeMethod.Parameters.Single().EffectiveScope);
27871
VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.
None
);
27872
VerifyLocalSymbol(locals[1], "ref scoped s2", RefKind.Ref, ScopedKind.
None
);
27873
VerifyLocalSymbol(locals[2], "ref scoped s3", RefKind.Ref, ScopedKind.
None
);
27972
VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.
None
);
27973
VerifyLocalSymbol(locals[1], "ref scoped s2", RefKind.Ref, ScopedKind.
None
);
27974
VerifyLocalSymbol(locals[2], "ref scoped s3", RefKind.Ref, ScopedKind.
None
);
Semantics\SimpleLambdaParametersWithModifiersTests.cs (2)
292
Assert.Equal(ScopedKind.
None
, symbol.Parameters.First().ScopedKind);
1160
Assert.Equal(ScopedKind.
None
, symbol.Parameters.Single().ScopedKind);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationParameterSymbol.cs (1)
62
public ScopedKind ScopedKind => ScopedKind.
None
;
Microsoft.CodeAnalysis.VisualBasic (2)
Symbols\ParameterSymbol.vb (1)
314
Return ScopedKind.
None
Symbols\Source\LocalSymbol.vb (1)
306
Return ScopedKind.
None
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationParameterSymbol.cs (1)
62
public ScopedKind ScopedKind => ScopedKind.
None
;
Microsoft.Interop.SourceGeneration (2)
Marshalling\MarshallerHelpers.cs (1)
390
if (typeInfo.ScopedKind != ScopedKind.
None
&& typeInfo.RefKind != RefKind.Out)
TypePositionInfo.cs (1)
69
public ScopedKind ScopedKind { get; init; } = ScopedKind.
None
;
Roslyn.Diagnostics.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationParameterSymbol.cs (1)
62
public ScopedKind ScopedKind => ScopedKind.
None
;
Text.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationParameterSymbol.cs (1)
62
public ScopedKind ScopedKind => ScopedKind.
None
;