cpp-hocon icon indicating copy to clipboard operation
cpp-hocon copied to clipboard

Good reference identified as "part of a cycle of substitutions"

Open zzhang97 opened this issue 3 years ago • 0 comments

Describe the Bug

The following configuration snippet

base {
}

app = ${base} {
  a {
    b = 1
  }
  c = [
    ${app.a.b}
  ]
}

was complained as "${app.a.b} was part of a cycle of substitutions."

Expected Behavior

The above configuration is OK.

Steps to Reproduce

Steps to reproduce the behavior:

	auto config = hocon::config::parse_string(R"(
base {
}

app = ${base} {
  a {
    b = 1
  }
  c = [
    ${app.a.b}
  ]
}
)"
	)->resolve();

Environment

  • Version [cpp-hocon 0.3.0]
  • Platform [Ubuntu 18.04, g++ 10.3]

zzhang97 avatar Apr 27 '22 20:04 zzhang97