Revert "add a warning for immutablizing a class with mutable ancestors"
[gitmo/Moose.git] / lib / Moose / Meta / Class.pm
index f74b483..a97f0a5 100644 (file)
@@ -140,34 +140,6 @@ sub add_role {
     push @{$self->roles} => $role;
 }
 
-sub make_immutable {
-    my $self = shift;
-
-    # we do this for metaclasses way too often to do this check for them
-    if ( !$self->name->isa('Class::MOP::Object') ) {
-        my @superclasses = grep { $_ ne 'Moose::Object' && $_ ne $self->name }
-            $self->linearized_isa;
-
-        for my $superclass (@superclasses) {
-            my $meta = Class::MOP::class_of($superclass);
-
-            next unless $meta && $meta->isa('Moose::Meta::Class');
-            next unless $meta->is_mutable;
-            # This can happen when a base class role is applied via
-            # Moose::Util::MetaRole::apply_base_class_roles. The parent is an
-            # anon class and is still mutable, but that's okay.
-            next if $meta->is_anon_class;
-
-            Carp::cluck( "Calling make_immutable on "
-                    . $self->name
-                    . ", which has a mutable ancestor ($superclass)" );
-            last;
-        }
-    }
-
-    $self->SUPER::make_immutable(@_);
-}
-
 sub role_applications {
     my ($self) = @_;