CanMetax wrote: ↑Nov 19, 2022 10:21
the first double definition is not recognized.
the second is recognized.
I mean that.
In this context it's not a double definition. But it is an error. The "Foo_ as foo" is not allowed at all. A member of nested named type can not be a parent type. In this context 'foo' is an invalid type when used as the data type of a member of a nested named type.
When a statement has more than one error, only the first error is supposed to be shown.
But as can see, depends on comments, and due to fbc parsing inconsistency, user gets different reports:
Code: Select all
'' 2 errors displayed
type T1
m1 as unknown '' comment
m1 as unknown
end type
'' 1 error displayed (2 errors internally, the second is not displayed)
type T2
m1 as unknown
m1 as unknown '' comment
end type
So, with the comments, this actually indicates inconsistency in parsing and error reporting in any types, not only in nested types.