Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Don't suggest StringBuilder for consts #21

Closed
benaadams opened this issue Sep 25, 2015 · 1 comment
Closed

Don't suggest StringBuilder for consts #21

benaadams opened this issue Sep 25, 2015 · 1 comment
Labels

Comments

@benaadams
Copy link

The following will generate a suggestion for StringBuilder, however that is not possible and is also a compile time constant:

const string templateName = (nameof(Account) + "." +  nameof(Login));
@mjsabby mjsabby added the bug label Sep 25, 2015
@mjsabby
Copy link
Contributor

mjsabby commented Sep 25, 2015

Thanks, indeed this is a bug.

edespong added a commit to edespong/RoslynClrHeapAllocationAnalyzer that referenced this issue Dec 12, 2017
edespong added a commit to edespong/RoslynClrHeapAllocationAnalyzer that referenced this issue Dec 13, 2017
mjsabby pushed a commit that referenced this issue Mar 11, 2018
Do not report warning for string concats of constant expressions (#21)
@mjsabby mjsabby closed this as completed Mar 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants