Browse Source

fcl-passrc: useanalyzer: mark property index and default value

git-svn-id: trunk@37318 -
Mattias Gaertner 7 years ago
parent
commit
894c22c05c

+ 2 - 2
packages/fcl-passrc/src/pasuseanalyzer.pas

@@ -1452,8 +1452,8 @@ begin
       UseExpr(Prop.IndexExpr);
       // ToDo: Prop.ImplementsFunc
       // ToDo: Prop.DispIDExpr
-      // ToDo: Prop.StoredAccessor;
-      // ToDo: Prop.DefaultExpr;
+      UseExpr(Prop.StoredAccessor);
+      UseExpr(Prop.DefaultExpr);
       end;
     end
   else

+ 9 - 1
packages/fcl-passrc/tests/tcresolver.pas

@@ -8131,11 +8131,14 @@ procedure TTestResolver.TestPropertyDefaultValue;
 begin
   StartProgram(false);
   Add([
+  'type',
+  '  TEnum = (red, blue);',
+  '  TSet = set of TEnum;',
   'const',
   '  CB = true or false;',
   '  CI = 1+2;',
+  '  CS = [red,blue];',
   'type',
-  '  TEnum = (red, blue);',
   '  TObject = class',
   '    FB: boolean;',
   '    property B1: boolean read FB default true;',
@@ -8147,6 +8150,11 @@ begin
   '    FE: TEnum;',
   '    property E1: TEnum read FE default red;',
   '    property E2: TEnum read FE default TEnum.blue;',
+  '    FSet: TSet;',
+  '    property Set1: TSet read FSet default [];',
+  '    property Set2: TSet read FSet default [red];',
+  '    property Set3: TSet read FSet default [red,blue];',
+  '    property Set4: TSet read FSet default CS;',
   '  end;',
   'begin']);
   ParseProgram;