Skip to content

Fix source-gen issue with a binding member access expression being on a separate line from the member expression #90851

@layomia

Description

@layomia

Same line

Interceptor location is successfully parsed. Project compiles:

var optionsBuilder = services.AddOptions<AppSettings>().BindConfiguration(nameof(AppSettings));

var optionsBuilder = services
    .AddOptions<AppSettings>().BindConfiguration(nameof(AppSettings));

Different line

Parsed interceptor location is inaccurate. Compilation fails with a CSC interceptors error stating that the generated [InterceptsLocation] points to an invalid location.

var optionsBuilder = services.AddOptions<AppSettings>()
    .BindConfiguration(nameof(AppSettings));

var optionsBuilder = services
    .AddOptions<AppSettings>()
    .BindConfiguration(nameof(AppSettings));

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions