Skip to content

Generic attributes don't properly resolve ambiguity with verbatim identifier #54772

@RikkiGibson

Description

@RikkiGibson

Version Used: 3661e83

Steps to Reproduce:

public class AAttribute<T> : System.Attribute {}
public class A<T> : System.Attribute {}

[@A<int>]
[AAttribute<int>]
public class C
{
}

Expected Behavior: No errors when "generic attributes" feature is enabled.

Actual Behavior: Ambiguity error on [@A<int>].

Note that the corresponding scenario for a non-generic attribute works. The issue seems to lie in the difference between BindNonGenericSimpleNamespaceOrTypeOrAliasSymbol and BindGenericSimpleNamespaceOrTypeOrAliasSymbol. It feels like it's not a high priority scenario so punting for now.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions