Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/tapioca/dsl/compilers/frozen_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ module Compilers
class FrozenRecord < Compiler
extend T::Sig

ConstantType = type_member { { fixed: T.class_of(::FrozenRecord::Base) } }
ConstantType = type_member { { fixed: T.all(T.class_of(::FrozenRecord::Base), Extensions::FrozenRecord) } }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an alternative way to explicitly tell Sorbet that T.class_of(::FrozenRecord::Base).is_a?(Extensions::FrozenRecord)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so.


sig { override.void }
def decorate
Expand Down Expand Up @@ -97,7 +97,7 @@ def self.gather_constants

sig { params(record: RBI::Scope).void }
def decorate_scopes(record)
scopes = T.unsafe(constant).__tapioca_scope_names
scopes = constant.__tapioca_scope_names
return if scopes.nil?

module_name = "GeneratedRelationMethods"
Expand Down