HOCON icon indicating copy to clipboard operation
HOCON copied to clipboard

Substitution error for array element

Open iron9light opened this issue 5 years ago • 1 comments

Hocon:

a {
  b: 0
  c: [
    "ccc"${a.b}
  ]
}

It will get exception: Hocon.HoconParserException : Substitution value must match the rest of the field type or empty. Array value type: String, substitution type: Number. At path 'a.b', line 5, position -2.

Hocon below has no parsing exception:

a {
  b: 0
  c: "ccc"${a.b}
}

iron9light avatar May 13 '20 15:05 iron9light

AFAIK an array has to use a '=' Line 3 in your 1st example should be

c = [

holonsoftFounder avatar Apr 06 '22 06:04 holonsoftFounder