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
x SimpleAssignFailed {
| span: Span {
| lo: BytePos(
| 3722,
| ),
| hi: BytePos(
| 3729,
| ),
| ctxt: #0,
| },
| cause: Some(
| context: tried to get an element type from an async iterator for normal yield (at crates/stc_ts_file_analyzer/src/analyzer/stmt/return_type.rs:516:26)
| context: tried to get element of iterator as a fallback logic for async iterator (at crates/stc_ts_file_analyzer/src/analyzer/expr/array.rs:505:14)
| context: tried to get a type of an iterator to get the element type of it () (at crates/stc_ts_file_analyzer/src/analyzer/expr/array.rs:785:14)
| context: tried to get iterator (at crates/stc_ts_file_analyzer/src/analyzer/expr/array.rs:595:64)
| context: tried to convert a type ({
| };) to an iterator (at crates/stc_ts_file_analyzer/src/analyzer/expr/array.rs:760:13)
| context: tried to call `[Symbol.iterator]()` (at crates/stc_ts_file_analyzer/src/analyzer/expr/array.rs:757:14)
| context: tried to call a property of an object ({
| };) (at crates/stc_ts_file_analyzer/src/analyzer/expr/call_new.rs:969:10)
| context: failed to call property of type elements (at crates/stc_ts_file_analyzer/src/analyzer/expr/call_new.rs:1290:10)
| MustHaveSymbolAsyncIteratorThatReturnsIterator {
| span: Span {
| lo: BytePos(
| 3722,
| ),
| hi: BytePos(
| 3729,
| ),
| ctxt: #0,
| },
| },
| ),
| }
,-[$DIR/tests/conformance/types/asyncGenerators/types.asyncGenerators.es2018.1.ts:118:1]
118 | async function * explicitReturnType16(): {} {
119 | yield 1;
: ^^^^^^^
120 | }
`----
But we should not report such errors if the return type is not iterable.
The text was updated successfully, but these errors were encountered:
We should allow code like
stc/crates/stc_ts_type_checker/tests/conformance/types/asyncGenerators/types.asyncGenerators.es2018.1.ts
Lines 118 to 120 in 87d832a
Currently, stc fails with
But we should not report such errors if the return type is not iterable.
The text was updated successfully, but these errors were encountered: