Skip to content

Remove cmptag.#260

Merged
dvander merged 1 commit intomasterfrom
rm-lval-garbage
Dec 3, 2018
Merged

Remove cmptag.#260
dvander merged 1 commit intomasterfrom
rm-lval-garbage

Conversation

@dvander
Copy link
Member

@dvander dvander commented Nov 3, 2018

This doesn't exist in upstream Pawn. It's not clear what it does, or if it ever did anything, or if it worked correctly when it did. It's awkwardly attached to value structs even though it's actually parsing state. Even more strange is that sometimes it's a tag and sometimes it turns into a symbol count.

@dvander dvander force-pushed the rm-lval-garbage branch 2 times, most recently from 1df9ff9 to 22b2340 Compare November 5, 2018 05:12
@dvander dvander changed the base branch from master to sm-tests November 5, 2018 05:13
@dvander dvander force-pushed the sm-tests branch 2 times, most recently from 1f3ff45 to 338595b Compare November 6, 2018 05:24
@dvander dvander changed the base branch from sm-tests to master December 2, 2018 06:38
Copy link
Member

@Headline Headline left a comment

Choose a reason for hiding this comment

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

c m p t a g

curiously
misapplied
practices
that
are
garbage

This doesn't exist in upstream Pawn. It's awkwardly attached to value
structs even though it's actually parsing state. Even more strange is
that sometimes it's a tag and sometimes it turns into a symbol count.

It allowed an awkward feature to exist where enum members could be
duplicated or shadowed across enum declarations. The compiler would then
attempt to deduce the correct declaration when used as an index. Having
shadowed constants in the global namespace is bizarre and we're better
off not having this feature, or even trying to replicate it through
saner parsing tricks.

Now, if enum fields are shadowed, the compiler will error. The
short-term fix for this is for developers to prefix their enum fields
(which is common practice in core code).
@dvander dvander merged commit d0a1892 into master Dec 3, 2018
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