Binder\Binder_Expressions.cs (28)
38if (memberOpt?.IsStatic == true)
459if (field is { IsStatic: false, RefKind: RefKind.None, ContainingSymbol: SourceMemberContainerTypeSymbol { PrimaryConstructor: { } primaryConstructor } } &&
1771this.ContainingMember() is { Kind: not SymbolKind.NamedType, IsStatic: false } && // We are in an instance member
2128this.ContainingMember() is not { Kind: not SymbolKind.NamedType, IsStatic: false } || // We are not in an instance member
2271this.ContainingMember() is not { Kind: not SymbolKind.NamedType, IsStatic: false } containingMember || // We are not in an instance member
2329bool locationIsInstanceMember = !containingMember.IsStatic &&
2396if (containingMember.IsStatic)
2757bool hasErrors = !conversion.IsValid || targetType.IsStatic;
2786if (targetType.IsStatic)
5530if (type.IsStatic)
5568if (type.IsStatic)
8043receiver = ReplaceTypeOrValueReceiver(receiver, useType: extensionMember.IsStatic, diagnostics);
8452left = ReplaceTypeOrValueReceiver(left, symbol.IsStatic || symbol.Kind == SymbolKind.NamedType, diagnostics);
8863var isEnumField = (fieldSymbol.IsStatic && type.IsEnumType());
8932if (!fieldSymbol.IsStatic)
9024if (!propertySymbol.IsStatic)
9037if (symbol.IsStatic && (symbol.IsAbstract || symbol.IsVirtual))
9087return !symbol.IsStatic && !(symbol is TypeSymbol) &&
9106if (!eventSymbol.IsStatic)
10189receiver = ReplaceTypeOrValueReceiver(receiver, property.IsStatic, diagnostics);
10374if (!candidate.IsStatic &&
10429if (!candidate.IsStatic &&
10544!getMethod.IsStatic &&
10820if (!m.IsStatic) continue;
10825if (m.IsStatic) continue;
10973bool memberCountsAsStatic = extensionMember is MethodSymbol { IsExtensionMethod: true } ? false : extensionMember.IsStatic;
11014if (!memberMethod.IsStatic) continue;
11019if (memberMethod.IsStatic) continue;