diff --git a/project/Build.scala b/project/Build.scala index 473ef2443f06..75d1ed9065bd 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -42,7 +42,7 @@ object DottyBuild extends Build { resolvers += Resolver.sonatypeRepo("releases"), // get libraries onboard - partestDeps := Seq("me.d-d" % "scala-compiler" % "2.11.5-20150619-173733-3bcd390afa", + partestDeps := Seq("me.d-d" % "scala-compiler" % "2.11.5-20150714-145300-2ad68448c5", "org.scala-lang" % "scala-reflect" % scalaVersion.value, "org.scala-lang" % "scala-library" % scalaVersion.value % "test"), libraryDependencies ++= partestDeps.value, diff --git a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala index 4a828c5bd469..72313c8d0301 100644 --- a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala +++ b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala @@ -784,7 +784,7 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{ def decls: List[Symbol] = tp.decls.map(_.symbol).toList def members: List[Symbol] = - tp.memberDenots(takeAllFilter, (name, buf) => buf ++= member(name).alternatives).map(_.symbol).toList + tp.memberDenots(takeAllFilter, (name, buf) => buf ++= tp.member(name).alternatives).map(_.symbol).toList def typeSymbol: Symbol = tp.widenDealias.typeSymbol diff --git a/src/dotty/tools/dotc/ast/Trees.scala b/src/dotty/tools/dotc/ast/Trees.scala index f63d32b1456c..a10dfaa16dba 100644 --- a/src/dotty/tools/dotc/ast/Trees.scala +++ b/src/dotty/tools/dotc/ast/Trees.scala @@ -223,7 +223,7 @@ object Trees { override def toText(printer: Printer) = printer.toText(this) - override def hashCode(): Int = System.identityHashCode(this) + override def hashCode(): Int = uniqueId // for debugging; was: System.identityHashCode(this) override def equals(that: Any) = this eq that.asInstanceOf[AnyRef] } diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala index 206ef9d8b9d4..15c7b4b115b5 100644 --- a/src/dotty/tools/dotc/core/Contexts.scala +++ b/src/dotty/tools/dotc/core/Contexts.scala @@ -177,25 +177,26 @@ object Contexts { /** The new implicit references that are introduced by this scope */ private var implicitsCache: ContextualImplicits = null def implicits: ContextualImplicits = { - if (implicitsCache == null ) - implicitsCache = { - val implicitRefs: List[TermRef] = - if (isClassDefContext) - try owner.thisType.implicitMembers - catch { - case ex: CyclicReference => Nil - } - else if (isImportContext) importInfo.importedImplicits - else if (isNonEmptyScopeContext) scope.implicitDecls - else Nil - val outerImplicits = - if (isImportContext && importInfo.hiddenRoot.exists) - outer.implicits exclude importInfo.hiddenRoot - else - outer.implicits - if (implicitRefs.isEmpty) outerImplicits - else new ContextualImplicits(implicitRefs, outerImplicits)(this) + if (implicitsCache == null ) { + val outerImplicits = + if (isImportContext && importInfo.hiddenRoot.exists) + outer.implicits exclude importInfo.hiddenRoot + else + outer.implicits + try + implicitsCache = { + val implicitRefs: List[TermRef] = + if (isClassDefContext) owner.thisType.implicitMembers + else if (isImportContext) importInfo.importedImplicits + else if (isNonEmptyScopeContext) scope.implicitDecls + else Nil + if (implicitRefs.isEmpty) outerImplicits + else new ContextualImplicits(implicitRefs, outerImplicits)(this) + } + catch { + case ex: CyclicReference => implicitsCache = outerImplicits } + } implicitsCache } diff --git a/src/dotty/tools/dotc/core/NameOps.scala b/src/dotty/tools/dotc/core/NameOps.scala index 4d6cca61dc08..74555961eb70 100644 --- a/src/dotty/tools/dotc/core/NameOps.scala +++ b/src/dotty/tools/dotc/core/NameOps.scala @@ -236,7 +236,7 @@ object NameOps { case nme.clone_ => nme.clone_ } - def specializedFor(returnType: Types.Type, args: List[Types.Type])(implicit ctx: Context): name.ThisName = { + def specializedFor(classTargs: List[Types.Type], classTargsNames: List[Name], methodTargs: List[Types.Type], methodTarsNames: List[Name])(implicit ctx: Context): name.ThisName = { def typeToTag(tp: Types.Type): Name = { tp.classSymbol match { @@ -253,9 +253,12 @@ object NameOps { } } + val methodTags: Seq[Name] = (methodTargs zip methodTarsNames).sortBy(_._2).map(x => typeToTag(x._1)) + val classTags: Seq[Name] = (classTargs zip classTargsNames).sortBy(_._2).map(x => typeToTag(x._1)) + name.fromName(name ++ nme.specializedTypeNames.prefix ++ - args.map(typeToTag).foldRight(typeToTag(returnType))(_ ++ _) ++ - nme.specializedTypeNames.suffix) + methodTags.fold(nme.EMPTY)(_ ++ _) ++ nme.specializedTypeNames.separator ++ + classTags.fold(nme.EMPTY)(_ ++ _) ++ nme.specializedTypeNames.suffix) } /** If name length exceeds allowable limit, replace part of it by hash */ diff --git a/src/dotty/tools/dotc/core/Names.scala b/src/dotty/tools/dotc/core/Names.scala index 1ee56fe1ce82..ed41d6b6c252 100644 --- a/src/dotty/tools/dotc/core/Names.scala +++ b/src/dotty/tools/dotc/core/Names.scala @@ -347,4 +347,25 @@ object Names { StringBuilder.newBuilder.mapResult(s => from.fromChars(s.toCharArray, 0, s.length)) def apply(): Builder[Char, Name] = termNameBuilder } + + implicit val NameOrdering: Ordering[Name] = new Ordering[Name] { + def compare(x: Name, y: Name): Int = { + if (x.isTermName && y.isTypeName) 1 + else if (x.isTypeName && y.isTermName) -1 + else if (x eq y) 0 + else { + val until = x.length min y.length + var i = 0 + + while (i < until && x(i) == y(i)) i = i + 1 + + if (i < until) { + if (x(i) < y(i)) -1 + else /*(x(i) > y(i))*/ 1 + } else { + x.length - y.length + } + } + } + } } diff --git a/src/dotty/tools/dotc/core/StdNames.scala b/src/dotty/tools/dotc/core/StdNames.scala index eb1a73625381..577e1ebf3ef2 100644 --- a/src/dotty/tools/dotc/core/StdNames.scala +++ b/src/dotty/tools/dotc/core/StdNames.scala @@ -559,7 +559,8 @@ object StdNames { final val Void: N = "V" final val Object: N = "L" - final val prefix: N = "$mc" + final val prefix: N = "$m" + final val separator: N = "c" final val suffix: N = "$sp" } diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index 53973b587136..985d1a9c713d 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -404,6 +404,14 @@ object SymDenotations { name.toTermName == nme.COMPANION_CLASS_METHOD || name.toTermName == nme.COMPANION_MODULE_METHOD + /** Is this a syntetic method that represents conversions between representations of a value class + * These methods are generated in ExtensionMethods + * and used in ElimErasedValueType. + */ + final def isValueClassConvertMethod(implicit ctx: Context) = + name.toTermName == nme.U2EVT || + name.toTermName == nme.EVT2U + /** Is symbol a primitive value class? */ def isPrimitiveValueClass(implicit ctx: Context) = defn.ScalaValueClasses contains symbol diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala index ce308459ae23..2b4f806dd3ee 100644 --- a/src/dotty/tools/dotc/core/Symbols.scala +++ b/src/dotty/tools/dotc/core/Symbols.scala @@ -503,6 +503,8 @@ object Symbols { def showKind(implicit ctx: Context): String = ctx.kindString(this) def showName(implicit ctx: Context): String = ctx.nameString(this) def showFullName(implicit ctx: Context): String = ctx.fullNameString(this) + + override def hashCode() = id // for debugging. } type TermSymbol = Symbol { type ThisName = TermName } diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 61ab1133b65e..15e8d2a5695b 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -1296,7 +1296,7 @@ object Types { case d: SymDenotation => if (this.isInstanceOf[WithFixedSym]) d.current else if (d.validFor.runId == ctx.runId || ctx.stillValid(d)) - if (prefix.isTightPrefix(d.owner) || d.isConstructor) d.current + if (d.exists && prefix.isTightPrefix(d.owner) || d.isConstructor) d.current else recomputeMember(d) // symbol could have been overridden, recompute membership else { val newd = loadDenot diff --git a/src/dotty/tools/dotc/transform/ElimErasedValueType.scala b/src/dotty/tools/dotc/transform/ElimErasedValueType.scala index 8a18c9c177bc..a3f8b56ff3b5 100644 --- a/src/dotty/tools/dotc/transform/ElimErasedValueType.scala +++ b/src/dotty/tools/dotc/transform/ElimErasedValueType.scala @@ -56,12 +56,11 @@ class ElimErasedValueType extends MiniPhaseTransform with InfoTransformer { override def transformApply(tree: Apply)(implicit ctx: Context, info: TransformerInfo): Tree = { val Apply(fun, args) = tree - val name = fun.symbol.name // The casts to and from ErasedValueType are no longer needed once ErasedValueType // has been eliminated. val t = - if ((name eq nme.U2EVT) || (name eq nme.EVT2U)) + if (fun.symbol.isValueClassConvertMethod) args.head else tree diff --git a/src/dotty/tools/dotc/transform/FunctionalInterfaces.scala b/src/dotty/tools/dotc/transform/FunctionalInterfaces.scala index 03b2910aeb40..5fd89314ad3f 100644 --- a/src/dotty/tools/dotc/transform/FunctionalInterfaces.scala +++ b/src/dotty/tools/dotc/transform/FunctionalInterfaces.scala @@ -63,7 +63,12 @@ class FunctionalInterfaces extends MiniPhaseTransform { val m = tree.meth.tpe.widen.asInstanceOf[MethodType] if (shouldSpecialize(m)) { - val interfaceName = (functionName ++ m.paramTypes.length.toString).specializedFor(m.resultType, m.paramTypes) + val functionSymbol = tree.tpe.widenDealias.classSymbol + val names = ctx.atPhase(ctx.erasurePhase) { + implicit ctx => functionSymbol.typeParams.map(_.name) + } + val interfaceName = (functionName ++ m.paramTypes.length.toString).specializedFor(m.paramTypes ::: m.resultType :: Nil, names, Nil, Nil) + // symbols loaded from classpath aren't defined in periods earlier than when they where loaded val interface = ctx.withPhase(ctx.typerPhase).getClassIfDefined(functionPackage ++ interfaceName) if (interface.exists) { diff --git a/src/dotty/tools/dotc/transform/Memoize.scala b/src/dotty/tools/dotc/transform/Memoize.scala index cf3011bc835c..728005cabf11 100644 --- a/src/dotty/tools/dotc/transform/Memoize.scala +++ b/src/dotty/tools/dotc/transform/Memoize.scala @@ -45,14 +45,20 @@ import Decorators._ override def transformDefDef(tree: DefDef)(implicit ctx: Context, info: TransformerInfo): Tree = { val sym = tree.symbol - def newField = ctx.newSymbol( - owner = ctx.owner, - name = sym.name.asTermName.fieldName, - flags = Private | (if (sym is Stable) EmptyFlags else Mutable), - info = sym.info.resultType, - coord = tree.pos) - .withAnnotationsCarrying(sym, defn.FieldMetaAnnot) - .enteredAfter(thisTransform) + def newField = { + val fieldType = + if (sym.isGetter) sym.info.resultType + else /*sym.isSetter*/ sym.info.firstParamTypes.head + + ctx.newSymbol( + owner = ctx.owner, + name = sym.name.asTermName.fieldName, + flags = Private | (if (sym is Stable) EmptyFlags else Mutable), + info = fieldType, + coord = tree.pos) + .withAnnotationsCarrying(sym, defn.FieldMetaAnnot) + .enteredAfter(thisTransform) + } /** Can be used to filter annotations on getters and setters; not used yet */ def keepAnnotations(denot: SymDenotation, meta: ClassSymbol) = { diff --git a/src/dotty/tools/dotc/transform/Mixin.scala b/src/dotty/tools/dotc/transform/Mixin.scala index bebaf44f46cd..ae4e261775f1 100644 --- a/src/dotty/tools/dotc/transform/Mixin.scala +++ b/src/dotty/tools/dotc/transform/Mixin.scala @@ -98,7 +98,7 @@ class Mixin extends MiniPhaseTransform with SymTransformer { thisTransform => override def runsAfter: Set[Class[_ <: Phase]] = Set(classOf[Erasure]) override def transformSym(sym: SymDenotation)(implicit ctx: Context): SymDenotation = - if (sym.is(Accessor, butNot = Deferred) && sym.owner.is(Trait)) + if (sym.is(Accessor, butNot = Deferred | Lazy) && sym.owner.is(Trait)) sym.copySymDenotation(initFlags = sym.flags &~ ParamAccessor | Deferred).ensureNotPrivate else if (sym.isConstructor && sym.owner.is(Trait)) sym.copySymDenotation( @@ -108,8 +108,8 @@ class Mixin extends MiniPhaseTransform with SymTransformer { thisTransform => sym private def initializer(sym: Symbol)(implicit ctx: Context): TermSymbol = { - val initName = InitializerName(sym.name.asTermName) - sym.owner.info.decl(initName).symbol + val initName = if(!sym.is(Lazy)) InitializerName(sym.name.asTermName) else sym.name.asTermName + sym.owner.info.decl(initName).suchThat(_.is(Lazy) == sym.is(Lazy)).symbol .orElse( ctx.newSymbol( sym.owner, @@ -229,7 +229,7 @@ class Mixin extends MiniPhaseTransform with SymTransformer { thisTransform => def setters(mixin: ClassSymbol): List[Tree] = for (setter <- mixin.info.decls.filter(setr => setr.isSetter && !wasDeferred(setr)).toList) - yield DefDef(implementation(setter.asTerm), unitLiteral.withPos(cls.pos)) + yield transformFollowing(DefDef(implementation(setter.asTerm), unitLiteral.withPos(cls.pos))) cpy.Template(impl)( constr = diff --git a/src/dotty/tools/dotc/transform/PatternMatcher.scala b/src/dotty/tools/dotc/transform/PatternMatcher.scala index af8da01ffa96..2df7a9825189 100644 --- a/src/dotty/tools/dotc/transform/PatternMatcher.scala +++ b/src/dotty/tools/dotc/transform/PatternMatcher.scala @@ -440,7 +440,11 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans def emitVars = storedBinders.nonEmpty - private lazy val (stored, substed) = (subPatBinders, subPatRefs).zipped.partition{ case (sym, _) => storedBinders(sym) } + lazy val storedSubsted = (subPatBinders, subPatRefs).zipped.partition{ case (sym, _) => storedBinders(sym) } + + def stored = storedSubsted._1 + + def substed = storedSubsted._2 // dd: this didn't yet trigger error. But I believe it would. if this causes double denition of symbol error this can be replaced with NoRebindings protected lazy val introducedRebindings: Rebindings = if (!emitVars) Rebindings(subPatBinders, subPatRefs) @@ -1443,7 +1447,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans // require (nbSubPats > 0 && (!lastIsStar || isSeq)) protected def subPatRefs(binder: Symbol): List[Tree] = { val refs = if (totalArity > 0 && isSeq) subPatRefsSeq(binder) - else if (totalArity > 1 && !isSeq) productElemsToN(binder, totalArity) + else if (binder.info.member(nme._1).exists && !isSeq) productElemsToN(binder, totalArity) else ref(binder):: Nil refs } diff --git a/src/dotty/tools/dotc/transform/TreeChecker.scala b/src/dotty/tools/dotc/transform/TreeChecker.scala index 0e69b9d1fd93..4a7d965e0663 100644 --- a/src/dotty/tools/dotc/transform/TreeChecker.scala +++ b/src/dotty/tools/dotc/transform/TreeChecker.scala @@ -2,6 +2,7 @@ package dotty.tools.dotc package transform import TreeTransforms._ +import core.Names.Name import core.DenotTransformers._ import core.Denotations._ import core.SymDenotations._ @@ -42,6 +43,12 @@ class TreeChecker extends Phase with SymTransformer { private val seenClasses = collection.mutable.HashMap[String, Symbol]() private val seenModuleVals = collection.mutable.HashMap[String, Symbol]() + def isValidJVMName(name: Name) = + !name.exists(c => c == '.' || c == ';' || c =='[' || c == '/') + + def isValidJVMMethodName(name: Name) = + !name.exists(c => c == '.' || c == ';' || c =='[' || c == '/' || c == '<' || c == '>') + def printError(str: String)(implicit ctx: Context) = { ctx.println(Console.RED + "[error] " + Console.WHITE + str) } @@ -130,6 +137,7 @@ class TreeChecker extends Phase with SymTransformer { def withDefinedSym[T](tree: untpd.Tree)(op: => T)(implicit ctx: Context): T = tree match { case tree: DefTree => val sym = tree.symbol + assert(isValidJVMName(sym.name), s"${sym.fullName} name is invalid on jvm") everDefinedSyms.get(sym) match { case Some(t) => if (t ne tree) @@ -256,12 +264,24 @@ class TreeChecker extends Phase with SymTransformer { assert(cls.primaryConstructor == constr.symbol, i"mismatch, primary constructor ${cls.primaryConstructor}, in tree = ${constr.symbol}") checkOwner(impl) checkOwner(impl.constr) + + def isNonMagicalMethod(x: Symbol) = + x.is(Method) && + !x.isCompanionMethod && + !x.isValueClassConvertMethod && + x != defn.newRefArrayMethod + + val symbolsNotDefined = cls.classInfo.decls.toSet.filter(isNonMagicalMethod) -- impl.body.map(_.symbol) - constr.symbol + + assert(symbolsNotDefined.isEmpty, i" $cls tree does not define methods: $symbolsNotDefined") + super.typedClassDef(cdef, cls) } override def typedDefDef(ddef: untpd.DefDef, sym: Symbol)(implicit ctx: Context) = withDefinedSyms(ddef.tparams) { withDefinedSymss(ddef.vparamss) { + if (!sym.isClassConstructor) assert(isValidJVMMethodName(sym.name), s"${sym.fullName} name is invalid on jvm") super.typedDefDef(ddef, sym) } } diff --git a/test/dotc/tests.scala b/test/dotc/tests.scala index 2baeeb49e4a6..19027e99e6fd 100644 --- a/test/dotc/tests.scala +++ b/test/dotc/tests.scala @@ -147,7 +147,7 @@ class tests extends CompilerTest { @Test def run_all = runFiles(runDir) - @Test def dotty = compileDir(dottyDir, "tools", "-deep" :: "-Ycheck-reentrant" :: allowDeepSubtypes ++ twice) // note the -deep argument + @Test def dotty = compileDir(dottyDir, ".", "-deep" :: "-Ycheck-reentrant" :: allowDeepSubtypes) // note the -deep argument @Test def dotc_ast = compileDir(dotcDir, "ast") diff --git a/tests/pending/pos/i743.scala b/tests/pending/pos/i743.scala new file mode 100644 index 000000000000..8fe522ceeb17 --- /dev/null +++ b/tests/pending/pos/i743.scala @@ -0,0 +1,6 @@ +object NonLocalReturn { + def foo(a: List[Int]): Int = { + a.foreach(x => return x) + 0 + } +} diff --git a/tests/pending/run/StackMap.scala b/tests/pending/run/StackMap.scala new file mode 100644 index 000000000000..5220758fe923 --- /dev/null +++ b/tests/pending/run/StackMap.scala @@ -0,0 +1,7 @@ +object Test { + var implicitsCache = null + + def main(args: Array[String]): Unit = { + implicitsCache = try{null} catch { case ex: Exception => null } + } +} diff --git a/tests/pending/run/Course-2002-02.check b/tests/run/Course-2002-02.check similarity index 100% rename from tests/pending/run/Course-2002-02.check rename to tests/run/Course-2002-02.check diff --git a/tests/pending/run/Course-2002-02.scala b/tests/run/Course-2002-02.scala similarity index 100% rename from tests/pending/run/Course-2002-02.scala rename to tests/run/Course-2002-02.scala diff --git a/tests/pending/run/Course-2002-07.check b/tests/run/Course-2002-07.check similarity index 100% rename from tests/pending/run/Course-2002-07.check rename to tests/run/Course-2002-07.check diff --git a/tests/pending/run/Course-2002-07.scala b/tests/run/Course-2002-07.scala similarity index 100% rename from tests/pending/run/Course-2002-07.scala rename to tests/run/Course-2002-07.scala diff --git a/tests/pending/run/Course-2002-13.check b/tests/run/Course-2002-13.check similarity index 100% rename from tests/pending/run/Course-2002-13.check rename to tests/run/Course-2002-13.check diff --git a/tests/pending/run/Course-2002-13.scala b/tests/run/Course-2002-13.scala similarity index 100% rename from tests/pending/run/Course-2002-13.scala rename to tests/run/Course-2002-13.scala diff --git a/tests/pending/run/WeakHashSetTest.scala b/tests/run/WeakHashSetTest.scala similarity index 100% rename from tests/pending/run/WeakHashSetTest.scala rename to tests/run/WeakHashSetTest.scala diff --git a/tests/pending/run/bytecodecs.scala b/tests/run/bytecodecs.scala similarity index 100% rename from tests/pending/run/bytecodecs.scala rename to tests/run/bytecodecs.scala diff --git a/tests/pending/run/caseclasses.check b/tests/run/caseclasses.check similarity index 100% rename from tests/pending/run/caseclasses.check rename to tests/run/caseclasses.check diff --git a/tests/pending/run/caseclasses.scala b/tests/run/caseclasses.scala similarity index 100% rename from tests/pending/run/caseclasses.scala rename to tests/run/caseclasses.scala diff --git a/tests/pending/run/dead-code-elimination.flags b/tests/run/dead-code-elimination.flags similarity index 100% rename from tests/pending/run/dead-code-elimination.flags rename to tests/run/dead-code-elimination.flags diff --git a/tests/pending/run/dead-code-elimination.scala b/tests/run/dead-code-elimination.scala similarity index 100% rename from tests/pending/run/dead-code-elimination.scala rename to tests/run/dead-code-elimination.scala diff --git a/tests/pending/run/exceptions-2.check b/tests/run/exceptions-2.check similarity index 82% rename from tests/pending/run/exceptions-2.check rename to tests/run/exceptions-2.check index 4f8244800a7c..9a3044cd4f01 100644 --- a/tests/pending/run/exceptions-2.check +++ b/tests/run/exceptions-2.check @@ -1,6 +1,3 @@ -exceptions-2.scala:267: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses - try { 1 } catch { case e: java.io.IOException => () } - ^ nested1: Innermost finally Outermost finally diff --git a/tests/pending/run/exceptions-2.scala b/tests/run/exceptions-2.scala similarity index 100% rename from tests/pending/run/exceptions-2.scala rename to tests/run/exceptions-2.scala diff --git a/tests/pending/run/exceptions.check b/tests/run/exceptions.check similarity index 100% rename from tests/pending/run/exceptions.check rename to tests/run/exceptions.check diff --git a/tests/pending/run/exceptions.scala b/tests/run/exceptions.scala similarity index 100% rename from tests/pending/run/exceptions.scala rename to tests/run/exceptions.scala diff --git a/tests/pending/run/hashCodeDistribution.scala b/tests/run/hashCodeDistribution.scala similarity index 100% rename from tests/pending/run/hashCodeDistribution.scala rename to tests/run/hashCodeDistribution.scala diff --git a/tests/run/i744.check b/tests/run/i744.check new file mode 100644 index 000000000000..d00491fd7e5b --- /dev/null +++ b/tests/run/i744.check @@ -0,0 +1 @@ +1 diff --git a/tests/run/i744.scala b/tests/run/i744.scala new file mode 100644 index 000000000000..4ff6c9288f65 --- /dev/null +++ b/tests/run/i744.scala @@ -0,0 +1,8 @@ +trait A{ + private var s = 1 + def getS = s +} + +object Test extends A { + def main(args: Array[String]): Unit = println(getS) +} diff --git a/tests/pending/run/matcharraytail.check b/tests/run/matcharraytail.check similarity index 100% rename from tests/pending/run/matcharraytail.check rename to tests/run/matcharraytail.check diff --git a/tests/pending/run/matcharraytail.scala b/tests/run/matcharraytail.scala similarity index 100% rename from tests/pending/run/matcharraytail.scala rename to tests/run/matcharraytail.scala diff --git a/tests/pending/run/matchonstream.check b/tests/run/matchonstream.check similarity index 100% rename from tests/pending/run/matchonstream.check rename to tests/run/matchonstream.check diff --git a/tests/pending/run/matchonstream.scala b/tests/run/matchonstream.scala similarity index 100% rename from tests/pending/run/matchonstream.scala rename to tests/run/matchonstream.scala diff --git a/tests/pending/run/mixin-bridge-methods.scala b/tests/run/mixin-bridge-methods.scala similarity index 100% rename from tests/pending/run/mixin-bridge-methods.scala rename to tests/run/mixin-bridge-methods.scala diff --git a/tests/pending/run/null-and-intersect.check b/tests/run/null-and-intersect.check similarity index 100% rename from tests/pending/run/null-and-intersect.check rename to tests/run/null-and-intersect.check diff --git a/tests/pending/run/null-and-intersect.scala b/tests/run/null-and-intersect.scala similarity index 100% rename from tests/pending/run/null-and-intersect.scala rename to tests/run/null-and-intersect.scala diff --git a/tests/pending/run/option-fold.check b/tests/run/option-fold.check similarity index 100% rename from tests/pending/run/option-fold.check rename to tests/run/option-fold.check diff --git a/tests/pending/run/option-fold.scala b/tests/run/option-fold.scala similarity index 100% rename from tests/pending/run/option-fold.scala rename to tests/run/option-fold.scala diff --git a/tests/pending/run/proxy.check b/tests/run/proxy.check similarity index 100% rename from tests/pending/run/proxy.check rename to tests/run/proxy.check diff --git a/tests/pending/run/proxy.scala b/tests/run/proxy.scala similarity index 100% rename from tests/pending/run/proxy.scala rename to tests/run/proxy.scala diff --git a/tests/pending/run/range.scala b/tests/run/range.scala similarity index 100% rename from tests/pending/run/range.scala rename to tests/run/range.scala diff --git a/tests/pending/run/t0325.check b/tests/run/t0325.check similarity index 100% rename from tests/pending/run/t0325.check rename to tests/run/t0325.check diff --git a/tests/pending/run/t0325.scala b/tests/run/t0325.scala similarity index 100% rename from tests/pending/run/t0325.scala rename to tests/run/t0325.scala diff --git a/tests/pending/run/t0631.check b/tests/run/t0631.check similarity index 100% rename from tests/pending/run/t0631.check rename to tests/run/t0631.check diff --git a/tests/pending/run/t0631.scala b/tests/run/t0631.scala similarity index 100% rename from tests/pending/run/t0631.scala rename to tests/run/t0631.scala diff --git a/tests/pending/run/t1333.check b/tests/run/t1333.check similarity index 100% rename from tests/pending/run/t1333.check rename to tests/run/t1333.check diff --git a/tests/pending/run/t1333.scala b/tests/run/t1333.scala similarity index 100% rename from tests/pending/run/t1333.scala rename to tests/run/t1333.scala diff --git a/tests/pending/run/t1697.scala b/tests/run/t1697.scala similarity index 100% rename from tests/pending/run/t1697.scala rename to tests/run/t1697.scala diff --git a/tests/pending/run/t1909b.scala b/tests/run/t1909b.scala similarity index 100% rename from tests/pending/run/t1909b.scala rename to tests/run/t1909b.scala diff --git a/tests/pending/run/t2074_2.check b/tests/run/t2074_2.check similarity index 100% rename from tests/pending/run/t2074_2.check rename to tests/run/t2074_2.check diff --git a/tests/pending/run/t2074_2.scala b/tests/run/t2074_2.scala similarity index 100% rename from tests/pending/run/t2074_2.scala rename to tests/run/t2074_2.scala diff --git a/tests/pending/run/t2175.scala b/tests/run/t2175.scala similarity index 100% rename from tests/pending/run/t2175.scala rename to tests/run/t2175.scala diff --git a/tests/pending/run/t2316_run.scala b/tests/run/t2316_run.scala similarity index 100% rename from tests/pending/run/t2316_run.scala rename to tests/run/t2316_run.scala diff --git a/tests/pending/run/t2417.check b/tests/run/t2417.check similarity index 100% rename from tests/pending/run/t2417.check rename to tests/run/t2417.check diff --git a/tests/pending/run/t2417.scala b/tests/run/t2417.scala similarity index 100% rename from tests/pending/run/t2417.scala rename to tests/run/t2417.scala diff --git a/tests/pending/run/t2544.check b/tests/run/t2544.check similarity index 100% rename from tests/pending/run/t2544.check rename to tests/run/t2544.check diff --git a/tests/pending/run/t2544.scala b/tests/run/t2544.scala similarity index 100% rename from tests/pending/run/t2544.scala rename to tests/run/t2544.scala diff --git a/tests/pending/run/t2788.check b/tests/run/t2788.check similarity index 100% rename from tests/pending/run/t2788.check rename to tests/run/t2788.check diff --git a/tests/pending/run/t2788.scala b/tests/run/t2788.scala similarity index 100% rename from tests/pending/run/t2788.scala rename to tests/run/t2788.scala diff --git a/tests/pending/run/t3038d.flags b/tests/run/t3038d.flags similarity index 100% rename from tests/pending/run/t3038d.flags rename to tests/run/t3038d.flags diff --git a/tests/pending/run/t3038d.scala b/tests/run/t3038d.scala similarity index 100% rename from tests/pending/run/t3038d.scala rename to tests/run/t3038d.scala diff --git a/tests/pending/run/t3580.scala b/tests/run/t3580.scala similarity index 100% rename from tests/pending/run/t3580.scala rename to tests/run/t3580.scala diff --git a/tests/pending/run/t3613.scala b/tests/run/t3613.scala similarity index 100% rename from tests/pending/run/t3613.scala rename to tests/run/t3613.scala diff --git a/tests/pending/run/t3714.scala b/tests/run/t3714.scala similarity index 100% rename from tests/pending/run/t3714.scala rename to tests/run/t3714.scala diff --git a/tests/pending/run/t3832.scala b/tests/run/t3832.scala similarity index 100% rename from tests/pending/run/t3832.scala rename to tests/run/t3832.scala diff --git a/tests/pending/run/t3984.scala b/tests/run/t3984.scala similarity index 100% rename from tests/pending/run/t3984.scala rename to tests/run/t3984.scala diff --git a/tests/pending/run/t4415.scala b/tests/run/t4415.scala similarity index 100% rename from tests/pending/run/t4415.scala rename to tests/run/t4415.scala diff --git a/tests/pending/run/t4482.check b/tests/run/t4482.check similarity index 100% rename from tests/pending/run/t4482.check rename to tests/run/t4482.check diff --git a/tests/pending/run/t4482.scala b/tests/run/t4482.scala similarity index 100% rename from tests/pending/run/t4482.scala rename to tests/run/t4482.scala diff --git a/tests/pending/run/t4753.check b/tests/run/t4753.check similarity index 100% rename from tests/pending/run/t4753.check rename to tests/run/t4753.check diff --git a/tests/pending/run/t4753.scala b/tests/run/t4753.scala similarity index 100% rename from tests/pending/run/t4753.scala rename to tests/run/t4753.scala diff --git a/tests/pending/run/t4859.check b/tests/run/t4859.check similarity index 100% rename from tests/pending/run/t4859.check rename to tests/run/t4859.check diff --git a/tests/pending/run/t4859.scala b/tests/run/t4859.scala similarity index 100% rename from tests/pending/run/t4859.scala rename to tests/run/t4859.scala diff --git a/tests/pending/run/t4871.check b/tests/run/t4871.check similarity index 100% rename from tests/pending/run/t4871.check rename to tests/run/t4871.check diff --git a/tests/pending/run/t4871.scala b/tests/run/t4871.scala similarity index 100% rename from tests/pending/run/t4871.scala rename to tests/run/t4871.scala diff --git a/tests/pending/run/t5158.check b/tests/run/t5158.check similarity index 100% rename from tests/pending/run/t5158.check rename to tests/run/t5158.check diff --git a/tests/pending/run/t5158.scala b/tests/run/t5158.scala similarity index 100% rename from tests/pending/run/t5158.scala rename to tests/run/t5158.scala diff --git a/tests/pending/run/t5293-map.scala b/tests/run/t5293-map.scala similarity index 100% rename from tests/pending/run/t5293-map.scala rename to tests/run/t5293-map.scala diff --git a/tests/pending/run/t5293.scala b/tests/run/t5293.scala similarity index 100% rename from tests/pending/run/t5293.scala rename to tests/run/t5293.scala diff --git a/tests/pending/run/t5407.check b/tests/run/t5407.check similarity index 100% rename from tests/pending/run/t5407.check rename to tests/run/t5407.check diff --git a/tests/pending/run/t5407.scala b/tests/run/t5407.scala similarity index 100% rename from tests/pending/run/t5407.scala rename to tests/run/t5407.scala diff --git a/tests/pending/run/t6070.check b/tests/run/t6070.check similarity index 100% rename from tests/pending/run/t6070.check rename to tests/run/t6070.check diff --git a/tests/pending/run/t6070.scala b/tests/run/t6070.scala similarity index 100% rename from tests/pending/run/t6070.scala rename to tests/run/t6070.scala diff --git a/tests/pending/run/t6198.scala b/tests/run/t6198.scala similarity index 100% rename from tests/pending/run/t6198.scala rename to tests/run/t6198.scala diff --git a/tests/pending/run/t6206.check b/tests/run/t6206.check similarity index 100% rename from tests/pending/run/t6206.check rename to tests/run/t6206.check diff --git a/tests/pending/run/t6206.scala b/tests/run/t6206.scala similarity index 100% rename from tests/pending/run/t6206.scala rename to tests/run/t6206.scala diff --git a/tests/pending/run/t6253a.scala b/tests/run/t6253a.scala similarity index 100% rename from tests/pending/run/t6253a.scala rename to tests/run/t6253a.scala diff --git a/tests/pending/run/t6253b.scala b/tests/run/t6253b.scala similarity index 100% rename from tests/pending/run/t6253b.scala rename to tests/run/t6253b.scala diff --git a/tests/pending/run/t6253c.scala b/tests/run/t6253c.scala similarity index 100% rename from tests/pending/run/t6253c.scala rename to tests/run/t6253c.scala diff --git a/tests/pending/run/t6337a.scala b/tests/run/t6337a.scala similarity index 100% rename from tests/pending/run/t6337a.scala rename to tests/run/t6337a.scala diff --git a/tests/pending/run/t6385.scala b/tests/run/t6385.scala similarity index 100% rename from tests/pending/run/t6385.scala rename to tests/run/t6385.scala diff --git a/tests/pending/run/t6628.check b/tests/run/t6628.check similarity index 100% rename from tests/pending/run/t6628.check rename to tests/run/t6628.check diff --git a/tests/pending/run/t6628.scala b/tests/run/t6628.scala similarity index 100% rename from tests/pending/run/t6628.scala rename to tests/run/t6628.scala diff --git a/tests/pending/run/t6793.scala b/tests/run/t6793.scala similarity index 100% rename from tests/pending/run/t6793.scala rename to tests/run/t6793.scala diff --git a/tests/pending/run/t7200.scala b/tests/run/t7200.scala similarity index 100% rename from tests/pending/run/t7200.scala rename to tests/run/t7200.scala diff --git a/tests/pending/run/t7214.scala b/tests/run/t7214.scala similarity index 100% rename from tests/pending/run/t7214.scala rename to tests/run/t7214.scala diff --git a/tests/pending/run/t7571.scala b/tests/run/t7571.scala similarity index 100% rename from tests/pending/run/t7571.scala rename to tests/run/t7571.scala diff --git a/tests/pending/run/t8177f.scala b/tests/run/t8177f.scala similarity index 100% rename from tests/pending/run/t8177f.scala rename to tests/run/t8177f.scala diff --git a/tests/pending/run/t8197.scala b/tests/run/t8197.scala similarity index 100% rename from tests/pending/run/t8197.scala rename to tests/run/t8197.scala diff --git a/tests/pending/run/try-catch-unify.check b/tests/run/try-catch-unify.check similarity index 100% rename from tests/pending/run/try-catch-unify.check rename to tests/run/try-catch-unify.check diff --git a/tests/pending/run/try-catch-unify.scala b/tests/run/try-catch-unify.scala similarity index 100% rename from tests/pending/run/try-catch-unify.scala rename to tests/run/try-catch-unify.scala diff --git a/tests/pending/run/unapplyArray.scala b/tests/run/unapplyArray.scala similarity index 100% rename from tests/pending/run/unapplyArray.scala rename to tests/run/unapplyArray.scala diff --git a/tests/run/value-class-extractor.scala b/tests/run/value-class-extractor.scala index 5628fea47350..07f32e0e50b4 100644 --- a/tests/run/value-class-extractor.scala +++ b/tests/run/value-class-extractor.scala @@ -6,7 +6,7 @@ object NonNullChar { @inline final val None = new NonNullChar(0.toChar) } -final class SomeProduct /*extends Product3[String, Int, List[String]]*/ { +final class SomeProduct extends Product3[String, Int, List[String]] { def canEqual(x: Any) = x.isInstanceOf[SomeProduct] def _1 = "abc" def _2 = 5 diff --git a/tests/pending/run/verify-ctor.check b/tests/run/verify-ctor.check similarity index 100% rename from tests/pending/run/verify-ctor.check rename to tests/run/verify-ctor.check diff --git a/tests/pending/run/verify-ctor.scala b/tests/run/verify-ctor.scala similarity index 100% rename from tests/pending/run/verify-ctor.scala rename to tests/run/verify-ctor.scala diff --git a/tests/pending/run/virtpatmat_try.check b/tests/run/virtpatmat_try.check similarity index 100% rename from tests/pending/run/virtpatmat_try.check rename to tests/run/virtpatmat_try.check diff --git a/tests/pending/run/virtpatmat_try.flags b/tests/run/virtpatmat_try.flags similarity index 100% rename from tests/pending/run/virtpatmat_try.flags rename to tests/run/virtpatmat_try.flags diff --git a/tests/pending/run/virtpatmat_try.scala b/tests/run/virtpatmat_try.scala similarity index 100% rename from tests/pending/run/virtpatmat_try.scala rename to tests/run/virtpatmat_try.scala