Skip to content

Namespaces::getType(): improve detection of namespace keyword as operator#132

Merged
jrfnl merged 1 commit into
developfrom
feature/namespace-get-type-improve-operator-detection
May 1, 2020
Merged

Namespaces::getType(): improve detection of namespace keyword as operator#132
jrfnl merged 1 commit into
developfrom
feature/namespace-get-type-improve-operator-detection

Conversation

@jrfnl

@jrfnl jrfnl commented May 1, 2020

Copy link
Copy Markdown
Member

When the namespace keyword is used in the global namespace, it is less easy to determine with 100% certainty whether it used for a declaration or as an operator, especially when taking into account potential coding errors, such as the use of reserved keywords in the namespace name and/or a leading backslash used in a namespace declaration.

This PR hardens the code and will more often correctly detect whether the namespace keyword is used as an operator when used in the global namespace.

Includes unit tests.

…ator

When the `namespace` keyword is used in the global namespace, it is less easy to determine with 100% certainty whether it used for a declaration or as an operator, especially when taking into account potential coding errors, such as the use of reserved keywords in the namespace name and/or a leading backslash used in a namespace declaration.

This PR hardens the code and will more often correctly detect whether the namespace keyword is used as an operator when used in the global namespace.

Includes unit tests.
@jrfnl jrfnl modified the milestones: 1.0.0, 1.0.0-alpha3 May 1, 2020
@jrfnl
jrfnl merged commit 0fa0724 into develop May 1, 2020
@jrfnl
jrfnl deleted the feature/namespace-get-type-improve-operator-detection branch May 1, 2020 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant