ForNeVeR / ForNeVeR/Cesium

Variable access to a local struct

Open
#552 0 comments 0 reactions 0 assignees View on GitHub
area:compiler kind:bug status:blocked
Dominant language
C#
Stars
451
Forks
49
Avg merge
13h 59m
Merged PRs (30d)
6

Description

After #551, I've found the following example of broken behavior:
```
int main(void) {
struct foo {
int x;
} bar;
bar.x = 42; // Type Cesium.CodeGen.Ir.Types.StructType was not found.
return bar.x;
}
```

It may be fixed by rolling back commit baa2fde359087c82875b4a6e4709d8b5f93274e8 (in particular, see changes in `LValueInstanceField`), but I currently feel the whole type gen process should be rearchitectured.

So, for now this will have to be broken until we do #201.

Contributor guide

Open the contributing guide

Research direction

Reproduce the local-struct example and inspect the changes to LValueInstanceField in commit baa2fde359087c82875b4a6e4709d8b5f93274e8. Read the related work in issue #201 before deciding on an approach, since this issue says the type-generation process may need rearchitecting. Done means the example no longer reports that StructType was not found and variable access works.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, csharp
Domain
compilers
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.