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

VSTHRD010 flags on chained constructor call to base, thread-affinitized type #1089

Open
AArnott opened this issue Sep 13, 2022 · 0 comments
Open

Comments

@AArnott
Copy link
Member

AArnott commented Sep 13, 2022

Bug description

A class that derives from a thread-affinitized base class is expected to assert thread affinity before the chained constructor call, which is impossible.

Repro steps

Given a class declared to derive from these types:

    internal abstract class TerminalWindowBase : ToolWindowPane, IVsWindowFrameEvents, IOleCommandTarget, IVsDebuggerEvents

Another class

        public TerminalWindowRenderer(TerminalWindowState state)
#pragma warning disable VSTHRD010
            : base(state)
#pragma warning restore VSTHRD010
        {
        }

Expected behavior

The warning should not be emitted at the location suppressed above.

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

No branches or pull requests

1 participant