mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-05 04:07:13 +01:00
pastojs: nicer -Jm error message, check for (a,b)[]
git-svn-id: trunk@41145 -
This commit is contained in:
parent
569bd80cec
commit
dd2fc17d51
@ -7195,7 +7195,7 @@ begin
|
||||
begin
|
||||
// e.g. mod.ExtClass.new;
|
||||
if El.Parent is TParamsExpr then
|
||||
// Note: ExtClass.new() must be handled in ConvertFuncParams
|
||||
// Note: ExtClass.new() is handled in ConvertFuncParams
|
||||
RaiseNotSupported(El,AContext,20190116135818);
|
||||
Result:=ConvertExternalConstructor(El.left,RightRef,nil,AContext);
|
||||
exit;
|
||||
@ -7273,8 +7273,15 @@ begin
|
||||
DotContext.LeftResolved:=LeftResolved;
|
||||
if Assigned(OnConvertRight) then
|
||||
Right:=OnConvertRight(El.right,DotContext,Data)
|
||||
else if El.right.ClassType=TPrimitiveExpr then
|
||||
Right:=ConvertPrimitiveExpression(TPrimitiveExpr(El.right),DotContext)
|
||||
else
|
||||
Right:=ConvertExpression(El.right,DotContext);
|
||||
begin
|
||||
{$IFDEF VerbosePas2JS}
|
||||
writeln('TPasToJSConverter.ConvertSubIdentExprCustom Bin=',El.OpCode,' El.Right=',GetObjName(El.right));
|
||||
{$ENDIF}
|
||||
RaiseNotSupported(El,AContext,20190130101045);
|
||||
end;
|
||||
if DotContext.JS<>nil then
|
||||
begin
|
||||
Left:=nil;
|
||||
@ -7758,7 +7765,7 @@ begin
|
||||
and (AContext is TDotContext)
|
||||
and (AContext.JSElement<>nil) then
|
||||
begin
|
||||
// e.g. Obj.A and A is defined as: A: t external name '["name"]';
|
||||
// e.g. Obj.A with A having an external name '["name"]';
|
||||
// -> Obj["name"]
|
||||
if IsImplicitCall then
|
||||
RaiseNotSupported(El,AContext,20180509134951,Name);
|
||||
|
||||
@ -3111,7 +3111,7 @@ begin
|
||||
begin
|
||||
i:=Pos('=',aValue);
|
||||
if i<1 then
|
||||
result:=false
|
||||
ParamFatal('unknown -Jm parameter "'+aValue+'"')
|
||||
else
|
||||
begin
|
||||
S:=LeftStr(aValue,i-1);
|
||||
@ -3120,7 +3120,7 @@ begin
|
||||
'sourceroot': SrcMapSourceRoot:=aValue;
|
||||
'basedir': SrcMapBaseDir:=aValue;
|
||||
else
|
||||
Result:=False;
|
||||
ParamFatal('unknown -Jm parameter "'+s+'"')
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -626,7 +626,7 @@ type
|
||||
Procedure TestClassInterface_GUIDProperty;
|
||||
|
||||
// helpers
|
||||
Procedure TestClassHelper_ClassVar; // todo
|
||||
Procedure TestClassHelper_ClassVar; // ToDo
|
||||
// todo: TestClassHelper_Overload
|
||||
|
||||
// proc types
|
||||
|
||||
Loading…
Reference in New Issue
Block a user