2021-05-26 21:48:44 +03:00
|
|
|
## Article
|
|
|
|
|
|
|
|
```catala
|
|
|
|
declaration structure Foo:
|
|
|
|
data f content integer
|
|
|
|
|
|
|
|
declaration structure Bar:
|
|
|
|
data f content integer
|
|
|
|
data g content integer
|
|
|
|
|
|
|
|
declaration scope A:
|
|
|
|
context x content Foo
|
|
|
|
context y content integer
|
|
|
|
|
|
|
|
scope A:
|
|
|
|
definition x equals Foo { -- f: 1 }
|
|
|
|
definition y equals x.Foo.g
|
|
|
|
```
|
2022-07-08 17:23:09 +03:00
|
|
|
|
2022-09-23 15:04:13 +03:00
|
|
|
```catala-test-inline
|
2024-02-26 12:18:08 +03:00
|
|
|
$ catala test-scope A
|
2024-05-03 13:20:09 +03:00
|
|
|
┌─[ERROR]─
|
|
|
|
│
|
|
|
|
│ Field "g" does not belong to structure "Foo" (however, structure "Bar"
|
|
|
|
│ defines it)
|
|
|
|
├─➤ tests/struct/bad/wrong_qualified_field.catala_en:17.23-17.30:
|
|
|
|
│ │
|
|
|
|
│17 │ definition y equals x.Foo.g
|
|
|
|
│ │ ‾‾‾‾‾‾‾
|
|
|
|
└─ Article
|
2023-06-28 16:57:52 +03:00
|
|
|
#return code 123#
|
2022-07-08 17:23:09 +03:00
|
|
|
```
|