1474 – regression: const struct with an initializer not recognized as a valid alias template param

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1474 - regression: const struct with an initializer not recognized as a valid alias template param
Summary: regression: const struct with an initializer not recognized as a valid alias ...
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P2 regression
Assignee: Walter Bright
URL:
Keywords:
Depends on:
Blocks:
Reported: 2007年09月05日 14:50 UTC by Tomasz Stachowiak
Modified: 2020年11月18日 14:53 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Tomasz Stachowiak 2007年09月05日 14:50:48 UTC
template Foo(alias a) {}
struct Bar {}
const Bar bar = {};
alias Foo!(bar) baz;
// ----
constaliasbug.d(6): template instance Foo!(Bar()) does not match any template declaration
Works in dmd 1.020, works when the initializer is removed from "bar"'s declaration: 'const Bar bar;' (invalid in gdc, iirc), and works when 'bar' is not const.
This bug breaks Bind, btw.
Comment 1 Brad Roberts 2007年10月20日 04:08:41 UTC
Fixed in 1.022/2.005
Comment 2 Dlang Bot 2020年01月03日 05:30:04 UTC
dlang/dub pull request #1848 "Add a warning / workaround for issue 1474" was merged into master:
- ac7858129fa24357558b3f197972c2498f915dcb by Geod24:
 Add a warning / workaround for issue 1474
https://github.com/dlang/dub/pull/1848 
Comment 3 Dlang Bot 2020年11月18日 14:53:08 UTC
dlang/dub pull request #2035 "Fix Issue #1474 - Regenerate build settings after preGenerateCommands" was merged into master:
- eee1f474a8e7a9a04c7b11ce4ecd4f5c49e50c35 by Ömer Faruk IRMAK:
 Revert "Add a warning / workaround for issue 1474"
 
 This reverts commit ac7858129fa24357558b3f197972c2498f915dcb.
https://github.com/dlang/dub/pull/2035 


AltStyle によって変換されたページ (->オリジナル) /