Bug 49419 - Generics, Inheritance, Using, InnerClass => NullPointerException
Summary: Generics, Inheritance, Using, InnerClass => NullPointerException
Status: NEW
Alias: None
Product: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 4.8.0 (C9)
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
: 52759 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-12-09 05:08 UTC by Widagdo Setiawan
Modified: 2017-02-27 14:59 UTC (History)
2 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Widagdo Setiawan 2016-12-09 05:08:56 UTC
Mono JIT compiler version 4.8.0 (Stable 4.8.0.374/5e1b0a0
Linux Kernel 3.10.0-327.36.3.el7.x86_64
OS: Centos 7

The sample code below compiles just fine under Visual Studio 15 on Windows 10.
However, the mono compiler throws NullReferenceException.

From my experiments, the sample code below is the simplest required to reproduce the bug.

using TypedGenericClass = MonoBugReport.GenericClass<MonoBugReport.DerivedClass.CustomType>;

namespace MonoBugReport
{
    class GenericClass<T>
    {
    }

    class DerivedClass : TypedGenericClass
    {
        public class CustomType
        {
        }
    }
}
Comment 1 Marek Safar 2017-02-27 14:59:55 UTC
*** Bug 52759 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.