|
@@ -4952,7 +4952,7 @@ begin
|
|
Add('var i: longint;');
|
|
Add('var i: longint;');
|
|
Add('begin');
|
|
Add('begin');
|
|
Add(' if Assigned(i) then ;');
|
|
Add(' if Assigned(i) then ;');
|
|
- CheckResolverException('Incompatible type arg no. 1: Got "Longint", expected "class or array"',
|
|
|
|
|
|
+ CheckResolverException('Incompatible type for arg no. 1: Got "Longint", expected "class or array"',
|
|
nIncompatibleTypeArgNo);
|
|
nIncompatibleTypeArgNo);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -5029,7 +5029,7 @@ begin
|
|
Add(' aString: string;');
|
|
Add(' aString: string;');
|
|
Add('begin');
|
|
Add('begin');
|
|
Add(' Str(aString,aString);');
|
|
Add(' Str(aString,aString);');
|
|
- CheckResolverException('Incompatible type arg no. 1: Got "String", expected "boolean, integer, enum value"',
|
|
|
|
|
|
+ CheckResolverException('Incompatible type for arg no. 1: Got "String", expected "boolean, integer, enum value"',
|
|
nIncompatibleTypeArgNo);
|
|
nIncompatibleTypeArgNo);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -5041,7 +5041,7 @@ begin
|
|
Add(' aString: string;');
|
|
Add(' aString: string;');
|
|
Add('begin');
|
|
Add('begin');
|
|
Add(' Str(c,aString);');
|
|
Add(' Str(c,aString);');
|
|
- CheckResolverException('Incompatible type arg no. 1: Got "Char", expected "boolean, integer, enum value"',
|
|
|
|
|
|
+ CheckResolverException('Incompatible type for arg no. 1: Got "Char", expected "boolean, integer, enum value"',
|
|
nIncompatibleTypeArgNo);
|
|
nIncompatibleTypeArgNo);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -5066,7 +5066,7 @@ begin
|
|
Add(' i: string;');
|
|
Add(' i: string;');
|
|
Add('begin');
|
|
Add('begin');
|
|
Add(' inc(i);');
|
|
Add(' inc(i);');
|
|
- CheckResolverException('Incompatible type arg no. 1: Got "String", expected "integer"',nIncompatibleTypeArgNo);
|
|
|
|
|
|
+ CheckResolverException('Incompatible type for arg no. 1: Got "String", expected "integer"',nIncompatibleTypeArgNo);
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TTestResolver.TestTypeInfo;
|
|
procedure TTestResolver.TestTypeInfo;
|
|
@@ -6416,7 +6416,7 @@ begin
|
|
'begin',
|
|
'begin',
|
|
' DoColor(i);',
|
|
' DoColor(i);',
|
|
'']);
|
|
'']);
|
|
- CheckResolverException('Incompatible type arg no. 1: Got "Longint", expected "TColor". Var param must match exactly.',
|
|
|
|
|
|
+ CheckResolverException('Incompatible type for arg no. 1: Got "Longint", expected "TColor". Var param must match exactly.',
|
|
nIncompatibleTypeArgNoVarParamMustMatchExactly);
|
|
nIncompatibleTypeArgNoVarParamMustMatchExactly);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -7573,7 +7573,7 @@ begin
|
|
'begin',
|
|
'begin',
|
|
' ProcA(1,false);',
|
|
' ProcA(1,false);',
|
|
'']);
|
|
'']);
|
|
- CheckResolverException('Incompatible type arg no. 2: Got "Boolean", expected "Word"',nIncompatibleTypeArgNo);
|
|
|
|
|
|
+ CheckResolverException('Incompatible type for arg no. 2: Got "Boolean", expected "Word"',nIncompatibleTypeArgNo);
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TTestResolver.TestProc_ParameterExprAccess;
|
|
procedure TTestResolver.TestProc_ParameterExprAccess;
|
|
@@ -10076,7 +10076,7 @@ begin
|
|
'begin',
|
|
'begin',
|
|
' o:=TBird.Create(nil);',
|
|
' o:=TBird.Create(nil);',
|
|
'']);
|
|
'']);
|
|
- CheckResolverException('Incompatible type arg no. 1: Got "Nil", expected "Longint"',
|
|
|
|
|
|
+ CheckResolverException('Incompatible type for arg no. 1: Got "Nil", expected "Longint"',
|
|
nIncompatibleTypeArgNo);
|
|
nIncompatibleTypeArgNo);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -12756,7 +12756,7 @@ begin
|
|
Add(' property B: longint write SetB;');
|
|
Add(' property B: longint write SetB;');
|
|
Add(' end;');
|
|
Add(' end;');
|
|
Add('begin');
|
|
Add('begin');
|
|
- CheckResolverException('Incompatible type arg no. 1: Got "var", expected "const"',
|
|
|
|
|
|
+ CheckResolverException('Incompatible type for arg no. 1: Got "var", expected "const"',
|
|
nIncompatibleTypeArgNo);
|
|
nIncompatibleTypeArgNo);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -12769,7 +12769,7 @@ begin
|
|
Add(' property B: longint write SetB;');
|
|
Add(' property B: longint write SetB;');
|
|
Add(' end;');
|
|
Add(' end;');
|
|
Add('begin');
|
|
Add('begin');
|
|
- CheckResolverException('Incompatible type arg no. 1: Got "String", expected "Longint"',
|
|
|
|
|
|
+ CheckResolverException('Incompatible type for arg no. 1: Got "String", expected "Longint"',
|
|
nIncompatibleTypeArgNo);
|
|
nIncompatibleTypeArgNo);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -12966,7 +12966,7 @@ begin
|
|
' property B: boolean index 1 read GetB;',
|
|
' property B: boolean index 1 read GetB;',
|
|
' end;',
|
|
' end;',
|
|
'begin']);
|
|
'begin']);
|
|
- CheckResolverException('Incompatible type arg no. 1: Got "Longint", expected "String"',
|
|
|
|
|
|
+ CheckResolverException('Incompatible type for arg no. 1: Got "Longint", expected "String"',
|
|
nIncompatibleTypeArgNo);
|
|
nIncompatibleTypeArgNo);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -13339,7 +13339,7 @@ begin
|
|
Add('var Obj: tobject;');
|
|
Add('var Obj: tobject;');
|
|
Add('begin');
|
|
Add('begin');
|
|
Add(' obj.Items[3]:=''4'';');
|
|
Add(' obj.Items[3]:=''4'';');
|
|
- CheckResolverException('Incompatible type arg no. 1: Got "Longint", expected "String"',
|
|
|
|
|
|
+ CheckResolverException('Incompatible type for arg no. 1: Got "Longint", expected "String"',
|
|
nIncompatibleTypeArgNo);
|
|
nIncompatibleTypeArgNo);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -14733,7 +14733,7 @@ begin
|
|
Add(' a: array[TEnum] of longint;');
|
|
Add(' a: array[TEnum] of longint;');
|
|
Add('begin');
|
|
Add('begin');
|
|
Add(' SetLength(a,1);');
|
|
Add(' SetLength(a,1);');
|
|
- CheckResolverException('Incompatible type arg no. 1: Got "static array[] of Longint", expected "string or dynamic array variable"',
|
|
|
|
|
|
+ CheckResolverException('Incompatible type for arg no. 1: Got "static array[] of Longint", expected "string or dynamic array variable"',
|
|
nIncompatibleTypeArgNo);
|
|
nIncompatibleTypeArgNo);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -15047,7 +15047,7 @@ begin
|
|
' SetLength(a,3);',
|
|
' SetLength(a,3);',
|
|
'end;',
|
|
'end;',
|
|
'begin']);
|
|
'begin']);
|
|
- CheckResolverException('Incompatible type arg no. 1: Got "open array of Byte", expected "string or dynamic array variable"',
|
|
|
|
|
|
+ CheckResolverException('Incompatible type for arg no. 1: Got "open array of Byte", expected "string or dynamic array variable"',
|
|
nIncompatibleTypeArgNo);
|
|
nIncompatibleTypeArgNo);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -15462,7 +15462,7 @@ begin
|
|
'var a: TArr;',
|
|
'var a: TArr;',
|
|
'begin',
|
|
'begin',
|
|
' DoIt(a)']);
|
|
' DoIt(a)']);
|
|
- CheckResolverException('Incompatible type arg no. 1: Got "TArr", expected "array of const"',
|
|
|
|
|
|
+ CheckResolverException('Incompatible type for arg no. 1: Got "TArr", expected "array of const"',
|
|
nIncompatibleTypeArgNo);
|
|
nIncompatibleTypeArgNo);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -15491,7 +15491,7 @@ begin
|
|
' SetLength(args,2);',
|
|
' SetLength(args,2);',
|
|
'end;',
|
|
'end;',
|
|
'begin']);
|
|
'begin']);
|
|
- CheckResolverException('Incompatible type arg no. 1: Got "array of const", expected "string or dynamic array variable"',
|
|
|
|
|
|
+ CheckResolverException('Incompatible type for arg no. 1: Got "array of const", expected "string or dynamic array variable"',
|
|
nIncompatibleTypeArgNo);
|
|
nIncompatibleTypeArgNo);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -15952,7 +15952,7 @@ begin
|
|
Add('var p: TProcInt;');
|
|
Add('var p: TProcInt;');
|
|
Add('begin');
|
|
Add('begin');
|
|
Add(' p:=@ProcA;');
|
|
Add(' p:=@ProcA;');
|
|
- CheckResolverException('Incompatible type arg no. 1: Got "Longint", expected "String"',
|
|
|
|
|
|
+ CheckResolverException('Incompatible type for arg no. 1: Got "Longint", expected "String"',
|
|
nIncompatibleTypeArgNo);
|
|
nIncompatibleTypeArgNo);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -15966,7 +15966,7 @@ begin
|
|
Add('var p: TProcInt;');
|
|
Add('var p: TProcInt;');
|
|
Add('begin');
|
|
Add('begin');
|
|
Add(' p:=@ProcA;');
|
|
Add(' p:=@ProcA;');
|
|
- CheckResolverException('Incompatible type arg no. 1: Got "access modifier const", expected "default"',
|
|
|
|
|
|
+ CheckResolverException('Incompatible type for arg no. 1: Got "access modifier const", expected "default"',
|
|
nIncompatibleTypeArgNo);
|
|
nIncompatibleTypeArgNo);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -16421,7 +16421,7 @@ begin
|
|
Add('var Btn: TControl;');
|
|
Add('var Btn: TControl;');
|
|
Add('begin');
|
|
Add('begin');
|
|
Add(' Btn.OnClick(3);');
|
|
Add(' Btn.OnClick(3);');
|
|
- CheckResolverException('Incompatible type arg no. 1: Got "Longint", expected "TObject"',
|
|
|
|
|
|
+ CheckResolverException('Incompatible type for arg no. 1: Got "Longint", expected "TObject"',
|
|
nIncompatibleTypeArgNo);
|
|
nIncompatibleTypeArgNo);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -17891,7 +17891,7 @@ begin
|
|
'begin',
|
|
'begin',
|
|
' o:=TObject.Create(nil);',
|
|
' o:=TObject.Create(nil);',
|
|
'']);
|
|
'']);
|
|
- CheckResolverException('Incompatible type arg no. 1: Got "Nil", expected "Longint"',
|
|
|
|
|
|
+ CheckResolverException('Incompatible type for arg no. 1: Got "Nil", expected "Longint"',
|
|
nIncompatibleTypeArgNo);
|
|
nIncompatibleTypeArgNo);
|
|
end;
|
|
end;
|
|
|
|
|