Skip to content
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 15550 - compile error while testing template constraint #5366

Closed
wants to merge 1 commit into from

Conversation

MartinNowak
Copy link
Member

  • fixing typing of incompletely instantiated function templates
    (don't use void)
  • use TypeInstance so it will fail w/ a proper error message

- fixing typing of incompletely instantiated function templates
  (don't use void)
- use TypeInstance so it will fail w/ a proper error message
@dlang-bot
Copy link
Contributor

Fix Bugzilla Description
15550 [Reg 2.070.0-b1] compile error while testing template constraint

@MartinNowak
Copy link
Member Author

This is a bit more difficile. We must not generate an error during ScopeExp.semantic, b/c the partially specialized template can be used later on. On the other hand we have to generate an instantiation error when the type of such a ScopeExp is used.

@MartinNowak
Copy link
Member Author

It's too risky to fix this at the end of the beta. It's also a deeper problem, because ScopeExp can't know whether it's used in a function call with arguments or in a typeof expression, it's not possible to resolve the template instance only within ScopeExp. Subsequently ScopeExp should be what it's doc comment says Mainly just a placeholder, and do nothing (or better assert(0)) in it's semantic function.
Anything involving a ScopeExp must be handled above it (using the template instance stored in the ScopeExp).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants