18 references to ReturnOnlyScope
Microsoft.CodeAnalysis.CSharp (18)
Binder\Binder.ValueChecks.cs (14)
25
ReturnOnly =
ReturnOnlyScope
,
878
if (escapeTo is CallingMethodScope or
ReturnOnlyScope
)
1027
ReturnOnlyScope
=> EscapeLevel.ReturnOnly,
1037
{ RefKind: RefKind.Out, UseUpdatedEscapeRules: true } =>
ReturnOnlyScope
,
1051
{ HasUnscopedRefAttribute: true, RefKind: RefKind.Out } =>
ReturnOnlyScope
,
1053
_ =>
ReturnOnlyScope
1062
Debug.Assert(escapeTo is CallingMethodScope or
ReturnOnlyScope
);
1085
Debug.Assert(parameterSymbol.RefKind == RefKind.None || isRefScoped || refSafeToEscape ==
ReturnOnlyScope
);
1099
(checkingReceiver: true, isRefScoped: false, inUnsafeRegion: false,
ReturnOnlyScope
) => (ErrorCode.ERR_RefReturnOnlyParameter2, parameter.Syntax),
1100
(checkingReceiver: true, isRefScoped: false, inUnsafeRegion: true,
ReturnOnlyScope
) => (ErrorCode.WRN_RefReturnOnlyParameter2, parameter.Syntax),
1105
(checkingReceiver: false, isRefScoped: false, inUnsafeRegion: false,
ReturnOnlyScope
) => (ErrorCode.ERR_RefReturnOnlyParameter, node),
1106
(checkingReceiver: false, isRefScoped: false, inUnsafeRegion: true,
ReturnOnlyScope
) => (ErrorCode.WRN_RefReturnOnlyParameter, node),
2807
if (escapeTo is CallingMethodScope or
ReturnOnlyScope
)
3188
if (escapeTo is CallingMethodScope or
ReturnOnlyScope
)
Binder\Binder_Statements.cs (2)
1565
(
ReturnOnlyScope
, false) => ErrorCode.ERR_RefAssignReturnOnly,
1566
(
ReturnOnlyScope
, true) => ErrorCode.WRN_RefAssignReturnOnly,
Binder\RefSafetyAnalysis.cs (2)
467
ValidateEscape(expr,
ReturnOnlyScope
, node.RefKind != RefKind.None, _diagnostics);
477
ValidateEscape(expr,
ReturnOnlyScope
, isByRef: false, _diagnostics);