Skip to content

Commit

Permalink
Merge branch 'main' into rmuller/fix-jsii-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Dec 14, 2020
2 parents a99ae04 + 3120bf4 commit f5458da
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 128 deletions.
2 changes: 1 addition & 1 deletion gh-pages/content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ any other native type:

```python
greeter = Greeter()
greeter.greet("World"); # => Hello, World!
greeter.greet("World") # => Hello, World!
```

## How to use this website
Expand Down
6 changes: 6 additions & 0 deletions packages/jsii/lib/assembler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,12 @@ export class Assembler implements Emitter {
for (const clause of clauses) {
for (const node of clause.types) {
const parentType = this._typeChecker.getTypeAtLocation(node);
if (parentType.symbol == null) {
// The parent type won't have a symbol if it's an "error type" inserted by the type checker when the original
// code contains a compilation error. In such cases, the TypeScript compiler will already have reported about
// the incoherent declarations, so we'll just not re-validate it there (we'd fail anyway).
continue;
}
// For some reason, we cannot trust parentType.isClassOrInterface()
const badDecl = parentType.symbol.declarations.find(
(decl) =>
Expand Down
Loading

0 comments on commit f5458da

Please sign in to comment.