Fix type def reopening type from parent namespace#11208
Conversation
| ") { char } | ||
| end | ||
|
|
||
| it "type def does not reopen type from parent namespace (#11181)" do |
There was a problem hiding this comment.
💭 "type def" is confusing because typedef is a thing in the language. Maybe "type declaration" or just "class def" or "class declaration"?
There was a problem hiding this comment.
I took that term from the lookup_type_def method. But yeah, I also thought it might be considered ambiguous.
A type declaration is var : Type, so I don't think that's a better solution. class works here, and I suppose we can use module in the other spec (I didn't add specs for all kinds of types, but I think that's fine b/c the code is identical).
But it would be better to have a generic term for definitions of all kinds of types (class, struct, module, ...). And I think "type definition" is a natural solution for that with "type" being the abstraction for all kinds of types and it being a "definition".
If we go along with #10031 the term would be free from overloads =) For now, I'd propose to leave it as is. In this context, the meaning is unambiguous.
|
This is a bug fix which we could still merge for 1.12.0, but there's a non-dismissible chance for unforseen effects with such a change in the type grammar. This patch has been sitting for years, so there seems to be no rush to release it. |
ysbaddaden
left a comment
There was a problem hiding this comment.
Let's merge right after 1.12 is released, so we can have some time in nightly before releasing 1.13 and we don't push it forever.
Resolves #11181