Revert semantically incorrect VarAssStdAlone context set hack #57

Closed
opened 2022-12-16 17:23:37 +00:00 by deavmi · 2 comments
Owner

The code:

Variable variable = cast(Variable)tc.getResolver().resolveBest(c, vAsStdAl.getVariableName());
assert(variable);

/* Set the context of the assignment to the Context of the Variable being assigned to */
vAsStdAl.setContext(variable.getContext());

Should rather have this (capture the context coming in from generalPass():

vAsStdAl.setContext(context);
The code: ```d Variable variable = cast(Variable)tc.getResolver().resolveBest(c, vAsStdAl.getVariableName()); assert(variable); /* Set the context of the assignment to the Context of the Variable being assigned to */ vAsStdAl.setContext(variable.getContext()); ``` Should **rather** have this (capture the `context` coming in from `generalPass()`: ```d vAsStdAl.setContext(context); ```
deavmi added reference vardec_varass_dependency 2022-12-16 17:23:44 +00:00
deavmi self-assigned this 2022-12-16 17:23:48 +00:00
deavmi added the
dependency
needsfix
qol
labels 2022-12-16 17:23:57 +00:00
deavmi added this to the Dependency tree, type-checking and codegen project 2022-12-16 17:24:02 +00:00
deavmi added a new dependency 2022-12-16 17:25:27 +00:00
Author
Owner

This undoes issue #46

This undoes issue #46
deavmi started working 2022-12-17 11:34:59 +00:00
deavmi stopped working 2022-12-17 11:35:35 +00:00
36 seconds
Author
Owner

Fixed with commit ddea68a73db645d85c5ddb7a46001426a4dc8c70 on varass_vardec_dependency branch

Fixed with commit `ddea68a73db645d85c5ddb7a46001426a4dc8c70` on `varass_vardec_dependency` branch
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Total Time Spent: 36 seconds
deavmi
36 seconds
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Depends on
Reference: tlang/tlang#57
No description provided.