This commit is contained in:
parent
79fa24a888
commit
7b3cb71ccd
|
|
@ -7198,6 +7198,11 @@ namespace PascalABCCompiler.NETGenerator
|
||||||
is_addr = true;
|
is_addr = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (parameters[i].type is ICompiledTypeNode && (parameters[i].type as ICompiledTypeNode).compiled_type == TypeFactory.CharType && parameters[i].parameter_type == parameter_type.var
|
||||||
|
&& real_parameters[i] is ISimpleArrayIndexingNode && helper.GetTypeReference((real_parameters[i] as ISimpleArrayIndexingNode).array.type).tp == TypeFactory.StringType)
|
||||||
|
{
|
||||||
|
copy_string = true;
|
||||||
|
}
|
||||||
real_parameters[i].visit(this);
|
real_parameters[i].visit(this);
|
||||||
|
|
||||||
if (mi.DeclaringType == TypeFactory.ArrayType && mi.Name == "Resize" && i == 1)
|
if (mi.DeclaringType == TypeFactory.ArrayType && mi.Name == "Resize" && i == 1)
|
||||||
|
|
|
||||||
1
TestSuite/exe/input.txt
Normal file
1
TestSuite/exe/input.txt
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
45
|
||||||
11
TestSuite/stringelem5.pas
Normal file
11
TestSuite/stringelem5.pas
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
var
|
||||||
|
a, b: string;
|
||||||
|
|
||||||
|
begin
|
||||||
|
a := '1';
|
||||||
|
b := '1';
|
||||||
|
assign(input,'input.txt');
|
||||||
|
readln(a[1], b[1]);
|
||||||
|
assert(a[1] = '4');
|
||||||
|
assert(b[1] = '5');
|
||||||
|
end.
|
||||||
Loading…
Reference in a new issue