fix Issue 19463 - DIP1008 - _d_newclass is called instead of _d_newTh…#9481
fix Issue 19463 - DIP1008 - _d_newclass is called instead of _d_newTh…#9481WalterBright merged 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request, @WalterBright! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#9481" |
|
A simple shell test of |
Two options I can think of:
The first option has the advantage of being rather simple and platform-independent |
|
Unfortunately, even in a trivial program _d_newclass is being called from elsewhere, and that idea fails. So it's the script plan. |
Thats why I suggested an object file. |
|
@thewilsonator I added a script, can you please have a look at it? Not very experienced with scripts. |
|
I hate script tests too, but that looks fine to me. We'll have to see what the autotester thinks. |
|
@atilaneves can you please look into the buildkite/dmd failure, as it is kaliedoscope |
|
Seems to be a problem with exception.toString |
|
e.g. |
|
This PR also appears to resolve https://issues.dlang.org/show_bug.cgi?id=19317 |
|
Isn't it better to check that
Perhaps check which ClassInfo is passed and assert only when it matches the ClassInfo of the thrown class. |
|
I pushed and tagged a new excel-d, should work now. |
|
Added test case from https://issues.dlang.org/show_bug.cgi?id=19317 |
|
Thanks, @atilaneves ! |
|
@atilaneves sadly, it's still failing kaleidoscope |
|
@WalterBright It's failing on the old tag (0.4.1), I pushed the new tag (0.4.2) to the wrong remote by mistake. Should work now. |
|
Thank you, @atilaneves ! Now, if only @thewilsonator or @wilzbach would approve this! |
Please adjust the commit message to reflect that so the dlang bot picks up on it. |
|
I resolved 19317 as a duplicate of 19463, and the test case for it was added to this PR. |
|
OK. |
|
|
||
|
|
||
| $DMD -c -dip1008 -m${MODEL} -of${OUTPUT_BASE}${OBJ} -I${EXTRA_FILES} ${EXTRA_FILES}/${TEST_NAME}.d | ||
| !(nm ${OUTPUT_BASE}${OBJ} | grep _d_newclass) |
There was a problem hiding this comment.
@WalterBright As far as I understand this verifies that _d_newclass is not called, not that _d_newThrowable is called. I recommend implementing _d_newThrowable instead and verify it's getting called. This way a shell script is not required.
Still embarrassing that this now always calls _d_newThrowable, irrespective of whether -dip1008 is specified or not. |
…rowable
Well, this is embarrassing. I must have never checked that code in. The trouble is, I'm not sure how to test it, other than manually checking the output which I've done.