D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 21967 - importC: Error function without 'this' cannot be 'const'
Summary: importC: Error function without 'this' cannot be 'const'
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 major
Assignee: No Owner
URL:
Keywords: ImportC, pull, rejects-valid
Depends on:
Blocks:
 
Reported: 2021-05-25 13:09 UTC by Iain Buclaw
Modified: 2021-05-26 12:44 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Iain Buclaw 2021-05-25 13:09:47 UTC
When declaring a function that returns a const result.
---
const int const_int_fn(void);
const int *const_int_fnptr(void);
const int **const_int_fnptrptr(void);
Comment 1 Dlang Bot 2021-05-25 20:58:25 UTC
@ibuclaw created dlang/dmd pull request #12584 "fix Issue 21967 - importC: Error function without 'this' cannot be 'const'" fixing this issue:

- fix Issue 21967 - importC: Error function without 'this' cannot be 'const'

https://github.com/dlang/dmd/pull/12584
Comment 2 Iain Buclaw 2021-05-26 12:44:34 UTC
Fixed committed as https://github.com/dlang/dmd/commit/9cff43750aa80bc4880a3bcf0b4d09d03b205a46