Bug 18250 – deprecate + transition=complex should check whether the templates are instantiated from a deprecated scope

Status
REOPENED
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2018-01-17T08:01:56Z
Last change time
2024-12-13T18:56:11Z
Assigned to
No Owner
Creator
Seb
Moved to GitHub: dmd#19365 →

Comments

Comment #0 by greensunny12 — 2018-01-17T08:01:56Z
auto foo(T)(T t) { return T.init; } deprecated unittest { auto b = foo(2 + 2i); } This shouldn't trigger an error, but it does: > dmd -unittest -c -o- -transition=complex foo.d foo.d(1): Deprecation: use of complex type cdouble is deprecated, use std.complex.Complex!(double) instead foo.d(3): Deprecation: use of complex type cdouble is deprecated, use std.complex.Complex!(double) instead foo.d(1): Deprecation: use of complex type cdouble is deprecated, use std.complex.Complex!(double) instead
Comment #1 by greeenify — 2018-07-02T22:13:22Z
Working since a while, but somehow this wasn't auto-closed. https://run.dlang.io/is/xEdylU
Comment #2 by greensunny12 — 2018-08-15T10:28:48Z
Looks like the link posted earlier didn't include `-transition=complex`: https://run.dlang.io/is/Jm1opn
Comment #3 by robert.schadek — 2024-12-13T18:56:11Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19365 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB