Skip to content

Adjust CompoundUseSiteInfo<TAssemblySymbol>.MergeAndClear for discarding diagnostic bag #73188

@jcouv

Description

@jcouv

If we use a discarding diagnostic bag (!AccumulatesDiagnostics), the MergeAndClear method asserts.
We should consider addressing this during MQ.

Follow-up on #72948 (comment), since we worked around with:

        internal void LookupImplicitExtensionMembersInSingleBinder(LookupResult result, TypeSymbol type,
            string name, int arity, ConsList<TypeSymbol>? basesBeingResolved, LookupOptions options,
            Binder originalBinder, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
        {
...
            if (tempUseSiteInfo.AccumulatesDiagnostics)
            {
                useSiteInfo.MergeAndClear(ref tempUseSiteInfo);
            }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions