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

opEquals was made auto so it appeared in the now defunct generated .di file. #2190

Merged
merged 1 commit into from May 21, 2018

Conversation

schveiguy
Copy link
Member

See 8ff270c

This makes the ddoc generation return auto, but it should really specify the return type. There's also no reason to semantic the function every compilation to figure this out.

@schveiguy schveiguy added Trivial typos, formatting, comments documentation labels May 21, 2018
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @schveiguy!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub fetch digger
dub run digger -- build "stable + druntime#2190"

@jacob-carlborg
Copy link
Contributor

It seems like it was changed to auto for a reason. Don't we care about that now? What about making it a dummy template, or is the compiler invoking this function somewhere?

@rainers
Copy link
Member

rainers commented May 21, 2018

According to git-blame it was me who changed that. I don't remember what the exact reason was, but I suspect that was to keep the .d file in sync with the .di file which was manually edited back then. Now that we actually only copy object.d to the import folder, that should be unnecessary now.

Please note that there is a second auto opEquals function right below.

@schveiguy
Copy link
Member Author

it was changed to auto for a reason

Yes. At some point in the past, object_.d and object.di were two separate files that were manually synchronized. In other words, whenever you added something to object_.d, you had to add it to object.di. In PR #1222, this was migrated to generating object.di from object_.d, which in case of this function, would REMOVE the function declaration completely (I think).

Fast forward to today, we have no object.di file, we have no reason to keep this as auto. Not a big deal, except the docs show it as returning auto, when it returns a bool (and should be listed this way).

@schveiguy
Copy link
Member Author

Please note that there is a second auto opEquals function right below.

drat, didn't notice that. Will update.

@schveiguy
Copy link
Member Author

Updated, now got both of them.

@rainers
Copy link
Member

rainers commented May 21, 2018

I still only see one.

@jacob-carlborg
Copy link
Contributor

Same here.

@schveiguy
Copy link
Member Author

Sorry, I'm learning new git techniques 😆. Should be fixed now.

@dlang-bot dlang-bot merged commit 39b1a00 into dlang:stable May 21, 2018
@schveiguy schveiguy deleted the opequalsreturnsbool branch May 21, 2018 17:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Trivial typos, formatting, comments
Projects
None yet
4 participants