Can I use input values in includes

Can you use inputs from one file to pass along to another?

For example: in child.yml:

spec:
  inputs:
    foo:
---
job:
  stage: foo
  script:
    - echo $[[ inputs.foo ]]

Then in another file parent.yml that is also meant to be included, but itself includes child.yml

spec:
  inputs:
    bar:
      default: "baz"
---

include:
  - local: 'child.yml'
    inputs:
      foo: $[[ inputs.baz]]

# other jobs and code here

and then finally this would all be consumed by a .gitlab-ci.yml file:

include: 
  - local: parent.yml
    inputs:
      bar: 'hello'

# other jobs

Is this supposed to work?