Skip to content

Commit

Permalink
Revert isUnresolved change
Browse files Browse the repository at this point in the history
  • Loading branch information
daogrady committed Dec 13, 2023
1 parent 69392ae commit b958423
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions lib/visitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,11 @@ class Visitor {
*/
visitDefinitions() {
for (const [name, entity] of Object.entries(this.csn.xtended.definitions)) {
const toVisit = isView(entity) || isUnresolved
? this.csn.inferred.definitions[name]
: entity
this.visitEntity(name, toVisit)
if (isUnresolved(entity)) {
this.logger.warning(`Skipping unresolved entity: ${name}`)
} else {
this.visitEntity(name, entity._unresolved === true || isView(entity) ? this.csn.inferred.definitions[name] : entity)
}
}
// FIXME: optimise
// We are currently working with two flavours of CSN:
Expand Down
2 changes: 1 addition & 1 deletion test/unit/references.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const cds2ts = require('../../lib/compile')
const { ASTWrapper, check } = require('../ast')
const { locations } = require('../util')

const dir = locations.unit.files('output/references')
const dir = locations.testOutput('output/references')

// compilation produces semantically complete Typescript
describe('References', () => {
Expand Down

0 comments on commit b958423

Please sign in to comment.