Closed
Description
Use case
When using the data builders, a common mistake that I do, (and apparently others do too) is that inside the data builder, and especially when I am nested quite a lot, there are a lot of builders at the time in the scope; aka this
refers to a lot of builder types.
This makes it easy to reference something from a higher up scope, resulting in confusing looking code if you seemingly set some field that is not present in your correct scope, but it comes from a higher up one.
This comment shows an example of this.
Describe the solution you'd like
Marking the generated DSL builders with @DslScope would most likely make this mistake a build-time error, making our life just a bit easier when working with this feature.