From e5f33fd6dda4d96b0b9b2dad124416155769b3fb Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Wed, 31 Mar 2021 00:27:30 +0800 Subject: [PATCH] Fix typo for #10522 --- src/compiler/crystal/semantic/restrictions.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/crystal/semantic/restrictions.cr b/src/compiler/crystal/semantic/restrictions.cr index 74811e7c8356..5e516053da72 100644 --- a/src/compiler/crystal/semantic/restrictions.cr +++ b/src/compiler/crystal/semantic/restrictions.cr @@ -463,7 +463,7 @@ module Crystal def restrict(other : GenericClassType, context) parents.try &.each do |parent| if parent.module? - return self if parent.restriction_of?(other, context.instantiated_type, context) + return self if parent.restriction_of?(other, context.instantiated_type, context.strict?) else restricted = parent.restrict other, context return self if restricted @@ -745,7 +745,7 @@ module Crystal parents.try &.each do |parent| if parent.module? - return self if parent.restriction_of?(other, context.instantiated_type, context) + return self if parent.restriction_of?(other, context.instantiated_type, context.strict?) else restricted = parent.restrict other, context return self if restricted