Goal
A Team constant written where a Color parameter is expected keeps its authored form through parse and emit, so it is not charged an extra element.
Context
OWBastion/Bastion passes a Team value in a Color position (playEffect(..., DynamicEffect.ECHO_STICKY_BOMB_EXPLOSION, Team.2, eventPlayer, 200)). Pinned OverPy 9.7.10 writes it as written, Team 2, and the client imports that. workshop-rs writes Color(Team 2):
input: Play Effect(All Players(All Teams), Echo Sticky Bomb Explosion Effect, Team 2, Event Player, 200);
emit: Play Effect(All Players(All Teams), Echo Sticky Bomb Explosion Effect, Color(Team 2), Event Player, 200);
The project has 14 such calls (Team 1 four times, Team 2 ten times); OverPy also writes Color(Team N) in 14 other Play Effect calls and 28 Create Effect calls where the source used the Color constant. The client counts the Wright build of this project 20 elements above the OverPy build (30090 against 30070), and OverPy's own accounting charges the wrapper one element, so these 14 account for most of the difference. The remaining 6 are not isolated; candidates are the single False/True count difference and the While condition spelling below.
While((a) && (b) && (c) && (d)) in OverPy's output is written as While(And(And(And(a, b), c), d)) by workshop-rs (rule [Hero/D.Va] Sync remech charge); whether the client counts them the same is unknown.
Scope
- Keep the authored spelling of a value whose type differs from the parameter's when the client accepts it (evidence: OverPy's output is imported), instead of resolving it to the parameter's enum member.
- Cover it with a regression test in en-US and zh-CN.
- Record whether the infix boolean chain and the nested
And cost the same in the client.
Non-goals
- Element-count model (separate issue).
- Warning about the type slip in the source (a source-language diagnostic).
Acceptance criteria
- Parse then emit of the
Play Effect line above reproduces the input.
- On the project above the Wright build's
Color( count equals OverPy's.
Dependencies
Related: #302, ADR-0014, ADR-0015.
Goal
A Team constant written where a Color parameter is expected keeps its authored form through parse and emit, so it is not charged an extra element.
Context
OWBastion/Bastionpasses a Team value in a Color position (playEffect(..., DynamicEffect.ECHO_STICKY_BOMB_EXPLOSION, Team.2, eventPlayer, 200)). Pinned OverPy 9.7.10 writes it as written,Team 2, and the client imports that.workshop-rswritesColor(Team 2):The project has 14 such calls (
Team 1four times,Team 2ten times); OverPy also writesColor(Team N)in 14 otherPlay Effectcalls and 28Create Effectcalls where the source used the Color constant. The client counts the Wright build of this project 20 elements above the OverPy build (30090 against 30070), and OverPy's own accounting charges the wrapper one element, so these 14 account for most of the difference. The remaining 6 are not isolated; candidates are the singleFalse/Truecount difference and theWhilecondition spelling below.While((a) && (b) && (c) && (d))in OverPy's output is written asWhile(And(And(And(a, b), c), d))byworkshop-rs(rule[Hero/D.Va] Sync remech charge); whether the client counts them the same is unknown.Scope
Andcost the same in the client.Non-goals
Acceptance criteria
Play Effectline above reproduces the input.Color(count equals OverPy's.Dependencies
Related: #302, ADR-0014, ADR-0015.