View Issue Details

IDProjectCategoryView StatusLast Update
0037842pas2jstranspilerpublic2020-10-06 12:58
Reporterhenrique Assigned ToMattias Gaertner  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformPas2JsOSWindows 
Summary0037842: Access violation
DescriptionWhen I try to add one generic list to another, where the type is a class derived from another is giving "access violation".

Apparently it's a check whether a variable is filled, because the item hasn't been specialized in that check yet.

I've attach a project that's giving you an error and a patch fix.
TagsNo tags attached.
Fixed in Revision
Attached Files

Activities

henrique

2020-09-29 21:48

reporter  

Patch.patch (1,144 bytes)   
From 77c1e64d587f5a0166337c27ebbffdcf15a8a66d Mon Sep 17 00:00:00 2001
From: Henrique Gottardi Werlang <henriquewerlang@hotmail.com>
Date: Thu, 10 Sep 2020 09:28:20 -0300
Subject: [PATCH] Access violation por causa de type cast automatico.

---
 packages/fcl-passrc/src/pasresolver.pp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/fcl-passrc/src/pasresolver.pp b/packages/fcl-passrc/src/pasresolver.pp
index f71be407f0..ed6032fb59 100644
--- a/packages/fcl-passrc/src/pasresolver.pp
+++ b/packages/fcl-passrc/src/pasresolver.pp
@@ -29677,7 +29677,7 @@ function TPasResolver.CheckClassIsClass(SrcType, DestType: TPasType): integer;
     SrcParam, DestParam: TPasType;
     SrcParamScope, DestParamScope: TPasGenericScope;
   begin
-    if SrcScope.SpecializedFromItem.GenericEl<>DestScope.SpecializedFromItem.GenericEl then
+    if not Assigned(SrcScope.SpecializedFromItem) or (SrcScope.SpecializedFromItem.GenericEl<>DestScope.SpecializedFromItem.GenericEl) then
       exit(false);
     // specialized from same generic -> check params
     SrcParams:=SrcScope.SpecializedFromItem.Params;
-- 
2.28.0.windows.1

Patch.patch (1,144 bytes)   
Error.zip (587 bytes)

Issue History

Date Modified Username Field Change
2020-09-29 21:48 henrique New Issue
2020-09-29 21:48 henrique File Added: Patch.patch
2020-09-29 21:48 henrique File Added: Error.zip
2020-09-30 09:30 Michael Van Canneyt Assigned To => Mattias Gaertner
2020-09-30 09:30 Michael Van Canneyt Status new => assigned
2020-10-06 11:52 Mattias Gaertner Status assigned => resolved
2020-10-06 11:52 Mattias Gaertner Resolution open => fixed