mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 01:29:19 +02:00
* handle constsyms without an associated type by generating a default type
git-svn-id: branches/jvmbackend@18485 -
This commit is contained in:
parent
41624e8102
commit
ee9cfc8916
@ -380,7 +380,30 @@ implementation
|
|||||||
constsym:
|
constsym:
|
||||||
begin
|
begin
|
||||||
csym:=tconstsym(sym);
|
csym:=tconstsym(sym);
|
||||||
result:=jvmencodetype(csym.constdef);
|
{ some constants can be untyped }
|
||||||
|
if assigned (csym.constdef) then
|
||||||
|
result:=jvmencodetype(csym.constdef)
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
case csym.consttyp of
|
||||||
|
constord:
|
||||||
|
result:=jvmencodetype(s32inttype);
|
||||||
|
constreal:
|
||||||
|
result:=jvmencodetype(s64floattype);
|
||||||
|
constset:
|
||||||
|
internalerror(2011040701);
|
||||||
|
constpointer,
|
||||||
|
constnil:
|
||||||
|
result:=jvmencodetype(java_jlobject);
|
||||||
|
constwstring,
|
||||||
|
conststring:
|
||||||
|
result:=jvmencodetype(java_jlstring);
|
||||||
|
constguid:
|
||||||
|
internalerror(2011040702);
|
||||||
|
else
|
||||||
|
internalerror(2011040703);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
result:=usesymname+' '+result;
|
result:=usesymname+' '+result;
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user