https://issues.dlang.org/show_bug.cgi?id=24686

          Issue ID: 24686
           Summary: SumType stopped working on LDC 1.37 with unmatched
                    DeducedParameterType template
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nob...@puremagic.com
          Reporter: cont...@lsferreira.net

Compiling an argument parser (cant really deduce the code snippet) 
63874b2ce32b165436d3007515377ef5d5dce22d version of
https://github.com/andrey-zherikov/argparse yields the following error on LDC
1.37 and beyond.

```
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(Unknown))` does not match template declaration
`DeducedParameterType(T)`
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(Argument))` does not match template declaration
`DeducedParameterType(T)`
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(SubCommand))` does not match template declaration
`DeducedParameterType(T)`
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(Unknown))` does not match template declaration
`DeducedParameterType(T)`
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(Argument))` does not match template declaration
`DeducedParameterType(T)`
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(SubCommand))` does not match template declaration
`DeducedParameterType(T)`
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(Unknown))` does not match template declaration
`DeducedParameterType(T)`
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(Argument))` does not match template declaration
`DeducedParameterType(T)`
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(SubCommand))` does not match template declaration
`DeducedParameterType(T)`
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(Unknown))` does not match template declaration
`DeducedParameterType(T)`
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(Argument))` does not match template declaration
`DeducedParameterType(T)`
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(SubCommand))` does not match template declaration
`DeducedParameterType(T)`
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(Unknown))` does not match template declaration
`DeducedParameterType(T)`
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(Argument))` does not match template declaration
`DeducedParameterType(T)`
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(SubCommand))` does not match template declaration
`DeducedParameterType(T)`
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(Unknown))` does not match template declaration
`DeducedParameterType(T)`
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(Argument))` does not match template declaration
`DeducedParameterType(T)`
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(SubCommand))` does not match template declaration
`DeducedParameterType(T)`
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(Unknown))` does not match template declaration
`DeducedParameterType(T)`
/home/luis/.local/bin/../import/std/sumtype.d(418): Error: template instance
`DeducedParameterType!(inout(Argument))` does not match template declaration
`DeducedParameterType(T)`
```

Turns out `DeducedParameterType` doesn't accept aliased types. Ultimately this
should be a compiler issue, in my understanding of the language spec, as T and
alias T shouldn't differ for types, but somehow it does.

Making `DeducedParameterType` accepting aliased types, works.

--

Reply via email to