Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RCS1159 False positive for custom EventHandler event with custom ref struct EventArgs. #1019

Closed
MineCake147E opened this issue Dec 23, 2022 · 0 comments · Fixed by #1022
Closed

Comments

@MineCake147E
Copy link

Product and Version Used:
Microsoft Visual Studio Community 2022 Version 17.5.0 Preview 2.0
Roslynator 2022 4.2.0

Visual Studio Community 2022 Version Information
Microsoft Visual Studio Community 2022
Version 17.5.0 Preview 2.0
VisualStudio.17.Preview/17.5.0-pre.2.0+33209.295
Microsoft .NET Framework
Version 4.8.04084

インストールされているバージョン:Community

Visual C++ 2022   00482-90000-00000-AA086
Microsoft Visual C++ 2022

ADL Tools Service Provider   1.0
This package contains services used by Data Lake tools

ASA Service Provider   1.0

ASP.NET and Web Tools   17.5.194.32986
ASP.NET and Web Tools

AvaloniaPackage Extension   1.0
AvaloniaPackage Visual Studio Extension Detailed Info

Azure App Service Tools v3.0.0   17.5.194.32986
Azure App Service Tools v3.0.0

Azure Data Lake Tools for Visual Studio   2.6.5000.0
Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools   17.5.194.32986
Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio   2.6.5000.0
Microsoft Azure Stream Analytics Tools for Visual Studio

Boost.Test のテスト アダプター   1.0
Boost.Test 向けに作成された単体テストを含む、Visual Studio のテスト ツールを有効にします。拡張機能のインストール ディレクトリに、使用条件およびサード パーティからの通知が含まれています。

C# ツール   4.5.0-2.22580.13+ea0b6351c129c7decd9bf76f4388239509e28e0d
IDE で使用する C# コンポーネント。プロジェクトの種類や設定に応じて、異なるバージョンのコンパイラを使用できます。

Code Cleanup On Save   1.0.12
Automatically run one of the Code Clean profiles when saving the document. This ensures your code is always formatted correctly and follows your coding style conventions.

CodeMaid   12.0
CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, R, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.

Common Azure Tools   1.10
Azure Mobile Services および Microsoft Azure Tools で使用する共通サービスを提供します。

Extensibility Message Bus   1.4.1 (main@2ee106a)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

File Icons   2.7
Adds icons for files that are not recognized by Solution Explorer

GhostDoc   22.2.22190.0  (Not Loaded)
Generate XML Comments from your code, maintain clean and up-to-date documentation, produce help documentation in multiple formats, use intelligent source code Spell Checker in Visual Studio.

Linux コア ダンプ デバッグ   1.0.9.33208
Linux コア ダンプのデバッグを有効にします。

Microsoft Azure Hive Query Language Service   2.6.5000.0
Language service for Hive query

Microsoft Azure Stream Analytics Language Service   2.6.5000.0
Language service for Azure Stream Analytics

Microsoft Azure Tools for Visual Studio   2.9
Azure Cloud Services プロジェクトのサポート

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Mono Debugging for Visual Studio   17.5.2 (d15e47f)
Support for debugging Mono processes with Visual Studio.

NuGet パッケージ マネージャー   6.5.0
Visual Studio 内の NuGet パッケージ マネージャー。NuGet の詳細については、https://docs.nuget.org/ にアクセスしてください

Razor (ASP.NET Core)   17.0.0.2255201+5530de5c8323cd1ecacb497bbab5637907d0fc02
ASP.NET Core Razor の言語サービスを提供します。

SonarLint for Visual Studio   6.10.0.57359
SonarLint is an extension to your favorite IDE that provides on-the-fly feedback to developers on new bugs and quality issues injected into their code.

SQL Server Data Tools   17.2.31208.0
Microsoft SQL Server Data Tools

Syntax Visualizer   1.0
An extension for visualizing Roslyn SyntaxTrees.

Test Adapter for Google Test   1.0
Google Test 向けに作成された単体テストを含む、Visual Studio のテスト ツールを有効にします。拡張機能のインストール ディレクトリに、使用条件およびサード パーティからの通知が含まれています。

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

Tweaks 2022   1.1.143
A collection of minor fixes and tweaks for Visual Studio to reduce the paper cuts and make you a happier developer

TypeScript Tools   17.0.11130.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic ツール   4.5.0-2.22580.13+ea0b6351c129c7decd9bf76f4388239509e28e0d
IDE で使用する Visual Basic コンポーネント。プロジェクトの種類や設定に応じて、異なるバージョンのコンパイラを使用できます。

Visual C++ for Cross Platform Mobile Development (Android)   17.0.33208.234
Visual C++ for Cross Platform Mobile Development (Android)

Visual C++ for Linux Development   1.0.9.33208
Visual C++ for Linux Development

Visual F# Tools   17.5.0-beta.22607.4+f5794982b82d308590542bd1e101162dc4f45a13
Microsoft Visual F# Tools

Visual Studio Color Theme Designer   1.0
Allows users to create and edit Visual Studio themes. Themes can customize colors used for menus, toolbars, tabs, titlebars, the text editor, and other environment colors.

Visual Studio IntelliCode   2.2
Visual Studio 向けの AI 支援付き開発。

Visual Studio Spell Check Everywhere   VSSpellCheckEverywhere
An extension that enables spell checking within any Visual Studio file editor or tool window that uses WPF text boxes.
https://GitHub.com/EWSoftware/VSSpellChecker

Visual Studio Spell Checker   VSSpellChecker
An editor extension that checks the spelling of comments, strings, and plain text as you type or interactively with tool windows.
https://GitHub.com/EWSoftware/VSSpellChecker

VisualStudio.DeviceLog   1.0
パッケージに関する情報

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

Xamarin   17.5.0.120 (main@4c08778)
Xamarin.iOS と Xamarin.Android の開発を有効にする Visual Studio 拡張機能

Xamarin Designer   17.5.2.64 (remotes/origin/d17-5@627f860876)
Visual Studio で Xamarin Designer ツールを有効にするための Visual Studio 拡張機能。

Xamarin Templates   17.5.3 (3c53880)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK   13.1.99.61 (main/2e10309)
Xamarin.Android Reference Assemblies and MSBuild support.
    Mono: 6dd9def
    Java.Interop: xamarin/java.interop/main@984711a3
    SQLite: xamarin/sqlite/3.40.0@fdc1e34
    Xamarin.Android Tools: xamarin/xamarin-android-tools/main@fa3711b


Xamarin.iOS and Xamarin.Mac SDK   16.1.1.27 (933c6c2c9)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Steps to Reproduce:

  1. Create a custom EventHandler with ref struct EventArgs.
  2. Define some event with the new EventHandler.
using System;
using System.Collections.Generic;
using System.Text;
namespace RCS1159FalsePositiveRefStructCustomEventArgs
{
    public delegate void CustomEventHandler(object sender, RefStructEventArgs e);
    public readonly ref struct RefStructEventArgs{}
    public interface IEventTest
    {
        event CustomEventHandler? CustomEvent;
    }
}

Actual Behavior:

CustomEvent gets RCS1159.
When I fix it, CustomEvent gets CS0306.

Expected Behavior:

CustomEvent doesn't get RCS1159.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants