Skip to content
Discussion options

You must be logged in to vote

to my mind it should be parsing and resolving DefaultHttpContext context = new() first, then evaluating the chained method call

Why would it do that? The compiler hasn't performed overload resolution yet, so it doesn't know that the type of the new() subexpression is going to be the same as the type of the whole expression. And without that, there is no connection between new() and DefaultHttpContext.

Replies: 2 comments 37 replies

Comment options

You must be logged in to vote
37 replies
@tannergooding
Comment options

@CyrusNajmabadi
Comment options

@TahirAhmadov
Comment options

@CyrusNajmabadi
Comment options

@TahirAhmadov
Comment options

Answer selected by RikkiGibson
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet