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

Add SourceLoc.type_name method, showing the name of the containing type. #2643

Merged
merged 3 commits into from
Apr 20, 2018

Conversation

jemc
Copy link
Member

@jemc jemc commented Apr 11, 2018

SourceLoc already shows the method name of the __loc object,
but not the type name. Adding the type name is a logical next step,
since it is available.

EDIT:
Also renames method as method_name.

@jemc jemc self-assigned this Apr 11, 2018
@jemc jemc force-pushed the feature/source-loc-typ branch from 8bcdf42 to d88cfb0 Compare April 11, 2018 00:36
@jemc jemc added the changelog - added Automatically add "Added" CHANGELOG entry on merge label Apr 11, 2018
@Praetonus
Copy link
Member

What do you think about using entity as the method name?

@Praetonus
Copy link
Member

Or maybe type_name would be better?

@jemc
Copy link
Member Author

jemc commented Apr 11, 2018

If we use type_name, I'd also prefer to rename method as method_name (though this will make it a breaking change).

I'm okay with using entity, if there is consensus around that.

@Praetonus
Copy link
Member

I'd personally prefer type_name and method_name.

@SeanTAllen
Copy link
Member

Annoying for it to be a breaking change but, we are pre-1.0. I upvoted type_name and method_name.

jemc added 3 commits April 16, 2018 08:13
SourceLoc already shows the method name of the __loc object,
but not the type name. Adding the type name is a logical next step,
since it is available.

The method is named typ, because type is a reserved keyword that
cannot be used as a method name.
@jemc
Copy link
Member Author

jemc commented Apr 16, 2018

Okay, updated with the different name, and added a manual changelog entry.

@jemc jemc force-pushed the feature/source-loc-typ branch from d88cfb0 to 7cbf92c Compare April 16, 2018 15:16
@jemc jemc changed the title Add SourceLoc.typ method, showing the name of the containing type. Add SourceLoc.type_name method, showing the name of the containing type. Apr 16, 2018
@jemc jemc removed the changelog - added Automatically add "Added" CHANGELOG entry on merge label Apr 16, 2018
@jemc jemc merged commit 0ac80db into master Apr 20, 2018
@jemc jemc deleted the feature/source-loc-typ branch April 20, 2018 05:58
@jemc jemc mentioned this pull request May 9, 2018
dipinhora pushed a commit to dipinhora/ponyc that referenced this pull request Jun 5, 2018
…pe. (ponylang#2643)

* Add SourceLoc.typ method, showing the name of the containing type.

SourceLoc already shows the method name of the __loc object,
but not the type name. Adding the type name is a logical next step,
since it is available.

The method is named typ, because type is a reserved keyword that
cannot be used as a method name.

* Rename SourceLoc.{typ, method} as {type_name, method_name}.

* Add manual changelog entry for PR ponylang#2643.
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.

3 participants