18 references to ReturnOnlyScope
Microsoft.CodeAnalysis.CSharp (18)
Binder\Binder.ValueChecks.cs (14)
25ReturnOnly = ReturnOnlyScope, 878if (escapeTo is CallingMethodScope or ReturnOnlyScope) 1027ReturnOnlyScope => EscapeLevel.ReturnOnly, 1037{ RefKind: RefKind.Out, UseUpdatedEscapeRules: true } => ReturnOnlyScope, 1051{ HasUnscopedRefAttribute: true, RefKind: RefKind.Out } => ReturnOnlyScope, 1053_ => ReturnOnlyScope 1062Debug.Assert(escapeTo is CallingMethodScope or ReturnOnlyScope); 1085Debug.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), 2807if (escapeTo is CallingMethodScope or ReturnOnlyScope) 3188if (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)
467ValidateEscape(expr, ReturnOnlyScope, node.RefKind != RefKind.None, _diagnostics); 477ValidateEscape(expr, ReturnOnlyScope, isByRef: false, _diagnostics);