Skip to content

Implement additional type reservations#1206

Closed
nikic wants to merge 1 commit intophp:masterfrom
nikic:reserveMoreTypes
Closed

Implement additional type reservations#1206
nikic wants to merge 1 commit intophp:masterfrom
nikic:reserveMoreTypes

Conversation

@nikic
Copy link
Copy Markdown
Member

@nikic nikic commented Mar 30, 2015

  • The class names false, true and null are now reserved.
  • The code dealing with reserved class names is now decoupled
    from scalar type hint handling. It also includes self, parent,
    and static, which are class names which were already reserved
    previously.
  • In cases where there already was a reserved class name message
    for self etc. it is now reserved, instead of using the generic
    one.

Fallout: class_alias() can no longer alias self, parent and static.
However this never really worked in the first place, as the test
which was testing this shows.

 * The class names false, true and null are now reserved.
 * The code dealing with reserved class names is now decoupled
   from scalar type hint handling. It also includes self, parent,
   and static, which are class names which were already reserved
   previously.
 * In cases where there already was a reserved class name message
   for self etc. it is now reserved, instead of using the generic
   one.

Fallout: class_alias() can no longer alias self, parent and static.
However this never really worked in the first place, as the test
which was testing this shows.
@nikic
Copy link
Copy Markdown
Member Author

nikic commented Mar 30, 2015

Merged as 53a4038 with minor tweaks.

@nikic nikic closed this Mar 30, 2015
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.

1 participant