Bug 413414 - gmcs doesn't special case Nullable<> constraints
Summary: gmcs doesn't special case Nullable<> constraints
Status: RESOLVED DUPLICATE of bug 416110
Alias: None
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: SVN
Hardware: Other Other
: P5 - None : Minor
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-30 22:05 UTC by Rodrigo Kumpera
Modified: 2008-09-19 15:11 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rodrigo Kumpera 2008-07-30 22:05:57 UTC
Under MS, Nullable<> is declared as: "Nullable<T> where T: struct, new()".

This construct is not allowed for regular C# code, but it happens to work for Nullable.

This property might be verified by running the following program under MS and mono:

using System;
class Driver
{
	public static void Main ()
	{
		Console.WriteLine (typeof (Nullable<>).GetGenericArguments()[0].GenericParameterAttributes);
	}
}


MS reports: 
NotNullableValueTypeConstraint, DefaultConstructorConstraint

Mono reports:
NotNullableValueTypeConstraint


This is not a SRE issue as the API allows for such constraints to be defined.
Comment 1 Marek Safar 2008-09-19 15:11:32 UTC

*** This bug has been marked as a duplicate of bug 416110 ***