Skip to content

Manual use of macroRW on enum creates infinite loop #468

@rgwilton

Description

@rgwilton

When moving to version 3.0.0, I get the following warning for

Starting compilation server

[warn] ./scripts/helper.sc:277:40
[warn] Infinite loop in function body

for this code:

given rwConfigType: ReadWriter[ConfigType] = macroRW, where ConfigType is defined as:

enum ConfigType:
  case Config, ConfigStructural, StateAppliedConfig, StateDerived, StateStructural, Unknown

, which I can confirm at run time that the compile warning is indeed correct ;-).

Deleting the given and adding a "derives ReadWriter" fixes the issue, but thought that it would be helpful to flag this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions