Issue 24740 - Can't parse static array type property when a type is valid
Summary: Can't parse static array type property when a type is valid
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 normal
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2024-09-02 11:16 UTC by Nick Treleaven
Modified: 2024-09-02 11:17 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Nick Treleaven 2024-09-02 11:16:44 UTC
template MyTemplate(alias parameter) {}
alias a = MyTemplate!(int[4].init);

Error: found `.` when expecting `)` following template argument list
Error: unexpected identifier `init` after `MyTemplate!(int[4])`

static assert(is(int[3].tupleof[0] == int));

Error: found `.` when expecting `)`
Error: found `tupleof` when expecting `)`