fix(tl): ctors with primitive vectors are incorrectly marked as static-size
This commit is contained in:
parent
7a6a30ea5c
commit
a3ebd3fc66
2 changed files with 15 additions and 0 deletions
|
@ -50,6 +50,14 @@ export function calculateStaticSizes(
|
|||
return null
|
||||
}
|
||||
|
||||
if (
|
||||
arg.typeModifiers?.isVector ||
|
||||
arg.typeModifiers?.isBareVector
|
||||
) {
|
||||
// cant be static sized
|
||||
return null
|
||||
}
|
||||
|
||||
let unionSize
|
||||
|
||||
if (arg.type in PRIMITIVES_SIZES) {
|
||||
|
|
|
@ -41,6 +41,13 @@ describe('calculateStaticSizes', () => {
|
|||
)
|
||||
})
|
||||
|
||||
it('correctly skips constructors with vector fields', () => {
|
||||
test(
|
||||
'help.promoData#8c39793f psa_type:Vector<int> = help.PromoData;',
|
||||
{},
|
||||
)
|
||||
})
|
||||
|
||||
it('correctly handles static-sized children', () => {
|
||||
test(
|
||||
'peerUser#9db1bc6d user_id:int53 = Peer;\n' +
|
||||
|
|
Loading…
Reference in a new issue