KarolS / KarolS/millfork

Assigning struct word member from another struct word member

Open
#134 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
279
Forks
21
PR merge metrics
No merged PRs in 30d

Description

I have noticed that assigning a member variable (word type) of one struct from the word member variable of another (different) struct does not seem to work.

eg: If we have:
struct STRUCT1 { word a }
struct STRUCT2 { word b }
pointer.STRUCT1 pS1
pointer.STRUCT2 pS2

then
pS1->a = pS2->b
does not result in the correct value in pS1->a

Contributor guide

Open the contributing guide

Research direction

Start with the reported Millfork example involving assignments between word members of different structs. Trace how struct member access and word assignments are compiled, then reproduce the incorrect value with the example and add a regression test showing that pS1->a receives pS2->b.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.