-
-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix issue 19661 - SIGSEGV in std.traits.isFunction #9648
Conversation
|
Thanks for your pull request and interest in making D better, @Basile-z! 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 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 "stable + dmd#9648" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix is in wrong place.
| @@ -374,7 +374,8 @@ extern(C++) Initializer initializerSemantic(Initializer init, Scope* sc, Type t, | |||
| sc = sc.endCTFE(); | |||
| if (i.exp.op == TOK.error) | |||
| { | |||
| return new ErrorInitializer(); | |||
| assert(cast(ErrorExp) i.exp); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cast is useless, because ErrorExp is an extern(C++) class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Casting it is even less correct. Again, need to find where i.exp.op was set to TOK.error.
| @@ -374,7 +374,8 @@ extern(C++) Initializer initializerSemantic(Initializer init, Scope* sc, Type t, | |||
| sc = sc.endCTFE(); | |||
| if (i.exp.op == TOK.error) | |||
| { | |||
| return new ErrorInitializer(); | |||
| assert(cast(ErrorExp) i.exp); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Casting it is even less correct. Again, need to find where i.exp.op was set to TOK.error.
|
New fix : #9652 |
The ICE didn't happen when the imported template, isFunction, was copied in the same module as the test case. Now in both cases the same compiler error is issued (and in both cases the line information misses).