Skip to content

Add a TypeForward for JsonResult#7278

Merged
pranavkm merged 2 commits intomasterfrom
prkrishn/type-forward
Feb 5, 2019
Merged

Add a TypeForward for JsonResult#7278
pranavkm merged 2 commits intomasterfrom
prkrishn/type-forward

Conversation

@pranavkm
Copy link
Copy Markdown
Contributor

@pranavkm pranavkm commented Feb 5, 2019

Fixes #7220

@pranavkm pranavkm requested a review from davidfowl February 5, 2019 17:57
@davidfowl
Copy link
Copy Markdown
Member

Do you need to do it this way? Would TypeForwardFrom work? Or nah?

@pranavkm
Copy link
Copy Markdown
Contributor Author

pranavkm commented Feb 5, 2019

I thought TypeForwardedFrom was informational only and not used for type resolution.

@davidfowl
Copy link
Copy Markdown
Member

Ah I see.

@davidfowl
Copy link
Copy Markdown
Member

@pranavkm how did you test this? Should we reference the 2.1 package in one of our tests?

@pranavkm
Copy link
Copy Markdown
Contributor Author

pranavkm commented Feb 5, 2019

I added a reference to the Swashbuckle in the MvcSandbox and saw it fail as soon as I referenced JsonResult. Using the helper method on Controller worked fine. Once the type forward was in place, the error was resolved.

Should we reference the 2.1 package in one of our tests?

Would help to test it against a real app (something that references the framework, like MusicStore), but it's really unlikely this is a scenario we would regress.

@pranavkm pranavkm force-pushed the prkrishn/type-forward branch from 10ff8fb to 094c531 Compare February 5, 2019 19:03
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