[Issue 3075] Implement parameter contravariance
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed Jul  3 11:36:00 UTC 2024
    
    
  
https://issues.dlang.org/show_bug.cgi?id=3075
--- Comment #32 from Bolpat <qs.il.paperinik at gmail.com> ---
Good:
```d
void main()
{
    void function(    const(int)*) fp = null;
    void function(          int *) gp = fp;
    void function(immutable(int)*) hp = fp;
}
```
Error:
```d
void main()
{
    void function(ref     const int ) fp = null;
    void function(ref           int ) gp = fp; // error
    void function(ref immutable(int)) hp = fp; // error
}
```
Same with s/function/delegate/g.
--
    
    
More information about the Digitalmars-d-bugs
mailing list