bug fix #1915
This commit is contained in:
parent
7e6958730b
commit
1469a9c5a6
|
|
@ -8591,7 +8591,11 @@ namespace PascalABCCompiler.NETGenerator
|
|||
mi = ti.tp.GetMethod("get_HasValue");
|
||||
il.Emit(OpCodes.Call, mi);
|
||||
if (ft == basic_function_type.objeq)
|
||||
il.Emit(OpCodes.Not);
|
||||
{
|
||||
il.Emit(OpCodes.Ldc_I4_0);
|
||||
il.Emit(OpCodes.Ceq);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else if (real_parameters[1].type.is_nullable_type && real_parameters[0] is INullConstantNode)
|
||||
|
|
@ -8608,7 +8612,10 @@ namespace PascalABCCompiler.NETGenerator
|
|||
mi = ti.tp.GetMethod("get_HasValue");
|
||||
il.Emit(OpCodes.Call, mi);
|
||||
if (ft == basic_function_type.objeq)
|
||||
il.Emit(OpCodes.Not);
|
||||
{
|
||||
il.Emit(OpCodes.Ldc_I4_0);
|
||||
il.Emit(OpCodes.Ceq);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (real_parameters[0].type.is_nullable_type && real_parameters[1].type.is_nullable_type)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
type TRec = record
|
||||
type TRec = record
|
||||
a: integer;
|
||||
b: real;
|
||||
end;
|
||||
|
|
@ -146,6 +146,7 @@ begin
|
|||
assert(v1 = nil);
|
||||
v1 := 4;
|
||||
assert(v1 <> nil);
|
||||
assert(not (v1 = nil));
|
||||
v2 := nil;
|
||||
assert(v2 = nil);
|
||||
v2 := new TRec;
|
||||
|
|
|
|||
Loading…
Reference in a new issue