diff --git a/lib/tapioca/dsl/compilers/frozen_record.rb b/lib/tapioca/dsl/compilers/frozen_record.rb index c1c548674..2b1095ad2 100644 --- a/lib/tapioca/dsl/compilers/frozen_record.rb +++ b/lib/tapioca/dsl/compilers/frozen_record.rb @@ -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) } } sig { override.void } def decorate @@ -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"