Skip to content

Huge Breaking Issue in Net7 with MemberInfo equality #78218

Closed
@jogibear9988

Description

@jogibear9988

Description

If you compare 2 Memberinfos in Net7 from a Class and a Base they are equal in 7 but not in Previous Versions.
Cause of this my Database Mapping Framework did not work any more.
see issue: linq2db/linq2db#3823

Reproduction Steps

Try this code in Net6 it returns false, in 7 it returns true

    var i1 = typeof(a).GetProperty("c");
    var i2 = typeof(b).GetProperty("c");

    Console.WriteLine(i1 == i2);
    Console.ReadLine();

    class a
    {
        public string c { get; set; }
    }

    class b : a
    { }

Expected behavior

Code should return false

Actual behavior

returns tre

Regression?

Yes

Known Workarounds

None

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions