Skip to content

Executor.cs: make constructors of abstract classes protected, keep co…#8

Merged
GregoryNikolaishvili merged 2 commits intomainfrom
bugfix/ProtectedCtor
Aug 20, 2025
Merged

Executor.cs: make constructors of abstract classes protected, keep co…#8
GregoryNikolaishvili merged 2 commits intomainfrom
bugfix/ProtectedCtor

Conversation

@temonk
Copy link
Copy Markdown
Contributor

@temonk temonk commented Aug 20, 2025

Executor.cs: make constructors of abstract classes protected, keep concrete implementations’ constructors public.

…ncrete implementations’ constructors public.
@temonk temonk requested a review from Copilot August 20, 2025 10:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR changes the constructor visibility logic in the Choice generator to use abstract type checking instead of sealed type checking. The change ensures that abstract classes get protected constructors while concrete implementations maintain public constructors, which follows proper object-oriented design principles.

  • Updated constructor visibility logic from isSealedType to !typeSymbol.IsAbstract
  • Incremented version number to 1.3.3

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/AltaSoft.Choice.Generator/Executor.cs Changed constructor visibility logic to check for abstract types instead of sealed types
Directory.Build.props Bumped version from 1.3.2 to 1.3.3

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@GregoryNikolaishvili GregoryNikolaishvili merged commit e9898ee into main Aug 20, 2025
1 check passed
@temonk temonk deleted the bugfix/ProtectedCtor branch August 20, 2025 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants