View Issue Details

IDProjectCategoryView StatusLast Update
0037735pas2jsrtlpublic2020-09-12 09:57
Reporterhenrique Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformPas2JsOSWindows 
Fixed in Versiontrunk 
Summary0037735: IsInstance Implementation
DescriptionI just implemented the IsInstance function of the RTTI class.
TagsNo tags attached.
Fixed in Revision871
Attached Files

Activities

henrique

2020-09-11 21:11

reporter  

IsInstance.patch (1,016 bytes)   
From 2acdea6f8048fadda09e4c02e688fb3e92cffdc2 Mon Sep 17 00:00:00 2001
From: Henrique Gottardi Werlang <henriquewerlang@hotmail.com>
Date: Fri, 11 Sep 2020 16:06:08 -0300
Subject: [PATCH] Implementado o IsInstance.

---
 packages/rtl/rtti.pas | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/packages/rtl/rtti.pas b/packages/rtl/rtti.pas
index 1a60bc0..8cda217 100644
--- a/packages/rtl/rtti.pas
+++ b/packages/rtl/rtti.pas
@@ -259,6 +259,7 @@ type
     function GetAncestor: TRttiStructuredType; override;
   public
     constructor Create(ATypeInfo: PTypeInfo);
+    function GetIsInstance: boolean; override;
     property ClassTypeInfo: TTypeInfoClass read GetClassTypeInfo;
     property MetaClassType: TClass read GetMetaClassType;
   end;
@@ -799,6 +800,11 @@ begin
   inherited Create(ATypeInfo);
 end;
 
+function TRttiInstanceType.GetIsInstance: boolean;
+begin
+  Result:=True;
+end;
+
 { TRttiInterfaceType }
 
 constructor TRttiInterfaceType.Create(ATypeInfo: PTypeInfo);
-- 
2.28.0.windows.1

IsInstance.patch (1,016 bytes)   

Michael Van Canneyt

2020-09-12 09:57

administrator   ~0125500

Checked and applied, thank you very much !

Issue History

Date Modified Username Field Change
2020-09-11 21:11 henrique New Issue
2020-09-11 21:11 henrique File Added: IsInstance.patch
2020-09-12 09:57 Michael Van Canneyt Assigned To => Michael Van Canneyt
2020-09-12 09:57 Michael Van Canneyt Status new => resolved
2020-09-12 09:57 Michael Van Canneyt Resolution open => fixed
2020-09-12 09:57 Michael Van Canneyt Fixed in Version => trunk
2020-09-12 09:57 Michael Van Canneyt Fixed in Revision => 871
2020-09-12 09:57 Michael Van Canneyt Note Added: 0125500