Browse Source

fcl-passrc: fixed resourcestring

mattias 3 years ago
parent
commit
151c7ba163

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

@@ -228,8 +228,8 @@ resourcestring
   sIllegalQualifier = 'illegal qualifier "%s"';
   sIllegalQualifier = 'illegal qualifier "%s"';
   sSyntaxErrorExpectedButFound = 'Syntax error, "%s" expected but "%s" found';
   sSyntaxErrorExpectedButFound = 'Syntax error, "%s" expected but "%s" found';
   sWrongNumberOfParametersForCallTo = 'Wrong number of parameters specified for call to "%s"';
   sWrongNumberOfParametersForCallTo = 'Wrong number of parameters specified for call to "%s"';
-  sIncompatibleTypeArgNo = 'Incompatible type arg no. %s: Got "%s", expected "%s"';
-  sIncompatibleTypeArgNoVarParamMustMatchExactly = 'Incompatible type arg no. %s: Got "%s", expected "%s". Var param must match exactly.';
+  sIncompatibleTypeArgNo = 'Incompatible type for arg no. %s: Got "%s", expected "%s"';
+  sIncompatibleTypeArgNoVarParamMustMatchExactly = 'Incompatible type for arg no. %s: Got "%s", expected "%s". Var param must match exactly.';
   sVariableIdentifierExpected = 'Variable identifier expected';
   sVariableIdentifierExpected = 'Variable identifier expected';
   sDuplicateIdentifier = 'Duplicate identifier "%s" at %s';
   sDuplicateIdentifier = 'Duplicate identifier "%s" at %s';
   sXExpectedButYFound = '%s expected, but %s found';
   sXExpectedButYFound = '%s expected, but %s found';

+ 19 - 19
packages/fcl-passrc/tests/tcresolver.pas

@@ -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;
 
 

+ 6 - 6
packages/pastojs/tests/tcmodules.pas

@@ -19272,7 +19272,7 @@ begin
   Add('class function TMyB.NewInstance(fnname: longint; const paramarray): TMyB;');
   Add('class function TMyB.NewInstance(fnname: longint; const paramarray): TMyB;');
   Add('begin end;');
   Add('begin end;');
   Add('begin');
   Add('begin');
-  SetExpectedPasResolverError('Incompatible type arg no. 1: Got "Longint", expected "String"',
+  SetExpectedPasResolverError('Incompatible type for arg no. 1: Got "Longint", expected "String"',
     nIncompatibleTypeArgNo);
     nIncompatibleTypeArgNo);
   ConvertProgram;
   ConvertProgram;
 end;
 end;
@@ -19291,7 +19291,7 @@ begin
   Add('class function TMyB.NewInstance(fnname: string; const paramarray: string): TMyB;');
   Add('class function TMyB.NewInstance(fnname: string; const paramarray: string): TMyB;');
   Add('begin end;');
   Add('begin end;');
   Add('begin');
   Add('begin');
-  SetExpectedPasResolverError('Incompatible type arg no. 2: Got "type", expected "untyped"',
+  SetExpectedPasResolverError('Incompatible type for arg no. 2: Got "type", expected "untyped"',
     nIncompatibleTypeArgNo);
     nIncompatibleTypeArgNo);
   ConvertProgram;
   ConvertProgram;
 end;
 end;
@@ -20149,7 +20149,7 @@ begin
   '  DoIt(s);',
   '  DoIt(s);',
   'end;',
   'end;',
   '']);
   '']);
-  SetExpectedPasResolverError('Incompatible type arg no. 1: Got "unit3.TJSBufferSource", expected "unit2.TJSBufferSource"',
+  SetExpectedPasResolverError('Incompatible type for arg no. 1: Got "unit3.TJSBufferSource", expected "unit2.TJSBufferSource"',
     nIncompatibleTypeArgNo);
     nIncompatibleTypeArgNo);
   ConvertUnit;
   ConvertUnit;
 end;
 end;
@@ -28826,7 +28826,7 @@ begin
   'begin',
   'begin',
   '  inc(p,1);',
   '  inc(p,1);',
   '']);
   '']);
-  SetExpectedPasResolverError('Incompatible type arg no. 1: Got "Pointer", expected "integer"',
+  SetExpectedPasResolverError('Incompatible type for arg no. 1: Got "Pointer", expected "integer"',
     nIncompatibleTypeArgNo);
     nIncompatibleTypeArgNo);
   ConvertProgram;
   ConvertProgram;
 end;
 end;
@@ -34162,7 +34162,7 @@ begin
   'end;',
   'end;',
   'begin',
   'begin',
   '']);
   '']);
-  SetExpectedPasResolverError('Incompatible type arg no. 2: Got "Longint", expected "TJSPromise"',nIncompatibleTypeArgNo);
+  SetExpectedPasResolverError('Incompatible type for arg no. 2: Got "Longint", expected "TJSPromise"',nIncompatibleTypeArgNo);
   ConvertProgram;
   ConvertProgram;
 end;
 end;
 
 
@@ -34184,7 +34184,7 @@ begin
   'end;',
   'end;',
   'begin',
   'begin',
   '']);
   '']);
-  SetExpectedPasResolverError('Incompatible type arg no. 2: Got "TObject", expected "TBird"',nIncompatibleTypeArgNo);
+  SetExpectedPasResolverError('Incompatible type for arg no. 2: Got "TObject", expected "TBird"',nIncompatibleTypeArgNo);
   ConvertProgram;
   ConvertProgram;
 end;
 end;