mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 06:28:55 +02:00
pastojs: added resourcestring
This commit is contained in:
parent
3fbb5e3ecf
commit
3c6f111209
@ -540,6 +540,7 @@ resourcestring
|
||||
sInvalidVariableModifier = 'Invalid variable modifier "%s"';
|
||||
sPublishedNameMustMatchExternal = 'Published name must match external';
|
||||
sAWaitOnlyInAsyncProcedure = 'await only available in async procedure';
|
||||
sAsyncFunctionOrPromise = 'async function or promise';
|
||||
sNewInstanceFunctionMustBeVirtual = 'NewInstance function must be virtual';
|
||||
sNewInstanceFunctionMustHaveTwoParameters = 'NewInstance function must have two parameters';
|
||||
sNewInstanceFunctionMustNotHaveOverloadAtX = 'NewInstance function must not have overload at %s';
|
||||
@ -6157,7 +6158,8 @@ var
|
||||
{$ENDIF}
|
||||
|
||||
if RaiseOnError then
|
||||
RaiseMsg(20201229232446,nXExpectedButYFound,sXExpectedButYFound,['async function or a promise',GetResolverResultDescription(ParamResolved)],Expr);
|
||||
RaiseMsg(20201229232446, nXExpectedButYFound, sXExpectedButYFound, [
|
||||
sAsyncFunctionOrPromise, GetResolverResultDescription(ParamResolved)], Expr);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -40,7 +40,8 @@ type
|
||||
procedure TestGen_Class_OverloadsInUnit;
|
||||
procedure TestGen_ClassForward_CircleRTTI;
|
||||
procedure TestGen_Class_Nested_RTTI;
|
||||
Procedure TestGen_Class_ClassVarRecord_UnitImpl;
|
||||
procedure TestGen_Class_ClassVarRecord_UnitImpl;
|
||||
procedure TestGen_Class_Field_ArrayOfSpec;
|
||||
|
||||
// generic external class
|
||||
procedure TestGen_ExtClass_VarArgsOfType;
|
||||
@ -1289,6 +1290,47 @@ begin
|
||||
'']));
|
||||
end;
|
||||
|
||||
procedure TTestGenerics.TestGen_Class_Field_ArrayOfSpec;
|
||||
begin
|
||||
StartProgram(false);
|
||||
Add([
|
||||
'{$mode delphi}',
|
||||
'type',
|
||||
' TObject = class',
|
||||
' end;',
|
||||
' TWing<T> = class',
|
||||
' end;',
|
||||
' TBird = class',
|
||||
' Wings: array of TWing<string>;',
|
||||
' end;',
|
||||
'begin',
|
||||
'end.']);
|
||||
ConvertProgram;
|
||||
CheckSource('TestGen_Class_Field_ArrayOfSpec',
|
||||
LinesToStr([ // statements
|
||||
'rtl.createClass(this, "TObject", null, function () {',
|
||||
' this.$init = function () {',
|
||||
' };',
|
||||
' this.$final = function () {',
|
||||
' };',
|
||||
'});',
|
||||
'rtl.createClass(this, "TWing$G1", this.TObject, function () {',
|
||||
'}, "TWing<System.String>");',
|
||||
'rtl.createClass(this, "TBird", this.TObject, function () {',
|
||||
' this.$init = function () {',
|
||||
' $mod.TObject.$init.call(this);',
|
||||
' this.Wings = [];',
|
||||
' };',
|
||||
' this.$final = function () {',
|
||||
' this.Wings = undefined;',
|
||||
' $mod.TObject.$final.call(this);',
|
||||
' };',
|
||||
'});',
|
||||
'']),
|
||||
LinesToStr([ // $mod.$main
|
||||
'']));
|
||||
end;
|
||||
|
||||
procedure TTestGenerics.TestGen_ExtClass_VarArgsOfType;
|
||||
begin
|
||||
StartProgram(false);
|
||||
|
@ -35171,7 +35171,7 @@ begin
|
||||
'end;',
|
||||
'begin',
|
||||
' Fly(1);']);
|
||||
SetExpectedPasResolverError('async function expected, but Result:Word found',nXExpectedButYFound);
|
||||
SetExpectedPasResolverError('async function or promise expected, but Result:Word found',nXExpectedButYFound);
|
||||
ConvertProgram;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user