Binding an abstract type which has an abstract inheritor ToAllImplementations causes StyletIoCRegistrationException
- Dominant language
- C#
- Stars
- 1.1k
- Forks
- 155
- PR merge metrics
- No merged PRs in 30d
Description
**Description**
Binding an abstract base type `ToAllImplementations()` when there is an abstract type in the assembly which inherits from it causes a `StyletIoCRegistrationException`.
**To Reproduce**
```cs
abstract class Foo { }
abstract class Bar : Foo { }
class FooBar : Bar { }
// ...
builder.Bind().ToAllImplementations();
// On Building...
// StyletIoC.StyletIoCRegistrationException: Type Bar is not a concrete class, and so can't be used to implemented service Foo
```
**Version Info**
- Stylet version: 1.3.6
- Runtime version: 6.0.302
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the builder.Bind().ToAllImplementations() entry point and follow the build-time validation that raises StyletIoCRegistrationException for abstract Bar. Reproduce the shown Foo, Bar, and FooBar hierarchy, then verify that the abstract inheritor no longer causes failure while the concrete implementation is still registered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100