fix #2279
This commit is contained in:
parent
fe5b3353de
commit
b24c527c7e
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
|||
public const string Major = "3";
|
||||
public const string Minor = "6";
|
||||
public const string Build = "3";
|
||||
public const string Revision = "2569";
|
||||
public const string Revision = "2570";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%MINOR%=6
|
||||
%REVISION%=2569
|
||||
%COREVERSION%=3
|
||||
%REVISION%=2570
|
||||
%MINOR%=6
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.6.3.2569
|
||||
3.6.3.2570
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.6.3.2569'
|
||||
!define VERSION '3.6.3.2570'
|
||||
|
|
|
|||
11
TestSuite/qp2.pas
Normal file
11
TestSuite/qp2.pas
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
type
|
||||
t1 = auto class
|
||||
i: integer;
|
||||
end;
|
||||
|
||||
begin
|
||||
|
||||
var a: array of t1 := Arr(new t1(2));
|
||||
var o := a?.First;
|
||||
Assert((o as t1).i = 2)
|
||||
end.
|
||||
|
|
@ -122,7 +122,8 @@ namespace PascalABCCompiler.TreeConverter
|
|||
t = ctn2.compiled_original_generic.compiled_type;
|
||||
else if (av.type is compiled_type_node ctn1)
|
||||
t = ctn1.compiled_type;
|
||||
|
||||
if (av.type.type_special_kind == SemanticTree.type_special_kind.array_kind)
|
||||
return;
|
||||
if (!av.type.is_class && !av.type.IsInterface && !(t.IsGenericType && t.GetGenericTypeDefinition() == typeof(Nullable<>)))
|
||||
AddError(av.location, "OPERATOR_DQ_MUST_BE_USED_WITH_A_REFERENCE_TYPE_VALUETYPE");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue