[dclass.d] deduplicate logic for checking reserved classes - #21731
Conversation
|
Thanks for your pull request and interest in making D better, @thewilsonator! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#21731" |
89be964 to
e28f0b7
Compare
|
I presume this is a fault with dscanner, that function is local. dlang-community/D-Scanner#968 |
63d1cf3 to
15f54c8
Compare
| if (id == Id.TypeInfo_StaticArray) | ||
| { | ||
| //if (!inObject) | ||
| // Type.typeinfostaticarray.classError("%s `%s` %s", msg); | ||
| Type.typeinfostaticarray = this; | ||
| } |
There was a problem hiding this comment.
I don't know why this was originally commented out:
class TypeInfo_StaticArray {}
class TypeInfo_Array {}
void main() {}yields
testtisa.d(2): Error: class `testtisa.TypeInfo_StaticArray` already exists at object.d(979). Perhaps in another function with the same name?
testtisa.d(3): Error: class `TypeInfo_Array` only object.d can define this reserved class name
and errors anyway.
15f54c8 to
478d7a6
Compare
No description provided.