Skip to content

Commit

Permalink
fix: add function declarations into previousProgramIdentifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
shenyih0ng committed Sep 3, 2023
1 parent cddd94c commit bf698f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/transpiler/transpiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { ModuleDocumentation } from '../modules/moduleTypes'
import { AllowedDeclarations, Chapter, Context, NativeStorage, Variant } from '../types'
import * as create from '../utils/astCreator'
import {
getFunctionDeclarationNamesInProgram,
getIdentifiersInNativeStorage,
getIdentifiersInProgram,
getUniqueId
Expand Down Expand Up @@ -678,6 +679,9 @@ function transpileToFullJS(
globalIds.native
)

getFunctionDeclarationNamesInProgram(program).forEach(id =>
context.nativeStorage.previousProgramsIdentifiers.add(id)
)
getGloballyDeclaredIdentifiers(program).forEach(id =>
context.nativeStorage.previousProgramsIdentifiers.add(id)
)
Expand Down

0 comments on commit bf698f1

Please sign in to comment.