Skip to content
This repository was archived by the owner on Aug 24, 2022. It is now read-only.
This repository was archived by the owner on Aug 24, 2022. It is now read-only.

Incorrect method call for non-virtual methods. #623

@iskiselev

Description

@iskiselev

Here is test case:

using System;

public static class Program
{
    public static void Main()
    {
        Base d = new Derived();
        d.I1();
    }
}

public class Base
{
    public void I1()
    {
        Console.WriteLine("base");
    }
}

public class Derived : Base
{
    public new void I1()
    {
        Console.WriteLine("derived");
    }
}

Expected result: base. Actual result: derived.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions