Skip to content

changed 'alias y x' to 'alias x = y' throughout dlang.org#492

Closed
JinShil wants to merge 1 commit intodlang:masterfrom
JinShil:patch-2
Closed

changed 'alias y x' to 'alias x = y' throughout dlang.org#492
JinShil wants to merge 1 commit intodlang:masterfrom
JinShil:patch-2

Conversation

@JinShil
Copy link
Contributor

@JinShil JinShil commented Feb 7, 2014

No description provided.

expression.dd Outdated
Copy link

Choose a reason for hiding this comment

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

This isn't valid. I think the old syntax will be deprecated as well. @9rnsr: Do you know if I'm right about the deprecation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, I got a little carried away. Can I just fix it in my branch?

Copy link
Contributor

Choose a reason for hiding this comment

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

@AndrejMitrovic I don't know that the old alias syntax will be deprecated. At least, currently new alias syntax does not cover all of old syntax features.

  1. New alias syntax cannot declare function type directly
    alias int func(int); is OK, but alias fun = int(int); is not valid.
  2. New alias syntax cannot declare function pointer or delegate type with extern.
    alias extern(C) int function() FP; is OK, but alias FP = extern(C) int function(); is not accepted.

Copy link

Choose a reason for hiding this comment

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

#2 is just a parser bug afaik.

I'm not sure what to do about (or what is the actual purpose of ) #1.

@ghost
Copy link

ghost commented Feb 7, 2014

Done with my review. Thank you very much for doing this @JinShil!

@JinShil
Copy link
Contributor Author

JinShil commented Feb 7, 2014

@AndrejMitrovic Thanks for the review. I believe I've fixed all errors.

@ghost
Copy link

ghost commented Feb 7, 2014

Thanks. Could you please squash the commits together?

@JinShil
Copy link
Contributor Author

JinShil commented Feb 7, 2014

I'm sorry, but I'm new to this. Can you tell me how?

@ghost
Copy link

ghost commented Feb 7, 2014

git rebase -i head~6

And then mark the first commit as the one to pick, the others as "fixup", and change the first commit's message to something like I've done below:

clipboard02

If you end up in a Vi interface like I did, hit the i key to get into interactive mode, do your changes, and then hit esc, hit :, type w (shows :w), hit enter (this writes the file). Then hit : again and type q and enter to quit. Then do a forced push to your repository via git push -f.

@JinShil
Copy link
Contributor Author

JinShil commented Feb 7, 2014

Thanks. Done.

@ghost
Copy link

ghost commented Feb 7, 2014

I'm seeing 8 commits now.

@ghost
Copy link

ghost commented Feb 7, 2014

Excellent, I'm seeing only 1 commit now. If all you want to do is edit its commit message, you can do:

git commit --amend

@JinShil
Copy link
Contributor Author

JinShil commented Feb 7, 2014

I totally screwed this up. I'll submit another pull request later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants