[Issue 22327] New: [Templates] arguments of T[] literals work for exactly one initialization before being set in stone
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Sep 22 00:00:59 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22327
Issue ID: 22327
Summary: [Templates] arguments of T[] literals work for exactly
one initialization before being set in stone
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: crazymonkyyy at gmail.com
Created attachment 1827
--> https://issues.dlang.org/attachment.cgi?id=1827&action=edit
minimized
given a template header such as `struct foo(T,T[] data)`, T[] data appears to
mean whatever the first init defined T as
This is across scope, functions and unit tests, if the first initization is
int,[1,2,3], and you try string.["a","b","c"], it attempts to parse
["a","b","c"] as an int[]
--
More information about the Digitalmars-d-bugs
mailing list