catala/tests/struct/good/same_name_fields.catala_en

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.1 KiB
Plaintext
Raw Normal View History

## Article
```catala
declaration structure Foo:
data f content integer
declaration structure Bar:
data f content integer
declaration scope A:
context output x content Foo
context output y content integer
scope A:
definition x equals Foo { -- f: 1 }
definition y equals x.Foo.f
```
2023-12-05 18:56:59 +03:00
```catala-test-inline
$ catala Typecheck --check-invariants
┌─[WARNING]─
│ The structure "Bar" is never used; maybe it's unnecessary?
├─➤ tests/struct/good/same_name_fields.catala_en:7.23-7.26:
│ │
│ 7 │ declaration structure Bar:
│ │ ‾‾‾
└─ Article
┌─[RESULT]─
│ All invariant checks passed
└─
┌─[RESULT]─
│ Typechecking successful!
└─
2023-12-05 18:56:59 +03:00
```
```catala-test-inline
$ catala test-scope A
┌─[WARNING]─
│ The structure "Bar" is never used; maybe it's unnecessary?
├─➤ tests/struct/good/same_name_fields.catala_en:7.23-7.26:
│ │
│ 7 │ declaration structure Bar:
│ │ ‾‾‾
└─ Article
┌─[RESULT]─
│ x = Foo { -- f: 1 }
│ y = 1
└─
```