• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SamboyCoding / Cpp2IL / 15025228993

14 May 2025 03:48PM UTC coverage: 34.685% (-0.1%) from 34.826%
15025228993

Pull #452

github

web-flow
Merge 08a645b97 into e93c0fecc
Pull Request #452: Expand type system to support more types

1813 of 6512 branches covered (27.84%)

Branch coverage included in aggregate %.

22 of 101 new or added lines in 12 files covered. (21.78%)

4 existing lines in 3 files now uncovered.

4158 of 10703 relevant lines covered (38.85%)

160402.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/Cpp2IL.Core/Utils/AsmResolver/ContextToFieldDescriptor.cs
1
using AsmResolver.DotNet;
2
using AsmResolver.DotNet.Signatures;
3
using Cpp2IL.Core.Model.Contexts;
4

5
namespace Cpp2IL.Core.Utils.AsmResolver;
6

7
public static class ContextToFieldDescriptor
8
{
9
    private static FieldDefinition GetFieldDefinition(this FieldAnalysisContext context)
10
    {
NEW
11
        return context.GetExtraData<FieldDefinition>("AsmResolverField") ?? throw new($"AsmResolver field not found in method analysis context for {context}");
×
12
    }
13

14
    private static FieldSignature ToFieldSignature(this FieldAnalysisContext context, ModuleDefinition parentModule)
15
    {
NEW
16
        return new FieldSignature(context.ToTypeSignature(parentModule));
×
17
    }
18

19
    public static IFieldDescriptor ToFieldDescriptor(this FieldAnalysisContext context, ModuleDefinition parentModule)
20
    {
NEW
21
        return context is ConcreteGenericFieldAnalysisContext concreteField
×
NEW
22
            ? concreteField.ToFieldDescriptor(parentModule)
×
NEW
23
            : parentModule.DefaultImporter.ImportField(context.GetFieldDefinition());
×
24
    }
25

26
    public static IFieldDescriptor ToFieldDescriptor(this ConcreteGenericFieldAnalysisContext context, ModuleDefinition parentModule)
27
    {
NEW
28
        return new MemberReference(
×
NEW
29
            context.DeclaringType.ToTypeSignature(parentModule).ToTypeDefOrRef(),
×
NEW
30
            context.Name,
×
NEW
31
            context.BaseFieldContext.ToFieldSignature(parentModule));
×
32
    }
33
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc