Skip to content

Wrong IsConstructor, IsEffectivelySameAs results for constructors in compiled code #752

@auduchinok

Description

@auduchinok

In example below mfv is a MemberOrFunctionOrValue in a type in a compiled assembly.

if (mfv.IsConstructor) {
  var entity = mfv.EnclosingEntity;
  var hasSameMember =
    entity.MembersFunctionsAndValues.Any(m => m.IsEffectivelySameAs(mfv));
  var hasCtor =
    entity.MembersFunctionsAndValues.Any(m => m.IsConstructor);
}

Both hasSameMember and hasCtor are false while expected to be true.

I'm using FSharp.Compiler.Service 12.0.2.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions