Tags: hdoan741/sorbet
Tags
[prework] Add types to struct initialize (sorbet#1024) * Rm unused include * Avoid `if not cond then ... else ...` * Fix typo * Have ChalkODMProp::replaceDSL return a optional It is ENFORCEd that if ret == SOME(x) then x != []. This is in preparation for allowing ChalkODMProp::replaceDSL to return something other than the vector<unique_ptr<ast::Expression>>. Previously, because the only thing we were returning was that vector, we could use the empty vector to signify "no desugaring occurred". * Use ChalkODMProp::{, NodesAnd}Prop * Collect the props * Wrap a comment * Use T * Update a comment The old comment seemed to be inaccurate in multiple places. This attempts to make it more accurate. Of course, it's likely that the old comment was probably accurate at one point and became inaccurate over time as the code changed. The same could happen to this new comment. And since the inaccuracy of the old comment wasn't noticed until now, it's arguable that we could remove the comment altogether and not lose much. * Rm ws * Make *.rbi have *.rb syntax in vscode * Use arg0 * Rm an arg * Rm a comment invariant
Move questions to Stack Overflow (sorbet#1016)
Feature/1001 avoid segfault on empty literal mergestring (sorbet#1012) * test(ast/desugar): Add EmptyTree Desuger Test * test: Add empty_string_concatenation test * fix: check if expression is EmptyTree or not on mergeStrings * fix(ast/desuger/Desuger): Use ""sv * fix(ast/desuger/test): Remove redundant test
Changes for sorbet#979 - Document Prereq's (sorbet#1007) * Changes for sorbet#979 Changes for sorbet#979 * Move to FAQ and make it look better
Fix Float#truncate signature. (sorbet#988) It can get an (optional) Integer as an argument and return Integer or Float depending on the arg value.
Enable more [[nodiscard]] in stdlib (sorbet#999) Found in https://libcxx.llvm.org/docs/UsingLibcxx.html#extended-applications-of-nodiscard
Add comment on concurrent queue choice. (sorbet#1008)
Desugar multiple assignment such that it returns rhs (sorbet#984) * Desugar multiple assignment such that it returns rhs We were not being faithful to what Ruby does with our multiple assignment desugar. We were returning the result of a call to our magic expand splat method which is almost always not what actually happens at runtime. Here is the result of the attached test case before this commit: ```ruby extend T::Sig sig {returns(T.nilable(T::Array[Integer]))} def foo nil end T.reveal_type((a, b = foo)) # Revealed type: T.any(T::Array[Integer], [NilClass, NilClass]) T.reveal_type((c, *, d = 100)) # Revealed type: [Integer(100), NilClass] (2-tuple) ``` * Insert into the front instead of reserving space and poking * Add example from sorbet#981 * Add ast.exp file * Add helpful comment Co-Authored-By: Jake Zimmerman <zimmerman.jake@gmail.com>
Docs: Clarify what should be comitted to source control (sorbet#943) * Docs: Clarify what should be comitted to source control * Remove incorrect mention of Makefile * Add cross reference to reasoning
Docs: Fix description of `typed: strong` (sorbet#942) * Docs: Fix description of `typed: strong` * Explain that typed: strong is rarely used * Fix prettier
PreviousNext