lean4-htt/tests/lean/struct1.lean.expected.out
Kyle Miller 9847923f9b
feat: record all structure parents in StructureInfo (#5853)
Followup to #5841. Makes the `structure` command populate the new
`parentInfo` field with all the structures in the `extends` clause.

This will require a stage0 update to fully take effect.

Breaking change: now it's a warning if a structure extends a parent
multiple times.

Breaking change: now `getParentStructures` is `getStructureSubobjects`.
Adds `getStructureParentInfo` for getting all the immediate parents.
Note that the set of subobjects is neither a subset nor a superset of
the immediate parents.

Closes #1881
2024-10-28 01:23:48 +00:00

32 lines
1.3 KiB
Text

struct1.lean:9:14-9:17: error: invalid structure type, expecting 'Type _' or 'Prop'
struct1.lean:12:20-12:29: error: expected structure
struct1.lean:15:28-15:34: warning: duplicate parent structure 'A'
struct1.lean:15:28-15:34: warning: field 'x' from 'A' has already been declared
struct1.lean:15:28-15:34: error: parent field type mismatch, field 'x' from parent 'A' has type
Bool : Type
but is expected to have type
Nat : Type
struct1.lean:18:27-18:33: error: parent field type mismatch, field 'x' from parent 'B' has type
Bool : Type
but is expected to have type
Nat : Type
struct1.lean:29:1-29:2: error: field 'x' has already been declared
struct1.lean:32:1-32:2: error: field 'x' has been declared in parent structure
struct1.lean:35:6-35:10: error: type mismatch
true
has type
Bool : Type
but is expected to have type
Nat : Type
struct1.lean:38:5-38:9: error: omit field 'x' type to set default value
struct1.lean:41:12-41:16: error: type mismatch
true
has type
Bool : Type
but is expected to have type
Nat : Type
struct1.lean:44:0-44:13: error: invalid 'private' constructor in a 'private' structure
struct1.lean:47:0-47:15: error: invalid 'protected' constructor in a 'private' structure
struct1.lean:50:0-50:19: error: invalid 'protected' field in a 'private' structure
S : Type
S.mk2 (x : Nat) : S