mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 04:19:28 +02:00
pastojs: do not add rtti for public constructor for class without rtti, related #37752
This commit is contained in:
parent
bb817db47a
commit
985dec61b1
@ -21240,7 +21240,15 @@ begin
|
||||
// check visibility
|
||||
case mt of
|
||||
mtClass:
|
||||
if (P.Visibility<>visPublished) and (not P.InheritsFrom(TPasConstructor) or (P.Visibility <> visPublic)) then continue;
|
||||
if (P.Visibility=visPublished) then
|
||||
// published member
|
||||
else if (P is TPasConstructor) and (P.Visibility = visPublic)
|
||||
and (pcsfPublished in TPas2JSClassScope(El.CustomData).Flags) then
|
||||
// this class supports published members -> add public constructor to RTTI
|
||||
// workaround til extended RTTI
|
||||
// see issue #37752
|
||||
else
|
||||
continue;
|
||||
mtInterface: ; // all members of an interface are published
|
||||
mtRecord:
|
||||
// a published record publishes all non private members
|
||||
|
Loading…
Reference in New Issue
Block a user