Skip to content
This repository was archived by the owner on Feb 4, 2019. It is now read-only.

Type comparison operators #420

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

SemyonL
Copy link

@SemyonL SemyonL commented Jul 5, 2016

Added type comparison operators.

var type = rightOperand as Type;
if (type == null)
{
throw new InvalidOperationException(@"The right operand of '-is' must be a type.");
Copy link
Contributor

@ygra ygra Jul 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a verbatim string literal here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To emphasise localisable text only literal.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ygra, I think that some tools such as Resharper will throw a warning here mentioning "possibly localizable string". Making a literal verbatim is really a way to suppress this warning. So:

a) I don't think we generally use this practice in Pash code
b) that's really a localizable string, so it would be improper to just suppress the warning. If we one day will ultimately decide to localize Pash (what's unlikely but possible), we'll need to localize it.

So I don't think that you should use verbatim string literal here. Better get rid of that.

@ForNeVeR
Copy link
Contributor

ForNeVeR commented Jul 5, 2016

Look, guys, we have some problems on AppVeyor. Seems manageable if we update project to .NET4.5. I don't think that problem is caused by the changes in this PR.

@ForNeVeR
Copy link
Contributor

ForNeVeR commented Jul 5, 2016

@SemyonL could you please add some tests?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants