Welcome to mirror list, hosted at ThFree Co, Russian Federation.

FieldDesc.RuntimeDetermined.cs « RuntimeDetermined « TypeSystem « Common « tools « coreclr « src - github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f1bf0d968189eda6b3ce61152ae37dc5cba0fa20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace Internal.TypeSystem
{
    public partial class FieldDesc
    {
        public FieldDesc GetNonRuntimeDeterminedFieldFromRuntimeDeterminedFieldViaSubstitution(Instantiation typeInstantiation, Instantiation methodInstantiation)
        {
            DefType owningType = OwningType;
            TypeDesc owningTypeInstantiated = owningType.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(typeInstantiation, methodInstantiation);
            if (owningTypeInstantiated != owningType)
            {
                return Context.GetFieldForInstantiatedType(GetTypicalFieldDefinition(), (InstantiatedType)owningTypeInstantiated);
            }

            return this;
        }
    }
}