So basically, templated functions get flow-typing. I guess that is a good reason to use templated functions more...

What is the downside? E.g.:

struct node {int value; node* next;}

node mk_node2()(){
    node tmp = {2019, null};
    return tmp;
}

node mk_node(){
    node tmp = {2019, null};
    return tmp;
}

void main() {
        immutable x = mk_node2(); //succeeds
    immutable y = mk_node(); //fails
}

Reply via email to