-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No need to decompile coreDisplayName all the time #4443
Conversation
src/fsharp/TypeChecker.fs
Outdated
if (idRange.EndColumn - idRange.StartColumn <= 5) && | ||
not cenv.g.compilingFslib | ||
then | ||
let opName = DecompileOpName coreDisplayName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not every branch of the pattern uses DecompileOpName.
With this change, it will happen regardless of the branch executed. Im guessing that it will now be called more times.
I suppose you can make it lazy with: let opName () = DecompileOpName coreDisplayName
Kevin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay upon closer look, this looks good. Ignore my prvious comment.
src/fsharp/TypeChecker.fs
Outdated
match opName with | ||
| PrettyNaming.Relational -> | ||
if isMember then | ||
warning(StandardOperatorRedefinitionWarning(FSComp.SR.tcInvalidMethodNameForRelationalOperator(opName, (CompileOpName opName)), idRange)) | ||
if Option.isSome memberInfoOpt then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we bring this up? ex: let isMember = Option.isSome memberInfoOpt
and use isMember
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer memberInfoOpt.IsSome
to Option.isSome memberInfoOpt
. Use properties if they are there
3b0ac24
to
07d31bc
Compare
done. |
07d31bc
to
29e9ad6
Compare
Thanks for this. |
No description provided.