Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-288029: Razor: incorrect inline variable with @-prefixed reserved keywords

$
0
0
Reporter Alexander I. Zaytsev (hazzik) Alexander I. Zaytsev (hazzik)
Created Jan 27, 2012 11:34:03 AM
Updated Jan 27, 2012 6:25:38 PM
Priority Normal
Type Bug
Fix versions Next
State Submitted
Assignee Slava Trenogin (derigel)
Subsystem Inplace Refactorings
Affected versions 6.1.1
Fixed in build No Fixed in build
I have following code snippet
@{
    var htmlAttributes = ViewData.ModelMetadata.IsReadOnly
                             ? new {@readonly = "readonly"}
                             : new {};
}

@Html.TextBoxFor(x => x, htmlAttributes)


I want to inline htmlAttributes

And I get incorrect code
@Html.TextBoxFor(x => x, ViewData.ModelMetadata.IsReadOnly
                                                                                                                                               ? new {W‌rite(readonly); = "readonly"}
                                                                                                                                               : new {})


Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>