Skip to content
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

Remove internals for typedef declaration #4038

Merged
merged 2 commits into from Oct 5, 2014

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Oct 1, 2014

Supplemental PR for the change: #4029

This PR also make the syntax is(T == typedef) an error. To do it, this PR needs corresponding Phobos fix:
dlang/phobos#2577

@9rnsr
Copy link
Contributor Author

9rnsr commented Oct 1, 2014

Also needs druntime tweaking: dlang/druntime#978

@quickfur
Copy link
Member

quickfur commented Oct 2, 2014

Looks like druntime and phobos are ready for this now. Time to merge?

@9rnsr
Copy link
Contributor Author

9rnsr commented Oct 2, 2014

Yes, ready to merge.

@ibuclaw
Copy link
Member

ibuclaw commented Oct 2, 2014

I'm ready for this. Any last objections @WalterBright, @andralex?

@dnadlinger
Copy link
Member

Was the is(T == typeof) syntax marked as deprecated before? If not, can we keep it around as deprecated and hard-coded to false for a couple of releases or so?

@9rnsr
Copy link
Contributor Author

9rnsr commented Oct 2, 2014

Was the is(T == typeof) syntax marked as deprecated before? If not, can we keep it around as deprecated and hard-coded to false for a couple of releases or so?

Surely immediate error was not good. I made the is(T == typeodef) syntax deprecated.

@WalterBright
Copy link
Member

Let me take a look at this after I get home. Thanks!

@dnadlinger
Copy link
Member

@WalterBright: When would that be, approximately? The PR should be good to go, although the is(T == typedef) deprecation message could maybe be a bit more explanatory as to what the user needs to do to fix their code (no good ideas, unfortunately).

if (targ->ty != Ttypedef)
goto Lno;
tded = ((TypeTypedef *)targ)->sym->basetype;
goto Lno;
break;
Copy link
Member

Choose a reason for hiding this comment

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

The break; has become dead code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, fixed.

@WalterBright
Copy link
Member

Auto-merge toggled on

WalterBright added a commit that referenced this pull request Oct 5, 2014
Remove internals for typedef declaration
@WalterBright WalterBright merged commit 4b29161 into dlang:master Oct 5, 2014
@9rnsr 9rnsr deleted the remove_typedef branch October 5, 2014 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants