Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

When code-gening inherited chunks that replace TModel token, wrap it in line pragmas #2373

@pranavkm

Description

@pranavkm

As part of directive inheritance from _GlobalImports, we perform a string replacement on certain kinds of chunks to change the token TModel real model type. For e.g., GlobalImport might contain @inject IFoo<TModel> MyFoo which gets code-gened as public IFoo<MyRealModel> MyFoo { get; set; }.

We should instead code-gen this with line pragmas as

public IFoo<
#line 23 something.cshtml
MyRealModel
#line hidden
> { get; set; }

This will ensure errors related to MyRealModel (misspelt type name etc) map to the view file correctly.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions