pyhocon
pyhocon copied to clipboard
+= inside an object creates an invalid ConfigSubstitution
Example:
base = {
numbers = [1,2,3]
other = test
}
extends = ${base} {
numbers += [4,5]
}
Expected:
extends.numbers = [1,2,3,4,5]
Actual:
extends.numbers = [4,5]
I believe this is due to the fact that when the config_parser creates the ConfigSubstitution in ConfigTreeParser.postParse it uses a relative path and not an absolute path as the variable name
For example:
numbers = [10,11]
base = {
numbers = [1,2,3]
other = test
}
extends = ${base} {
numbers += [4,5]
}
Expected:
extends.numbers = [1,2,3,4,5]
Actual:
extends.numbers = [10,11,4,5]