WerWolv / WerWolv/PatternLanguage

Exported local variable loose they types and attributes

Open
#152 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
275
Forks
75
Avg merge
1d 22h
Merged PRs (30d)
10

Description

Description of the Issue

Exporting a typed local value show it as a native type (without attribute).

Steps to Reproduce the Issue
  1. Create a new empty file
  2. Paste this code:
import type.size;

struct Test {
    type::Size16 size;
    type::Size<u32> life = 42 [[export]];
};

Test exemple @ 0;
  1. Examine the output
Expected Behavior

Exported value should keep it's type::Size<u32> type and the linked format attribute (from the size type)

Actual Behavior

The value is shown with underlying native type (u32) and the formatter attribute is lost.

Debug Information

ImHex portable on Windows10 x64

ImHex Hex Editor v1.36.2 by WerWolv
Powered by Dear ImGui v1.91.6
v1.36.X@77c1ee3
Compiled on Dec 28 2024 at 15:14:42

Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Rust reproducer in the issue and inspect how an exported typed local value is represented and displayed. Compare the output with the expected type::Size type and its formatter attribute; done means the exported value preserves both instead of showing only u32. No source file or test is identified in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.