From 1cc4d90627907a17172f7e8129003f9e9cb0cdf4 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sat, 30 Jan 2016 01:36:22 +0100 Subject: Move scala2Mode test from isStable to isRealizable This prepares the way for using isRealizable in different contexts. --- src/dotty/tools/dotc/core/Types.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/dotty/tools/dotc/core/Types.scala') diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 1d4e80601..db0831ba0 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -138,10 +138,12 @@ object Types { case tp: AndOrType => isConcrete(tp.tp1) && isConcrete(tp.tp2) case _ => false } - isConcrete(tp) && tp.abstractTypeMembers.forall { m => + isConcrete(tp) && + tp.abstractTypeMembers.forall { m => val bounds = m.info.bounds bounds.lo <:< bounds.hi - } + } || + ctx.scala2Mode } /** Does this type refer exactly to class symbol `sym`, instead of to a subclass of `sym`? -- cgit v1.2.3