Bug 324515 (MONO81840) - [GMCS] CS0308 must be reported when non-generic type is used with type arguments
Summary: [GMCS] CS0308 must be reported when non-generic type is used with type arguments
Status: RESOLVED FIXED
Alias: MONO81840
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.2
Hardware: Other All
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Marek Safar
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-10 12:37 UTC by Gert Driesen
Modified: 2007-09-15 21:24 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 Thomas Wiest 2007-09-15 20:41:14 UTC


---- Reported by gert.driesen@pandora.be 2007-06-10 05:37:18 MST ----

When a non-generic type is used with type arguments, then MS reports error 
CS0308 while we report CS0246.

To reproduce, compile the following code snippet:

class Program
{
  static NamingContext<int> Lookup ()
  {
    return null;
  }

  static void Main ()
  {
    Lookup ();
  }
}

class NamingContext
{
}

Expected result:

error CS0308: The non-generic type 'NamingContext' cannot be used with 
type arguments

Actual result:

error CS0246: The type or namespace name `NamingContext`1' could not be 
found. Are you missing a using directive or an assembly reference?



---- Additional Comments From marek.safar@seznam.cz 2007-06-12 11:26:43 MST ----

Fixed in SVN.