Scope the scope - unexpected function behaviour

Just out of curiosity, does anyone know that in the following script:


func real fun1(complex in1){
    
    cout << "in fun1: in1=" << in1 << endl;
    complex in12Scope = in1;
    
    func real fun2(complex in2){
        cout << "in fun2: in1=" << in1 << endl;
        cout << "in fun2: in12Scope=" << in12Scope << endl;
        return 0;
    }
    fun2(0);
    
    return 0;
}
fun1(alpha);

why does the line cout << "in fun2: in1=" << in1 << endl; write (0,0) as output?

I can confirm this, for the script:

complex alpha = 2 + 1i;
fun1(alpha);

and using the function given above, I get the following output:

in fun1: in1=(2,1)
in fun2: in1=(0,0)
in fun2: in12Scope=(2,1)

Edit: FreeFem++ guide Version 3.48 does not contain the keyword scope in the index. With a search I could only find the sentence:

The scope of a variable is the current block {...} like in C++…

So it looks like undefined behavior to me.