Skip to content

Potential [ObsoleteAttribute] Issue #240

@JasonBock

Description

@JasonBock

To reproduce:

var code =
	"""
	using Rocks;
	using System;

	#nullable enable

	namespace MockTests
	{
		[Obsolete("This interface is not intended to be used directly by user code")]
		public interface IShader
		{
			[Obsolete("This method is not intended to be used directly by user code")]
			uint GetPixelOptions();
		}

		public interface IPixelShader : IShader
		{
			void Execute();
		}

		public static class Test
		{
			public static void Generate()
			{
				var rock = Rock.Create<IPixelShader>();
			}
		}
	}
	""";

In the test project, because I think generalDiagnosticOption: ReportDiagnostic.Error is not set like it is in the code gen test app, this doesn't fail, but it will when warnings are errors, something like this:

error CS0618: 'ID2D1InputDescriptionsLoader' is obsolete: 'This interface is not intended to be used directly by user code'

This was found on ComputeSharp.D2D1.ID2D1PixelShader

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions