Context for VariableExpression and Variable missing #9

Closed
opened 2022-10-13 12:19:39 +01:00 by deavmi · 3 comments
Owner

We need to finish implementing the setting of two contexts. The VariableExpression's context and the variable itself that is referred to - we must be sure of WHAT we set it to, the quick current fix is:

/* NOTE: Fix is below I think (it doesn't crash then) */
/* Set context for expression and the variable itself */
varExp.setContext(context);
Entity bruh = tc.getResolver().resolveBest(context.getContainer(), path);
bruh.setContext(context);

In core.d in dependency/.

We need to finish implementing the setting of two contexts. The `VariableExpression`'s context and the *variable itself* that is referred to - we must be sure of WHAT we set it to, the quick current fix is: ```d /* NOTE: Fix is below I think (it doesn't crash then) */ /* Set context for expression and the variable itself */ varExp.setContext(context); Entity bruh = tc.getResolver().resolveBest(context.getContainer(), path); bruh.setContext(context); ``` In `core.d` in `dependency/`.
deavmi added the
typing
label 2022-10-13 12:19:55 +01:00
deavmi added this to the Dependency tree, type-checking and codegen project 2022-10-13 12:19:58 +01:00
deavmi self-assigned this 2022-10-13 12:20:04 +01:00
deavmi changed title from Expression DNode context to Context for VariableExpression and Variable missing 2022-10-13 13:04:31 +01:00
deavmi added a new dependency 2022-10-15 20:59:17 +01:00
Author
Owner

I must look at this again, somewhat intertwined with #10

I must look at this again, somewhat intertwined with #10
Author
Owner

Also related to the context stuff which could aid in cleaning up #53

Also related to the context stuff which could aid in cleaning up #53
deavmi changed reference from function_dep to vardec_varass_dependency 2022-12-16 14:24:10 +00:00
deavmi added the
qol
label 2022-12-16 14:25:18 +00:00
deavmi removed reference vardec_varass_dependency 2022-12-19 09:51:33 +00:00
deavmi added this to the Basics milestone 2022-12-19 09:51:52 +00:00
deavmi added the
dependency
label 2022-12-19 09:52:15 +00:00
Author
Owner

This is related to #68, setting variable made no sense. It's where it is declared we only care abotu the expresison referring to it and that must be set. If I disabled variable's it was fine, expresiosn wasn't. It makes sense.

This is related to #68, setting variable made no sense. It's where it is **declared** we only care abotu the expresison _referring_ to it and that must be set. If I disabled variable's it was fine, expresiosn wasn't. It makes sense.
deavmi added reference hotfix/simply_varexp_dnode_generation 2023-08-16 09:53:46 +01:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tlang/tlang#9
No description provided.