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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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