Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Tsc crash ("Debug Failure. False expression:") #10522

Copy link
Copy link
@kpreisser

Description

@kpreisser
Issue body actions

Hi,
I think the following code should not cause tsc to crash:

TypeScript Version: Version 2.1.0-dev.20160824

Code (test1.ts)

export let a;
export = {};

Expected behavior:

test1.ts(2,1): error TS2309: An export assignment cannot be used in a module with other exported elements.

Actual behavior:

C:\Users\VPC\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:37652
                throw e;
                ^

Error: Debug Failure. False expression:
    at Object.assert (C:\Users\VPC\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:1289:23)
    at Object.fail (C:\Users\VPC\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:1294:19)
    at Object.findMap (C:\Users\VPC\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:211:15)
    at getDeclarationOfAliasSymbol (C:\Users\VPC\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:13935:23)
    at checkExternalModuleExports (C:\Users\VPC\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:26465:39)
    at checkExportAssignment (C:\Users\VPC\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:26441:13)
    at checkSourceElement (C:\Users\VPC\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:26609:28)
    at Object.forEach (C:\Users\VPC\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:185:30)
    at checkSourceFileWorker (C:\Users\VPC\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:26661:20)
    at checkSourceFile (C:\Users\VPC\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:26647:13)

Note: The error seems to have been introduced with commit e900952 (with c9f62f3 I'm getting the expected error message).

Thanks!

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.