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
Note that this is a separate bug from #14723 and is not fixed by #14874 as noted by @ahejlsberg
Code
typeAttributes<Keysextendsstring>={[KeyinKeys]: string;// I'm actually using Attribute<Key> in my code, but `string` is all that is needed to cause the RangeError}classQuery<AextendsAttributes<keyofA>>{multiply<BextendsAttributes<keyofB>>(x: B): Query<A&B>;}
Expected behavior:
Should compile
Actual behavior:
Fails to compile with stack trace:
/usr/local/lib/node_modules/typescript/lib/tsc.js:51296
throw e;
^
RangeError: Maximum call stack size exceeded
at isRelatedTo (/usr/local/lib/node_modules/typescript/lib/tsc.js:26081:33)
at isRelatedTo (/usr/local/lib/node_modules/typescript/lib/tsc.js:26166:38)
at isRelatedTo (/usr/local/lib/node_modules/typescript/lib/tsc.js:26139:42)
at typeRelatedToEachType (/usr/local/lib/node_modules/typescript/lib/tsc.js:26351:35)
at isRelatedTo (/usr/local/lib/node_modules/typescript/lib/tsc.js:26125:34)
at isRelatedTo (/usr/local/lib/node_modules/typescript/lib/tsc.js:26189:42)
at isRelatedTo (/usr/local/lib/node_modules/typescript/lib/tsc.js:26147:38)
at isRelatedTo (/usr/local/lib/node_modules/typescript/lib/tsc.js:26153:38)
at isRelatedTo (/usr/local/lib/node_modules/typescript/lib/tsc.js:26153:38)
at isRelatedTo (/usr/local/lib/node_modules/typescript/lib/tsc.js:26153:38)
The text was updated successfully, but these errors were encountered:
@akaRem The code I added to this issue is not really that useful, it is just the minimal code I could find that causes the bug.
My actual Attributes class has a set of Attribute<Key> objects, as opposed to the string values in the example. I use it to model the response of an API.
TypeScript Version: 2.2.1
Note that this is a separate bug from #14723 and is not fixed by #14874 as noted by @ahejlsberg
Code
Expected behavior:
Should compile
Actual behavior:
Fails to compile with stack trace:
The text was updated successfully, but these errors were encountered: