Tags: sorbet/sorbet
Tags
Reapply "Use T.noreturn for "does not take a block" (#9789)" (#9802) * Reapply "Use T.noreturn for "does not take a block" (#9789)" (#9800) This reverts commit 8985e1c. * Add test showing behavior * Also check whether it's a subtype of bottom The `== nilClass` check is redundant with the later `isSubType` of check, but the `nilClass` check is an integer equality comparison because ClassType's are inlined types, so we may as well short circuit after that cheat check.
Use `T.noreturn` for "does not take a block" (#9789) * Show test before * Don't require a block for `blk: T.noreturn` * Add failing test * Use T.noreturn instead of isSyntheticBlockParameter This suggests an even cooler implementation where we can expand support for this to non-`# typed: strict` files, but that'll be a more invasive change so I'm punting it. * Leave the rest for TODOs * Update testdata exp * Load the arg as `NilClass`
Add error line for current package's definition to modularity errors (#… …9786) * add error line for package definition * update exp files * Apply suggestions from code review Co-authored-by: Jake Zimmerman <[email protected]> * update exp files --------- Co-authored-by: Jake Zimmerman <[email protected]>
Replace class_flatten with CFGBuilder (#9777) * no-op: md.symbol -> res->symbol * no-op: Use more res, use cctx * no-op: Use a ConstShallowWalk * Add `buildFor` that operates on `ClassDef` * Remove class_flatten * Remove MethodDef parameter from SemanticExtension * flatten-tree.exp (should we rename these?) * flatten-tree-raw.exp (should we rename these?) * **/*.cfg-text.exp: there are only moved lines * test/cli * ENFORCE suggestion
`--gen-packages` mode: Exports (#9654) * suggest a debug build for updating CLI tests * track symbols referenced by file * generate an autocorrect for missing exports * extract mergeAdjacentEdits into AutocorrectSuggestion.h * combine import/export * Add a test * update error code * update error reference * run main loop over all packages and then gate just the aggregateMissingImports call * initialize with an empty vector here * take in file ref instead of id * create the vector directlyg * add a note about symbolsReferenced * extract autocorrect building code to new function * replace tuple with struct * comments * minor PR comments * PR comments
PreviousNext