231 references to None
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationParameterSymbol.cs (1)
67
public ScopedKind ScopedKind => ScopedKind.
None
;
Microsoft.CodeAnalysis.CSharp (48)
Binder\Binder.QueryUnboundLambdaState.cs (1)
50
public override ScopedKind DeclaredScope(int index) => ScopedKind.
None
;
Binder\Binder.ValueChecks.cs (2)
3038
return ScopedKind.
None
;
3043
return ScopedKind.
None
;
Binder\Binder_AnonymousTypes.cs (1)
97
ScopedKind.
None
);
Binder\Binder_Expressions.cs (4)
10837
(parameters.Any(p => p.EffectiveScope != ScopedKind.
None
) ? parameters.SelectAsArray(p => p.EffectiveScope) : default);
10870
(parameterScopes.IsDefault || parameterScopes.All(scope => scope == ScopedKind.
None
)) &&
10904
parameterScopes.IsDefault ? ScopedKind.
None
: parameterScopes[i],
10909
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)
818
new AnonymousTypeField(fieldName, fieldValue.Syntax.Location, TypeWithAnnotations.Create(TypeOrError(fieldValue)), RefKind.None, ScopedKind.
None
);
Binder\RefSafetyAnalysis.cs (4)
446
var scopedModifier = _useUpdatedEscapeRules ? local.Scope : ScopedKind.
None
;
447
if (scopedModifier != ScopedKind.
None
)
487
if (_useUpdatedEscapeRules && localSymbol.Scope != ScopedKind.
None
)
595
tryGetThisParameter(m)?.EffectiveScope == ScopedKind.
None
)
BoundTree\UnboundLambda.cs (3)
683
if (scope == ScopedKind.
None
)
765
if (((DeclaredScope(i) == ScopedKind.
None
&& parameterScopesBuilder[i] == ScopedKind.ScopedRef) ||
1564
return _parameterDeclaredScopes.IsDefault ? ScopedKind.
None
: _parameterDeclaredScopes[index];
CodeGen\Optimizer.cs (1)
2433
internal override ScopedKind Scope => ScopedKind.
None
;
Compilation\CSharpCompilation.cs (1)
4239
fields.Add(new AnonymousTypeField(name, location, TypeWithAnnotations.Create(type, nullableAnnotation), RefKind.None, ScopedKind.
None
));
Emitter\Model\PEModuleBuilder.cs (1)
1685
Debug.Assert(scope != ScopedKind.
None
);
FlowAnalysis\NullableWalker.PlaceholderLocal.cs (1)
73
internal override ScopedKind Scope => ScopedKind.
None
;
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (2)
323
(ScopedKind.
None
, false) => true,
463
var fields = key.Fields.SelectAsArray(f => new AnonymousTypeField(f.Name, Location.None, typeWithAnnotations: default, refKind: RefKind.None, ScopedKind.
None
));
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (1)
60
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)
33
=> 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)
57
=> ParameterHelpers.IsRefScopedByDefault(this) ? ScopedKind.ScopedRef : ScopedKind.
None
;
Symbols\Source\ParameterHelpers.cs (3)
194
Debug.Assert(parameter is SourceComplexParameterSymbolBase || parameter is not SourceParameterSymbol s || s.DeclaredScope == ScopedKind.
None
); // Only SourceComplexParameterSymbolBase validates 'scope'.
323
if (scope == ScopedKind.
None
)
988
scope = ScopedKind.
None
;
Symbols\Source\SourceComplexParameterSymbol.cs (3)
212
if (scope != ScopedKind.
None
&&
216
return ScopedKind.
None
;
878
else if (DeclaredScope != ScopedKind.
None
)
Symbols\Source\SourceLocalSymbol.cs (2)
70
? isScoped ? ScopedKind.ScopedRef : ScopedKind.
None
71
: isScoped ? ScopedKind.ScopedValue : ScopedKind.
None
;
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
1391
p is { EffectiveScope: ScopedKind.
None
, RefKind: RefKind.Ref } or { EffectiveScope: ScopedKind.ScopedRef, RefKind: RefKind.Out } &&
1493
return allowVariance && baseScope == 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)
180
var scope = _containingType.IsStructType() ? ScopedKind.ScopedRef : ScopedKind.
None
;
181
if (scope != ScopedKind.
None
&&
185
return ScopedKind.
None
;
Symbols\Synthesized\SynthesizedAccessorValueParameterSymbol.cs (1)
28
scope: ScopedKind.
None
)
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (1)
468
) : 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)
261
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)
21512
Assert.Equal(ScopedKind.
None
, p.EffectiveScope);
21657
Assert.Equal(ScopedKind.
None
, p.EffectiveScope);
21720
Assert.Equal(ScopedKind.
None
, p.EffectiveScope);
Semantics\ParamsCollectionTests.cs (24)
8680
assertScope(ScopedKind.
None
, p);
8686
symbolValidator: (m) => verifyScopeOnImport(m, ScopedKind.
None
)).VerifyDiagnostics();
8729
assertScope(ScopedKind.
None
, p);
8754
assertScope(ScopedKind.
None
, p);
8781
assertScope(ScopedKind.
None
, p);
8785
symbolValidator: (m) => verifyScopeOnImport(m, ScopedKind.
None
)).VerifyDiagnostics();
8828
assertScope(ScopedKind.
None
, p);
8853
assertScope(ScopedKind.
None
, p);
8965
assertScope(ScopedKind.
None
, p);
8970
symbolValidator: (m) => verifyScopeOnImport(m, ScopedKind.
None
, expectUnscopedRefAttribute: true)).VerifyDiagnostics();
8989
assertScope(ScopedKind.
None
, p);
9026
case ScopedKind.
None
:
9275
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C1.Test1").Parameters.Single().EffectiveScope);
9279
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C1.Test2").Parameters.Single().EffectiveScope);
9283
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C1.Test3").Parameters.Single().EffectiveScope);
9317
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C2.Test1").Parameters.Single().EffectiveScope);
9321
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C2.Test2").Parameters.Single().EffectiveScope);
9325
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C2.Test3").Parameters.Single().EffectiveScope);
10071
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C1.Test1").Parameters.Single().EffectiveScope);
10072
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C1.Test2").Parameters.Single().EffectiveScope);
10073
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C1.Test3").Parameters.Single().EffectiveScope);
10127
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C1.Test1").Parameters.Single().EffectiveScope);
10128
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C1.Test2").Parameters.Single().EffectiveScope);
10129
Assert.Equal(ScopedKind.
None
, comp.GetMember<MethodSymbol>("C1.Test3").Parameters.Single().EffectiveScope);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (149)
Semantics\LambdaTests.cs (3)
8681
Assert.Equal(ScopedKind.
None
, symbol.Parameters[0].ScopedKind);
8710
Assert.Equal(ScopedKind.
None
, symbol.Parameters[0].ScopedKind);
8737
Assert.Equal(ScopedKind.
None
, symbol.Parameters[0].ScopedKind);
Semantics\RefFieldTests.cs (144)
10919
VerifyParameterSymbol(parameters[0], "R x1", RefKind.None, ScopedKind.
None
);
10923
VerifyParameterSymbol(parameters[0], "ref R x2", RefKind.Ref, ScopedKind.
None
);
10927
VerifyParameterSymbol(parameters[0], "in R x3", RefKind.In, ScopedKind.
None
);
10931
VerifyParameterSymbol(parameters[0], "out R x4", RefKind.Out, useUpdatedEscapeRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
11028
VerifyParameterSymbol(localFunctions[0].Parameters[0], "R x1", RefKind.None, ScopedKind.
None
);
11030
VerifyParameterSymbol(localFunctions[1].Parameters[0], "ref System.Int32 x2", RefKind.Ref, ScopedKind.
None
);
11032
VerifyParameterSymbol(localFunctions[2].Parameters[0], "in System.Int32 x3", RefKind.In, ScopedKind.
None
);
11034
VerifyParameterSymbol(localFunctions[3].Parameters[0], "out System.Int32 x4", RefKind.Out, useUpdatedEscapeRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
11036
VerifyParameterSymbol(localFunctions[4].Parameters[0], "ref R x5", RefKind.Ref, ScopedKind.
None
);
11038
VerifyParameterSymbol(localFunctions[5].Parameters[0], "in R x6", RefKind.In, ScopedKind.
None
);
11040
VerifyParameterSymbol(localFunctions[6].Parameters[0], "out R x7", RefKind.Out, useUpdatedEscapeRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
11101
verifyParameter(delegateTypesAndLambdas[0], 0, "R", "x1", RefKind.None, ScopedKind.
None
, false, false);
11103
verifyParameter(delegateTypesAndLambdas[1], 0, "ref System.Int32", "x2", RefKind.Ref, ScopedKind.
None
, false, false);
11105
verifyParameter(delegateTypesAndLambdas[2], 0, "in System.Int32", "x3", RefKind.In, ScopedKind.
None
, false, false);
11107
verifyParameter(delegateTypesAndLambdas[3], 0, "out System.Int32", "x4", RefKind.Out, useUpdatedEscapeRules ? ScopedKind.ScopedRef : ScopedKind.
None
, false, false);
11109
verifyParameter(delegateTypesAndLambdas[3], 2, "out System.Int32", "z4", RefKind.Out, ScopedKind.
None
, true, useUpdatedEscapeRules);
11110
verifyParameter(delegateTypesAndLambdas[4], 0, "ref R", "x5", RefKind.Ref, ScopedKind.
None
, false, false);
11112
verifyParameter(delegateTypesAndLambdas[5], 0, "in R", "x6", RefKind.In, ScopedKind.
None
, false, false);
11114
verifyParameter(delegateTypesAndLambdas[6], 0, "out R", "x7", RefKind.Out, useUpdatedEscapeRules ? ScopedKind.ScopedRef : ScopedKind.
None
, false, false);
11224
VerifyParameterSymbol(methods[0].Parameters[0], "R", RefKind.None, ScopedKind.
None
);
11225
VerifyParameterSymbol(methods[1].Parameters[0], "ref R", RefKind.Ref, ScopedKind.
None
);
11226
VerifyParameterSymbol(methods[1].Parameters[1], "ref System.Int32", RefKind.Ref, ScopedKind.
None
);
11227
VerifyParameterSymbol(methods[2].Parameters[0], "ref R", RefKind.Ref, ScopedKind.
None
);
11360
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F0").Parameters[0], "scoped s", RefKind.None, ScopedKind.
None
);
11362
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F2").Parameters[0], "ref scoped s", RefKind.Ref, ScopedKind.
None
);
11364
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F5").Parameters[0], "in scoped s", RefKind.In, ScopedKind.
None
);
11396
VerifyParameterSymbol(lambdas[0].Parameters[0], "R r1", RefKind.None, ScopedKind.
None
);
11397
VerifyParameterSymbol(lambdas[1].Parameters[0], "R r2", RefKind.None, ScopedKind.
None
);
11476
VerifyParameterSymbol(parameters[0], "R a", RefKind.None, ScopedKind.
None
);
11477
VerifyParameterSymbol(parameters[1], "ref R b", RefKind.Ref, ScopedKind.
None
);
11478
VerifyParameterSymbol(parameters[2], "in R c", RefKind.In, ScopedKind.
None
);
11554
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("C..ctor").ThisParameter, "C this", RefKind.None, ScopedKind.
None
);
11555
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("C.F1").ThisParameter, "C this", RefKind.None, ScopedKind.
None
);
11607
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Extensions.F0").Parameters[0], "R<System.Object> r", RefKind.None, ScopedKind.
None
);
11609
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Extensions.F2").Parameters[0], "scoped", RefKind.None, ScopedKind.
None
);
11928
verifyValueParameter(comp.GetMember<PropertySymbol>("R2.P2"), "R1 value", RefKind.None, ScopedKind.
None
);
11929
verifyValueParameter(comp.GetMember<PropertySymbol>("R2.P3"), "R1 value", RefKind.None, ScopedKind.
None
);
13159
VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.
None
);
13160
VerifyLocalSymbol(locals[1], "ref scoped s2", RefKind.Ref, ScopedKind.
None
);
13161
VerifyLocalSymbol(locals[2], "ref scoped s3", RefKind.Ref, ScopedKind.
None
);
13214
VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.
None
);
13215
VerifyLocalSymbol(locals[1], "ref scoped s2", RefKind.Ref, ScopedKind.
None
);
13216
VerifyLocalSymbol(locals[2], "ref scoped s3", RefKind.Ref, ScopedKind.
None
);
13273
VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.
None
);
13274
VerifyLocalSymbol(locals[2], "scoped s3", RefKind.None, ScopedKind.
None
);
13318
VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.
None
);
13319
VerifyLocalSymbol(locals[1], "scoped s3", RefKind.None, ScopedKind.
None
);
13345
VerifyLocalSymbol(locals[0], "System.Boolean scoped", RefKind.None, ScopedKind.
None
);
13370
VerifyLocalSymbol(locals[0], "System.Boolean scoped", RefKind.None, ScopedKind.
None
);
13390
VerifyLocalSymbol(locals[0], "System.Boolean scoped", RefKind.None, ScopedKind.
None
);
13412
VerifyLocalSymbol(locals[0], "System.Boolean scoped", RefKind.None, ScopedKind.
None
);
13723
VerifyLocalSymbol(locals[0], "ref System.Int32 a", RefKind.Ref, ScopedKind.
None
);
13724
VerifyLocalSymbol(locals[1], "ref System.Int32 b", RefKind.Ref, ScopedKind.
None
);
14530
VerifyLocalSymbol(locals[0], "R r11", RefKind.None, ScopedKind.
None
);
14531
VerifyLocalSymbol(locals[1], "R r12", RefKind.None, ScopedKind.
None
);
14535
VerifyLocalSymbol(locals[4], "ref R r31", RefKind.Ref, ScopedKind.
None
);
14536
VerifyLocalSymbol(locals[5], "ref R r32", RefKind.Ref, ScopedKind.
None
);
15059
VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.
None
);
15060
VerifyLocalSymbol(locals[1], "ref scoped s2", RefKind.Ref, ScopedKind.
None
);
15061
VerifyLocalSymbol(locals[2], "ref scoped s3", RefKind.Ref, ScopedKind.
None
);
15085
VerifyLocalSymbol(locals[0], "System.Boolean scoped", RefKind.None, ScopedKind.
None
);
15766
VerifyParameterSymbol(method.Parameters[0], "ref System.Int32 i", RefKind.Ref, ScopedKind.
None
);
17954
VerifyParameterSymbol(delegateInvokeMethods[0].Parameters[0], "R arg1", RefKind.None, ScopedKind.
None
);
23386
VerifyParameterSymbol(type.GetMethod("Get").ThisParameter, "ref R2<System.Int32> this", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
23387
VerifyParameterSymbol(type.GetMethod("get_Item").ThisParameter, "ref R2<System.Int32> this", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
23456
VerifyParameterSymbol(type.GetMethod("Get").ThisParameter, "ref R2<System.Int32> this", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
23457
VerifyParameterSymbol(type.GetMethod("get_Item").ThisParameter, "ref R2<System.Int32> this", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
23605
VerifyParameterSymbol(parameters[2], "ref R y", RefKind.Ref, ScopedKind.
None
);
23667
VerifyParameterSymbol(baseType.GetMethod("F1A").Parameters[0], "ref R<System.Int32> r1", RefKind.Ref, ScopedKind.
None
);
23756
VerifyParameterSymbol(type.GetMethod("F1").Parameters[0], "ref R<T> r1", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
23757
VerifyParameterSymbol(type.GetMethod("F2").Parameters[0], "out T t2", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
23758
VerifyParameterSymbol(type.GetMethod("F3").Parameters[0], "in R<T> t3", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
23759
VerifyParameterSymbol(type.GetMethod("F4").Parameters[0], "R<T> t4", RefKind.None, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
23840
VerifyParameterSymbol(baseType.GetMethod("F4A").Parameters[0], "ref R<System.Int32> r4", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
23892
VerifyParameterSymbol(parameters[2], "out System.Int32 y", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
23952
VerifyParameterSymbol(baseType.GetMethod("F3A").Parameters[0], "out System.Int32 t3", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24015
VerifyParameterSymbol(baseType.GetMethod("F1A").Parameters[0], "ref System.Int32 t1", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
24017
VerifyParameterSymbol(baseType.GetMethod("F3A").Parameters[0], "ref System.Int32 t3", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24018
VerifyParameterSymbol(baseType.GetMethod("F4A").Parameters[0], "ref System.Int32 t4", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24081
VerifyParameterSymbol(baseType.GetMethod("F1A").Parameters[0], "in System.Int32 t1", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
24083
VerifyParameterSymbol(baseType.GetMethod("F3A").Parameters[0], "in System.Int32 t3", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24084
VerifyParameterSymbol(baseType.GetMethod("F4A").Parameters[0], "in System.Int32 t4", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24171
VerifyParameterSymbol(baseType.GetMethod("F1A").Parameters[0], "R<System.Int32> r1", RefKind.None, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
24173
VerifyParameterSymbol(baseType.GetMethod("F3A").Parameters[0], "R<System.Int32> r3", RefKind.None, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24174
VerifyParameterSymbol(baseType.GetMethod("F4A").Parameters[0], "R<System.Int32> r4", RefKind.None, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24199
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F1").Parameters[0], "R<T> r1", RefKind.None, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24200
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F2").Parameters[0], "ref R<T> r2", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24201
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F3").Parameters[0], "in R<T> r3", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24202
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F4").Parameters[0], "out R<T> r4", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24449
VerifyParameterSymbol(lambdas[1].Parameters[0], "out System.Int32 i2", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24451
VerifyParameterSymbol(lambdas[3].Parameters[0], "out System.Object o2", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24484
VerifyParameterSymbol(lambdas[0].Parameters[0], "ref System.Int32 i1", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
24485
VerifyParameterSymbol(lambdas[1].Parameters[0], "ref System.Int32 i2", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24486
VerifyParameterSymbol(lambdas[2].Parameters[0], "ref System.Object o1", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
24487
VerifyParameterSymbol(lambdas[3].Parameters[0], "ref System.Object o2", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24522
VerifyParameterSymbol(lambdas[1].Parameters[0], "ref R<System.Int32> r2", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
24524
VerifyParameterSymbol(lambdas[3].Parameters[0], "ref R<System.Object> r2", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
24947
VerifyParameterSymbol(typeA.GetMethod("UnscopedRefOnly").Parameters[0], "out System.Int32 i", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
24948
VerifyParameterSymbol(typeA.GetMethod("ScopedRefAndUnscopedRef").Parameters[0], "out System.Int32 i", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
25047
VerifyParameterSymbol(typeA.GetMethod("NoAttributes").Parameters[0], "ref R x", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
25049
VerifyParameterSymbol(typeA.GetMethod("UnscopedRefOnly").Parameters[0], "ref R x", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
25050
VerifyParameterSymbol(typeA.GetMethod("ScopedRefAndUnscopedRef").Parameters[0], "ref R x", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
25155
VerifyParameterSymbol(typeA.GetMethod("NoAttributes").Parameters[0], "in R x", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
25157
VerifyParameterSymbol(typeA.GetMethod("UnscopedRefOnly").Parameters[0], "in R x", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
25158
VerifyParameterSymbol(typeA.GetMethod("ScopedRefAndUnscopedRef").Parameters[0], "in R x", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
25215
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("A.F3").Parameters[0], "out System.Int32 i3", RefKind.Out, useUpdatedRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
25216
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("A.F4").Parameters[0], "ref R r4", RefKind.Ref, ScopedKind.
None
);
25217
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("A.F5").Parameters[0], "in R r5", RefKind.In, ScopedKind.
None
);
25258
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("A.F3").Parameters[0], "out System.Int32 i3", RefKind.Out, useUpdatedRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
25259
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("A.F4").Parameters[0], "ref R r4", RefKind.Ref, ScopedKind.
None
);
25260
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("A.F5").Parameters[0], "in R r5", RefKind.In, ScopedKind.
None
);
25290
verifyParameter(delegateTypesAndLambdas[0], 0, "out System.Int32", "i1", RefKind.Out, useUpdatedRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
25291
verifyParameter(delegateTypesAndLambdas[1], 0, "R", "r2", RefKind.None, ScopedKind.
None
);
25292
verifyParameter(delegateTypesAndLambdas[2], 0, "ref R", "r3", RefKind.Ref, ScopedKind.
None
);
25293
verifyParameter(delegateTypesAndLambdas[3], 0, "in R", "r4", RefKind.In, ScopedKind.
None
);
25294
verifyParameter(delegateTypesAndLambdas[4], 0, "out R", "r5", RefKind.Out, useUpdatedRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
25340
VerifyParameterSymbol(getFunctionPointerMethod(comp, "A.F1").Parameters[0], "out modreq(System.Runtime.InteropServices.OutAttribute) System.Int32", RefKind.Out, useUpdatedRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
25341
VerifyParameterSymbol(getFunctionPointerMethod(comp, "A.F2").Parameters[0], "R", RefKind.None, ScopedKind.
None
);
25342
VerifyParameterSymbol(getFunctionPointerMethod(comp, "A.F3").Parameters[0], "ref R", RefKind.Ref, ScopedKind.
None
);
25343
VerifyParameterSymbol(getFunctionPointerMethod(comp, "A.F4").Parameters[0], "in modreq(System.Runtime.InteropServices.InAttribute) R", RefKind.In, ScopedKind.
None
);
25344
VerifyParameterSymbol(getFunctionPointerMethod(comp, "A.F5").Parameters[0], "out modreq(System.Runtime.InteropServices.OutAttribute) R", RefKind.Out, useUpdatedRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
25409
var scopedRefInCSharp10 = languageVersion == LanguageVersion.CSharp11 ? ScopedKind.
None
: ScopedKind.ScopedRef;
25412
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F1").Parameters[0], "out System.Int32 i1", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
25413
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F2").Parameters[0], "R r2", RefKind.None, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
25414
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F3").Parameters[0], "ref R r3", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
25415
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F4").Parameters[0], "in R r4", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
25416
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F5").Parameters[0], "out R r5", RefKind.Out, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
26029
VerifyParameterSymbol(typeA.GetMethod("F1").Parameters[0], "ref R x", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
26030
VerifyParameterSymbol(typeA.GetMethod("F2").Parameters[0], "ref R x", RefKind.Ref, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
26031
VerifyParameterSymbol(typeA.GetMethod("F3").Parameters[0], "in R x", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: false);
26032
VerifyParameterSymbol(typeA.GetMethod("F4").Parameters[0], "in R x", RefKind.In, ScopedKind.
None
, expectedHasUnscopedRefAttribute: true);
26985
VerifyParameterSymbol(method.Parameters[0], "out System.Int32 i", RefKind.Out, version == 11 ? ScopedKind.ScopedRef : ScopedKind.
None
);
27024
VerifyParameterSymbol(method.Parameters[0], "out System.Int32 i", RefKind.Out, ScopedKind.
None
);
27063
VerifyParameterSymbol(method.Parameters[0], "out System.Int32 i", RefKind.Out, ScopedKind.
None
);
27113
VerifyParameterSymbol(method.Parameters[0], "out T t", RefKind.Out, expectedUseUpdatedEscapeRules ? ScopedKind.ScopedRef : ScopedKind.
None
);
27349
Assert.Equal(ScopedKind.
None
, type.DelegateInvokeMethod.Parameters.Single().EffectiveScope);
27401
Assert.Equal(ScopedKind.
None
, type.DelegateInvokeMethod.Parameters.Single().EffectiveScope);
27453
Assert.Equal(ScopedKind.
None
, type.DelegateInvokeMethod.Parameters.Single().EffectiveScope);
27815
VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.
None
);
27816
VerifyLocalSymbol(locals[1], "ref scoped s2", RefKind.Ref, ScopedKind.
None
);
27817
VerifyLocalSymbol(locals[2], "ref scoped s3", RefKind.Ref, ScopedKind.
None
);
27916
VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.
None
);
27917
VerifyLocalSymbol(locals[1], "ref scoped s2", RefKind.Ref, ScopedKind.
None
);
27918
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.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)
67
public ScopedKind ScopedKind => ScopedKind.
None
;
Microsoft.Interop.SourceGeneration (2)
Marshalling\MarshallerHelpers.cs (1)
417
if (typeInfo.ScopedKind != ScopedKind.
None
&& typeInfo.RefKind != RefKind.Out)
TypePositionInfo.cs (1)
69
public ScopedKind ScopedKind { get; init; } = ScopedKind.
None
;