This commit is contained in:
parent
0d846d2335
commit
d396c4a9fe
6
TestSuite/nullable18.pas
Normal file
6
TestSuite/nullable18.pas
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
begin
|
||||
var a := |default(integer?),nil,1|;
|
||||
assert(a[1] = nil);
|
||||
assert(a[0] = nil);
|
||||
assert(a[2] = 1);
|
||||
end.
|
||||
|
|
@ -3285,7 +3285,8 @@ namespace PascalABCCompiler.TreeConverter
|
|||
ret_type = types[i];
|
||||
else if (tc == type_compare.non_comparable_type)
|
||||
{
|
||||
AddError(lst[i].location, "UNCOMPARABLE_TYPES_IN_ARRAY_CONST");
|
||||
if (!can_convert_type(types[i], ret_type))
|
||||
AddError(lst[i].location, "UNCOMPARABLE_TYPES_IN_ARRAY_CONST");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue