-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Crash with Cannot read property 'flags' of undefined
(union related?)
#29884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The current commit of |
Here is minimal setup that reproduces the issue: bug.ts
commands:
output:
PS: Sorry for an ugly code, had no time for digging deeper. Hope my sample will help. |
We get a very similar but different call stack. I've checked the various versions from 3.1.6 to 3.4.0-dev.20190227 and it has been consistently broken for us since 3.2. The call stack when using 3.3.3333 is
|
This seems to be fixed with typescript@next |
Unfortunately trying typescript@next (3.4.0-dev.20190313) didn't fix our compilation problems. I'll raise a new issue when I have time to provide some useful context. |
I haven't managed to reduce our issue to a minimum reproduction. But I have created a letter-box fix (#30596) which works for us. What can I do to assist turning this into a complete PR/fix? |
TypeScript Version: 3.3.3 / 3.4.0-dev.20190209
Search Terms:
crash union intersection cannot read property flags undefined
Code
Unfortunately this came up during a big refactor so I don't have a small repro case, but the
next
branch of trilogy reproduces it here:git clone --single-branch --branch next https://github.com/citycide/trilogy.git
cd trilogy
npm install
./node_modules/.bin/tsc
I reproduced on both Windows 10 & Ubuntu, plus my Travis CI suite. Interestingly VS Code's TS server doesn't show any errors at all and keeps type checking like normal.
Based on the call stack we can probably assume it's due to a union or intersection type somewhere but I don't know how to trace it back effectively.
Expected behavior:
Compile without crashing.
Actual behavior:
Playground Link:
Related Issues:
This error message is pretty common so there are a lot of issues referencing it, however they vary pretty wildly in the call stack: #28935, #27345, #25387, #25264, #15456, #19142, #2127
The text was updated successfully, but these errors were encountered: