Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive

Remove TypeInfo.init#1807

Merged
dlang-bot merged 2 commits intodlang:masterfrom
aG0aep6G:remove-TypeInfo.init
Apr 10, 2017
Merged

Remove TypeInfo.init#1807
dlang-bot merged 2 commits intodlang:masterfrom
aG0aep6G:remove-TypeInfo.init

Conversation

@aG0aep6G
Copy link
Contributor

as planned

Fixes issue 12233 - Attempting to use TypeInfo.init results in
a compiler error due to lack of 'this'.
@dlang-bot
Copy link
Contributor

Fix Bugzilla Description
12233 Attempting to use TypeInfo.init results in a compiler error due to lack of 'this'.

@dlang-bot dlang-bot added the Bug Fix Include reference to corresponding bugzilla issue label Apr 10, 2017
Copy link
Member

@schveiguy schveiguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Not sure how the changelog works, but I wouldn't have expected you to have to delete the old changelog entry.

@schveiguy
Copy link
Member

Looks like TypeInfo.init is used in some DMD tests, so those have to be updated to use initializer before this will pass.

@wilzbach
Copy link
Contributor

Not sure how the changelog works, but I wouldn't have expected you to have to delete the old changelog entry.

Yeah ideally all changelog should be removed with every new major release..

@aG0aep6G
Copy link
Contributor Author

Looks like TypeInfo.init is used in some DMD tests, so those have to be updated to use initializer before this will pass.

The only failure I can find in the logs is this:

Test failed: 
expected:
----
fail_compilation/ice15441.d(24): Error: variable ice15441.main.__front62 type void is inferred from initializer __r61.front(), and variables cannot be of type void
fail_compilation/ice15441.d(24): Error: expression __r61.front() is void and has no value
fail_compilation/ice15441.d(24): Error: s1.front is void and has no value
fail_compilation/ice15441.d(27): Error: cannot infer argument types, expected 1 argument, not 2
----
actual:
----
fail_compilation/ice15441.d(24): Error: variable ice15441.main.__front63 type void is inferred from initializer __r62.front(), and variables cannot be of type void
fail_compilation/ice15441.d(24): Error: expression __r62.front() is void and has no value
fail_compilation/ice15441.d(24): Error: s1.front is void and has no value
fail_compilation/ice15441.d(27): Error: cannot infer argument types, expected 1 argument, not 2
----

fail_compilation/ice15441.d doesn't seem to do anything with TypeInfo.init. The unexpected output is off only in some generated numbers. Could this be because I've added a unittest to object.d? If so, how do I proceed here? Make a PR for dmd that bumps those numbers?


Yeah ideally all changelog should be removed with every new major release..

That should have happened when 2.074 was branched off, right? Looks like it was overlooked. To be clear, I'm aiming for 2.075 here.

@schveiguy
Copy link
Member

how do I proceed here?

Hm... that seems kind of brittle. One thing we can do is move the unit test elsewhere, and then move it back when the fragility of the dmd tests can be addressed (create a bug report, I would say).

Another option is to move the unit test items into an already existing block, but I'm not 100% sure that will fix it, not sure what that numbering scheme comes from.

@aG0aep6G aG0aep6G changed the title Remove type info.init Remove TypeInfo.init Apr 10, 2017
@aG0aep6G
Copy link
Contributor Author

Turns out dmd's d_do_test has a mechanism to avoid hard-coding generated numbers in expected error messages. PR to use it: dlang/dmd#6684

@aG0aep6G
Copy link
Contributor Author

Turns out dmd's d_do_test has a mechanism to avoid hard-coding generated numbers in expected error messages. PR to use it: dlang/dmd#6684

That PR has been merged. Auto-tester is turning green now.

@schveiguy
Copy link
Member

Auto-tester is turning green now.

Nice!

@dlang-bot dlang-bot merged commit 1f292ca into dlang:master Apr 10, 2017
@aG0aep6G aG0aep6G deleted the remove-TypeInfo.init branch April 11, 2017 16:07
nemanja-boric-sociomantic added a commit to nemanja-boric-sociomantic/swarm-1 that referenced this pull request Jan 19, 2018
TypeInfo_Class.init is deprecated and removed from the runtime (since
.init clashes with the type property of the same name). This uses
`initializer()` method which is the new way of accessing the same thing
in D2.

dlang/druntime#1403
dlang/druntime#1766
dlang/druntime#1807

https://issues.dlang.org/show_bug.cgi?id=15037
https://issues.dlang.org/show_bug.cgi?id=12233
gavin-norman-sociomantic pushed a commit to sociomantic-tsunami/swarm that referenced this pull request Jan 19, 2018
TypeInfo_Class.init is deprecated and removed from the runtime (since
.init clashes with the type property of the same name). This uses
`initializer()` method which is the new way of accessing the same thing
in D2.

dlang/druntime#1403
dlang/druntime#1766
dlang/druntime#1807

https://issues.dlang.org/show_bug.cgi?id=15037
https://issues.dlang.org/show_bug.cgi?id=12233
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Bug Fix Include reference to corresponding bugzilla issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants