Skip to content

"Generate class ..." causes inconsistent accessibility #18240

@josefpihrt

Description

@josefpihrt

Version Used: Visual Studio 2017 15.0.0-RTW+26228.4

Code to Reproduce:

public class Foo<T> where T : Bar // Generate class 'Bar'
{
}

Actual Behavior:

public class Foo<T> where T : Bar // CS0703 Inconsistent accessibility: constraint type 'Bar' is less accessible than 'Foo<T>'
{
}

internal class Bar 
{
}

Expected Behavior:

public class Foo<T> where T : Bar
{
}

public class Bar 
{
}

Metadata

Metadata

Assignees

Labels

Area-IDEBugResolution-FixedThe bug has been fixed and/or the requested behavior has been implemented

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions