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
This is mostly the same as #4899 but the repro case is slightly more complex:
Input code
functiones5ClassCompat(target: Function): any{///@ts-expect-errorfunction_(){returnReflect.construct(target,arguments,this.constructor);}Object.defineProperty(_,'name',Object.getOwnPropertyDescriptor(target,'name')!);Object.setPrototypeOf(_,target);Object.setPrototypeOf(_.prototype,target.prototype);return_;}
@es5ClassCompatexportclassFileSystemErrorextendsError{staticFileExists(messageOrUri?: string|URI): FileSystemError{returnnewFileSystemError(messageOrUri,FileSystemProviderErrorCode.FileExists,FileSystemError.FileExists);}staticFileNotFound(messageOrUri?: string|URI): FileSystemError{returnnewFileSystemError(messageOrUri,FileSystemProviderErrorCode.FileNotFound,FileSystemError.FileNotFound);}staticFileNotADirectory(messageOrUri?: string|URI): FileSystemError{returnnewFileSystemError(messageOrUri,FileSystemProviderErrorCode.FileNotADirectory,FileSystemError.FileNotADirectory);}staticFileIsADirectory(messageOrUri?: string|URI): FileSystemError{returnnewFileSystemError(messageOrUri,FileSystemProviderErrorCode.FileIsADirectory,FileSystemError.FileIsADirectory);}staticNoPermissions(messageOrUri?: string|URI): FileSystemError{returnnewFileSystemError(messageOrUri,FileSystemProviderErrorCode.NoPermissions,FileSystemError.NoPermissions);}staticUnavailable(messageOrUri?: string|URI): FileSystemError{returnnewFileSystemError(messageOrUri,FileSystemProviderErrorCode.Unavailable,FileSystemError.Unavailable);}readonlycode: string;constructor(uriOrMessage?: string|URI,code: FileSystemProviderErrorCode=FileSystemProviderErrorCode.Unknown,terminator?: Function){super(URI.isUri(uriOrMessage) ? uriOrMessage.toString(true) : uriOrMessage);this.code=terminator?.name??'Unknown';// mark the error as file system provider error so that// we can extract the error code on the receiving sidemarkAsFileSystemProviderError(this,code);// workaround when extending builtin objects and when compiling to ES5, see:// https://github.com/microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-workif(typeof(<any>Object).setPrototypeOf==='function'){(<any>Object).setPrototypeOf(this,FileSystemError.prototype);}if(typeofError.captureStackTrace==='function'&&typeofterminator==='function'){// nice stack tracesError.captureStackTrace(this,terminator);}}}
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Describe the bug
This is mostly the same as #4899 but the repro case is slightly more complex:
Input code
Config
Playground link
https://play.swc.rs/?version=1.2.218&code=H4sIAAAAAAAAA82WS2%2FbMAzHz%2FGn4DCgsQE7PvWSrEu7PoAethRNey4Uh0m02JIhyk2DLt99lB%2BNnT527IAEhs0%2FyR9pSbS3KFRipVaAdHyeCqJzneXC%2BlaYJdohXNX2YAhCbeHZ68VxfGopwqccExuhMdp4vZcwD34Az2DQFkbBLS5SFg0SrciaImnChsCXIkNlKQS7krRXaBOMYOf1JrPfznOOC6nwxugcjd36DyH0lciwH0It4GiTjWoEF0iJkTlHeclU6YMvweglKKFlB6vtNsfJwgWtxB9IBnlz14j3T5xbXfDDyNt5p91WetwpbSwk7hFcyRSnW7KYXbrOAT5ZVHOC6u7Z83pkhZVJKbx8kmTJz5BILHFi7o0cD4EbJdUS%2FsD97TW%2FlsOI%2FIoaHIWbQ3MnWNiycrmPco6mVJ3rOQ72BOFhlJbNVb%2FrUP%2FS9koXav6Z3A3D2%2BSN9U32swtp0C3E7ScXsAd5t4q95HUp1%2FR%2FVNLmeLuQtqJbxy99gyaTRHy0fNo%2B6EC8rqBj7uLfK%2FEoZCpmKX4WfAvhNXrLWIG7g0zMtUq3kLB3gzliQ%2BuE9gsjJ%2BZnxXBQS1g7fsAEJ%2F8gXiu9UXzOurYqwQnHrTlUtoYKPu59TjeQxC3oAAUwhvb9wOppCegzPluHHWvgauvVM6hka6UduNkB4zH0a6h%2BqY5jyIRZ8%2BRCKOcfCIIFlwRU1gR5XVRtJc1SHgSl5wYhEcqd%2B0YkthWjTM8T1D3hzYDy0TWVOA47unxn9E7bfIdfNT5oADfarIVxhxxsVqjqOeMizgqZWqlAl5OOeKzXkoTHlUydxGq4nB6HQIjDKtzK2pyGcbyUdlXMuFVZnMnEaNILG9%2FxEJyWczfayLWMZ6mexZlgThP%2F4AW15pjR%2BUqoJdIgm399YYlKlkgqilK5xupjIhLGiG3EWFEmcv5vI6WjVLO3iVxZTCQX4LvRq%2Fn6jb9LvldjOziY23BycgL95tukX62d3kcedSsPN0pn1pf7pI1QaRKR837FqRXJ%2Bo7fLR5kh6MjqB32S%2BxtQm64khyAXCxwCwXJPX8nUQ29j1pT8m%2F3F2lAVgzhCQAA&config=H4sIAAAAAAAAA0WOTQ6DQAhG70JcNmpceoPewc1kxL84wwQw1RjvXqzR7sjj%2Bx7skIkfMDioYVBNdVFMQjG%2FoCgx5sR9IR%2FPHl6Aq5%2BXFi3dNPkkmaFJPNQ7JMeCfE6yRXWrRXRLKJ7HpBZTMdS5WfAFLXpiZ3KBWnnBw9aOe1QroVRlVVphJhJ8KmGMY7edek8hMYr8Vy728508zBWoXU6w%2Fz4wpwutCSO9oyJTeo7e0qv5BTnH4YgMAQAA
Expected behavior
All ctor invocation must go through the decorator first
Actual behavior
No response
Version
1.2.218
Additional context
No response
The text was updated successfully, but these errors were encountered: