Skip to content

ConditionalAttribute is Emitted When It Shouldn't Be #233

@JasonBock

Description

@JasonBock

To reproduce:

using Rocks;
using System.Diagnostics;
			
public class ConventionDispatcher
{
	[Conditional("DEBUG")]
	public virtual void AssertNoScope() { }
}

public static class Test
{
	public static void Go()
	{
		var expectations = Rock.Create<ConventionDispatcher>();
	}
}

This creates the following diagnostics:

error CS0243: The Conditional attribute is not valid on 'CreateExpectationsOfConventionDispatcherExtensions.RockConventionDispatcher.AssertNoScope()' because it is an override method

This was found on Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions