fix #1317
This commit is contained in:
parent
3e42c11aba
commit
45352cc287
9
TestSuite/errors/err0288.pas
Normal file
9
TestSuite/errors/err0288.pas
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses System;
|
||||
|
||||
function F1(): Nullable<Nullable<byte>>;
|
||||
begin
|
||||
end;
|
||||
|
||||
begin
|
||||
|
||||
end.
|
||||
|
|
@ -149,7 +149,7 @@ namespace PascalABCCompiler.TreeRealization
|
|||
{
|
||||
return new SimpleSemanticError(null, "PARAMETER_{0}_MUST_BE_REFERENCE_TYPE", tn.PrintableName);
|
||||
}
|
||||
if (gpe.is_value && !tn.is_value && !tn.is_generic_parameter)
|
||||
if (gpe.is_value && (!tn.is_value || tn.BaseFullName != null && tn.BaseFullName.StartsWith("System.Nullable")) && !tn.is_generic_parameter)
|
||||
{
|
||||
return new SimpleSemanticError(null, "PARAMETER_{0}_MUST_BE_VALUE_TYPE", tn.PrintableName);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue