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 22102 - importC: Error: function is used as a type #12834

Merged
merged 1 commit into from Jul 8, 2021

Conversation

ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Jul 7, 2021

If a declaration looks like a function call, assume it is one. If during semantic, the callee is resolved as a type-name, rewrite the expression as a declaration or issue an error because C does not have type construction syntax.

@ibuclaw ibuclaw added Bug Fix ImportC Pertaining to ImportC support labels Jul 7, 2021
@ibuclaw ibuclaw requested a review from WalterBright July 7, 2021 23:32
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

Bugzilla references

Auto-close Bugzilla Severity Description
22102 critical importC: Error: function is used as a type

⚠️⚠️⚠️ Warnings ⚠️⚠️⚠️

To target stable perform these two steps:

  1. Rebase your branch to upstream/stable:
git rebase --onto upstream/stable upstream/master
  1. Change the base branch of your PR to stable

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#12834"

@WalterBright WalterBright merged commit 16cb5c6 into dlang:master Jul 8, 2021
@ibuclaw ibuclaw deleted the issue22102 branch July 8, 2021 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix ImportC Pertaining to ImportC support
Projects
None yet
4 participants