Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash in pinning autocorrect (sorbet#3924)
* Add ENFORCE that would have made error more obvious * Add failing test Fails with this backtrace: Exception::raise(): core/Loc.cc:270 enforced condition exists() has failed: Can't take source of Loc that doesn't exist Backtrace: #3 0x1725725 sorbet::core::Loc::source() #4 0x120e0e1 sorbet::infer::Environment::processBinding() #5 0x11fae5b sorbet::infer::Inference::run() #6 0xed1a88 sorbet::realmain::pipeline::CFGCollectorAndTyper::preTransformMethodDef() #7 0xed185b sorbet::ast::CALL_MEMBER_impl_preTransformMethodDef<>::call<>() #8 0xecf90c sorbet::ast::TreeMapper<>::mapMethodDef() #9 0xece3ff sorbet::ast::TreeMapper<>::mapIt() #10 0xecf81f sorbet::ast::TreeMapper<>::mapClassDef() #11 0xece37a sorbet::ast::TreeMapper<>::mapIt() #12 0xed1409 sorbet::ast::TreeMapper<>::mapInsSeq() #13 0xecef9f sorbet::ast::TreeMapper<>::mapIt() #14 0xebc5d9 sorbet::ast::TreeMap::apply<>() #15 0xea2971 sorbet::realmain::pipeline::typecheckOne() #16 0xeb3dc6 sorbet::realmain::pipeline::typecheck()::$_4::operator()() #17 0xeb3acd std::__1::__invoke<>() #18 0xeb3a7d std::__1::__invoke_void_return_wrapper<>::__call<>() #19 0xeb3a4d std::__1::__function::__alloc_func<>::operator()() #20 0xeb2bee std::__1::__function::__func<>::operator()() #21 0x177e015 std::__1::__function::__value_func<>::operator()() #22 0x177ddb5 std::__1::function<>::operator()() #23 0x17fc90e sorbet::WorkerPoolImpl::multiplexJob() #24 0xea5633 sorbet::realmain::pipeline::typecheck() #25 0xafb232 sorbet::realmain::realmain() #26 0xaf70f2 main #27 0x7fba7de990b3 __libc_start_main #28 0xaf702e _start * Fix failing test
- Loading branch information