You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
sobiyang
changed the title
Either SA1009 or SA1024 raised for primary constructor followed by colon
Either SA1009 or SA1024 raised for primary constructor with class inheritance
Jan 10, 2024
In C# 12, if we use primary constructor with class inheritance, then SA1009 is raised. However if we removed the trailing space, it becomes SA1024.
Sample code:
Keeping the space:
![StyleCop_SA1009](https://private-user-images.githubusercontent.com/3262885/295487150-002379c7-6142-4868-ae59-efe3197b5980.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1MTIxNDQsIm5iZiI6MTcyMDUxMTg0NCwicGF0aCI6Ii8zMjYyODg1LzI5NTQ4NzE1MC0wMDIzNzljNy02MTQyLTQ4NjgtYWU1OS1lZmUzMTk3YjU5ODAuanBnP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDlUMDc1NzI0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDk2ZGI2YWY2ZmYwNzY4MjMwOGM2MzY5OGRkMWIyZmI1MzhjMjhiZWMyY2VjNGE0MDRlMzg4MjY0MGI4MDdkZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.BbQ1kIle1_b5TNdWdNFYS3SuBltK0vHcY2ZJY8GSPmI)
![StyleCop_SA1024](https://private-user-images.githubusercontent.com/3262885/295487203-071d9809-a038-4cad-a1cf-3e0c1fc95c2c.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1MTIxNDQsIm5iZiI6MTcyMDUxMTg0NCwicGF0aCI6Ii8zMjYyODg1LzI5NTQ4NzIwMy0wNzFkOTgwOS1hMDM4LTRjYWQtYTFjZi0zZTBjMWZjOTVjMmMuanBnP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDlUMDc1NzI0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OWUyZjVkYTVmMjQ0OGMzNmNkOTQ2ZjZiYmM1ZTlhOGJjYzdkOGJjOWY3OTBkNmE2NWMzZWQ3YTQ4YTZmZmZhOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.kZF0fQ7C48Nykc1y4BBHnz96uY2Uk5D0iri5VzAln8o)
Removing the space:
The text was updated successfully, but these errors were encountered: