You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Cannot read property 'flags' of undefined #2127
if (source.flags & 128 /* Enum */ && target === numberType
^
TypeError: Cannot read property 'flags' of undefined
at isRelatedTo (tsc.js:13077:31)
at checkTypeRelatedTo (tsc.js:13048:26)
at checkTypeSubtypeOf (tsc.js:13029:20)
at reportNoCommonSupertypeError (tsc.js:13618:13)
at resolveCall (tsc.js:14945:21)
at resolveCallExpression (tsc.js:15075:20)
at getResolvedSignature (tsc.js:15125:47)
at checkCallExpression (tsc.js:15140:29)
at checkExpressionWorker (tsc.js:15648:28)
at checkExpressionOrQualifiedName (tsc.js:15605:42)
tsc version 1.4.1.0
You can also put this code into the typescript Playground, which does not complie it as well.
Jason Freeman (@JsonFreeman) Jason, the crash is caused by reportNoCommonSupertypeError computing the value undefined for bestSupertypeDownfallType and then passing that to checkTypeSubtypeOf.
Activity
ahejlsberg commentedon Feb 24, 2015
Jason Freeman (@JsonFreeman) Jason, the crash is caused by
reportNoCommonSupertypeErrorcomputing the valueundefinedforbestSupertypeDownfallTypeand then passing that tocheckTypeSubtypeOf.ahejlsberg commentedon Feb 24, 2015
It's not entirely clear to me what that logic is doing. I think you wrote it, so I'm assigning the bug to you.
JsonFreeman commentedon Feb 24, 2015
Yeah I wrote that, so I can take a look. Thanks.