From 806b6e412b718a7f222dbb423e8e9744e8f2b400 Mon Sep 17 00:00:00 2001 From: François Garillot Date: Tue, 7 Jan 2014 17:22:11 +0100 Subject: Backports library changes related to SI-6566 from a419799 The idea of backporting this occured while developing the -source flag for SI-8126 : withouth this the library breaks at refchecks for a Scala compiler that checks type aliases variance. This shoudl be BC and promote good hygiene. --- src/library/scala/collection/TraversableLike.scala | 2 +- src/library/scala/collection/generic/GenericClassTagCompanion.scala | 2 +- src/library/scala/collection/generic/GenericCompanion.scala | 2 +- src/library/scala/collection/generic/GenericOrderedCompanion.scala | 2 +- src/library/scala/collection/immutable/TrieIterator.scala | 2 +- src/library/scala/collection/parallel/ParSeqLike.scala | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/library/scala/collection/TraversableLike.scala b/src/library/scala/collection/TraversableLike.scala index 5f193eb211..8b430ca3d2 100644 --- a/src/library/scala/collection/TraversableLike.scala +++ b/src/library/scala/collection/TraversableLike.scala @@ -77,7 +77,7 @@ trait TraversableLike[+A, +Repr] extends Any import Traversable.breaks._ /** The type implementing this traversable */ - protected type Self = Repr + protected[this] type Self = Repr /** The collection of type $coll underlying this `TraversableLike` object. * By default this is implemented as the `TraversableLike` object itself, diff --git a/src/library/scala/collection/generic/GenericClassTagCompanion.scala b/src/library/scala/collection/generic/GenericClassTagCompanion.scala index a587bbf544..76c12d118e 100644 --- a/src/library/scala/collection/generic/GenericClassTagCompanion.scala +++ b/src/library/scala/collection/generic/GenericClassTagCompanion.scala @@ -19,7 +19,7 @@ import scala.reflect.ClassTag * @author Aleksandar Prokopec */ abstract class GenericClassTagCompanion[+CC[X] <: Traversable[X]] { - type Coll = CC[_] + protected[this] type Coll = CC[_] def newBuilder[A](implicit ord: ClassTag[A]): Builder[A, CC[A]] diff --git a/src/library/scala/collection/generic/GenericCompanion.scala b/src/library/scala/collection/generic/GenericCompanion.scala index 5b03f8e5c6..b966ce51db 100644 --- a/src/library/scala/collection/generic/GenericCompanion.scala +++ b/src/library/scala/collection/generic/GenericCompanion.scala @@ -24,7 +24,7 @@ import scala.language.higherKinds */ abstract class GenericCompanion[+CC[X] <: GenTraversable[X]] { /** The underlying collection type with unknown element type */ - type Coll = CC[_] + protected[this] type Coll = CC[_] /** The default builder for `$Coll` objects. * @tparam A the type of the ${coll}'s elements diff --git a/src/library/scala/collection/generic/GenericOrderedCompanion.scala b/src/library/scala/collection/generic/GenericOrderedCompanion.scala index a9a50a1c35..094912c75a 100644 --- a/src/library/scala/collection/generic/GenericOrderedCompanion.scala +++ b/src/library/scala/collection/generic/GenericOrderedCompanion.scala @@ -19,7 +19,7 @@ import scala.language.higherKinds * @since 2.8 */ abstract class GenericOrderedCompanion[+CC[X] <: Traversable[X]] { - type Coll = CC[_] + protected[this] type Coll = CC[_] def newBuilder[A](implicit ord: Ordering[A]): Builder[A, CC[A]] diff --git a/src/library/scala/collection/immutable/TrieIterator.scala b/src/library/scala/collection/immutable/TrieIterator.scala index ae427852d4..b0bd253359 100644 --- a/src/library/scala/collection/immutable/TrieIterator.scala +++ b/src/library/scala/collection/immutable/TrieIterator.scala @@ -46,7 +46,7 @@ private[collection] abstract class TrieIterator[+T](elems: Array[Iterable[T]]) e case x: HashSetCollision1[_] => x.ks.map(x => HashSet(x)).toArray }).asInstanceOf[Array[Iterable[T]]] - private type SplitIterators = ((Iterator[T], Int), Iterator[T]) + private[this] type SplitIterators = ((Iterator[T], Int), Iterator[T]) private def isTrie(x: AnyRef) = x match { case _: HashTrieMap[_,_] | _: HashTrieSet[_] => true diff --git a/src/library/scala/collection/parallel/ParSeqLike.scala b/src/library/scala/collection/parallel/ParSeqLike.scala index 201b624c72..da9abfcf5c 100644 --- a/src/library/scala/collection/parallel/ParSeqLike.scala +++ b/src/library/scala/collection/parallel/ParSeqLike.scala @@ -45,7 +45,7 @@ extends scala.collection.GenSeqLike[T, Repr] with ParIterableLike[T, Repr, Sequential] { self => - type SuperParIterator = IterableSplitter[T] + protected[this] type SuperParIterator = IterableSplitter[T] /** A more refined version of the iterator found in the `ParallelIterable` trait, * this iterator can be split into arbitrary subsets of iterators. -- cgit v1.2.3 From cbb88ac24e1ffe7dcf97ce4b7935493cc6f0b121 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Wed, 15 Jan 2014 11:45:33 +0100 Subject: [nomaster] Update MiMa and use new wildcard filter scala.reflect.internal._ now gets a free pass from binary compatibility checking. Previously, we had to excrutiatingly exclude violations individually. --- bincompat-backward.whitelist.conf | 217 +------ bincompat-forward.whitelist.conf | 1280 +------------------------------------ build.xml | 2 +- 3 files changed, 13 insertions(+), 1486 deletions(-) diff --git a/bincompat-backward.whitelist.conf b/bincompat-backward.whitelist.conf index 0500ec10ab..2d3c20370d 100644 --- a/bincompat-backward.whitelist.conf +++ b/bincompat-backward.whitelist.conf @@ -1,4 +1,7 @@ filter { + packages = [ + "scala.reflect.internal" + ] problems=[ # Scala library { @@ -61,136 +64,6 @@ filter { # problemName=IncompatibleResultTypeProblem # }, - - # scala.reflect.internal - { - matchName="scala.reflect.internal.TreeInfo.scala$reflect$internal$TreeInfo$$isVarPatternDeep0$1" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.TreeInfo.typeArguments" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.TreeInfo.applyDepth" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.TreeInfo.firstTypeArg" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.TreeInfo.methPart" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.TreeInfo.firstArgument" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Trees.DefDef" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.ExistentialsAndSkolems.deskolemizeTypeParams" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.deAlias" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.deskolemizeTypeParams" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.AnnotationInfos#Annotatable.addThrowsAnnotation" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.StdAttachments#Attachable.setAttachments" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types#TypeVar.scala$reflect$internal$Types$TypeVar$$addBound$1" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.AnnotationCheckers$AnnotationChecker" - problemName=IncompatibleTemplateDefProblem - }, - { - matchName="scala.reflect.internal.Types.deAlias" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types.inheritsJavaVarArgsMethod" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types.nonTrivialMembers" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types.isJavaVarargsAncestor" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types.nestedMemberType" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types.normalizeAliases" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Trees#ChangeOwnerTraverser.changeOwner" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.StdAttachments.SuppressMacroExpansionAttachment" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.Statistics#RelCounter.scala$reflect$internal$util$Statistics$RelCounter$$super$prefix" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Names#NameOps.name" - problemName=MissingFieldProblem - }, - { - matchName="scala.reflect.internal.ExistentialsAndSkolems.existentialTransform$default$3" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.ExistentialsAndSkolems.existentialTransform" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.ExistentialsAndSkolems.packSymbols" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.ExistentialsAndSkolems.packSymbols$default$3" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.ExistentialsAndSkolems.isRawParameter" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Trees.substituteInfoParamsIntoDefDef" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.ClassfileConstants.xxxunusedxxxx" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types#TypeVar.setInst" - problemName=IncompatibleResultTypeProblem - }, # scala.concurrent.forkjoin (SI-7442) { matchName="scala.concurrent.forkjoin.ForkJoinTask.internalGetCompleter" @@ -220,26 +93,6 @@ filter { matchName="scala.concurrent.forkjoin.ForkJoinPool.helpJoinOnce" problemName=IncompatibleResultTypeProblem }, - { - matchName="scala.reflect.internal.Definitions#DefinitionsClass.getClassMethods" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Definitions#DefinitionsClass.primitiveGetClassMethods" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.StdAttachments.unsuppressMacroExpansion" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.StdAttachments.suppressMacroExpansion" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.StdAttachments.isMacroExpansionSuppressed" - problemName=MissingMethodProblem - }, { matchName="scala.reflect.runtime.JavaUniverse.isInvalidClassName" problemName=MissingMethodProblem @@ -247,70 +100,6 @@ filter { { matchName="scala.reflect.runtime.SymbolLoaders.isInvalidClassName" problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types.uncheckedBounds" - problemName=MissingMethodProblem - } - { - matchName="scala.reflect.internal.Trees.scala$reflect$internal$Trees$$duplicator" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Trees.duplicateAndKeepPositions" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Trees.scala$reflect$internal$Trees$$duplicator" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.scala$reflect$internal$Trees$$duplicator" - problemName=IncompatibleResultTypeProblem - }, - { - matchName="scala.reflect.internal.StdNames.compactifyName" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet" - problemName=FinalClassProblem - }, - { - matchName="scala.reflect.internal.util.WeakReferenceWithEquals" - problemName=MissingClassProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.scala$reflect$internal$Types$$uniques" - problemName=IncompatibleResultTypeProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.scala$reflect$internal$Types$$uniques_=" - problemName=IncompatibleMethTypeProblem - }, - { - matchName="scala.reflect.internal.Types.scala$reflect$internal$Types$$uniques" - problemName=IncompatibleResultTypeProblem - }, - { - matchName="scala.reflect.internal.Types.scala$reflect$internal$Types$$uniques_=" - problemName=IncompatibleMethTypeProblem - }, - { - matchName="scala.reflect.internal.Types.scala$reflect$internal$Types$$uniques" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types.scala$reflect$internal$Types$$uniques_=" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.HasFlags.isDeferredOrDefault" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.HasFlags.isDeferredNotDefault" - problemName=MissingMethodProblem } ] } diff --git a/bincompat-forward.whitelist.conf b/bincompat-forward.whitelist.conf index 3b61a02bce..087fa07b37 100644 --- a/bincompat-forward.whitelist.conf +++ b/bincompat-forward.whitelist.conf @@ -1,4 +1,7 @@ filter { + packages = [ + "scala.reflect.internal" + ] problems=[ # rework d526f8bd74 to duplicate tailImpl as a private method # { @@ -98,339 +101,6 @@ filter { # problemName=MissingMethodProblem # }, - # scala.reflect.internal - { - matchName="scala.reflect.internal.Types#Type.dealiasWidenChain" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types#Type.dealiasWiden" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types#Type.addThrowsAnnotation" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types#TypeVar.scala$reflect$internal$Types$TypeVar$$unifySpecific$1" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types#SubstSymMap.mapTreeSymbols" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types#SubstSymMap.this" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.PrivateWithin" - problemName=MissingClassProblem - }, - { - matchName="scala.reflect.internal.TreeInfo$Applied" - problemName=MissingClassProblem - }, - { - matchName="scala.reflect.internal.AnnotationInfos#Annotatable.addThrowsAnnotation" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types.inheritsJavaVarArgsMethod" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types.nonTrivialMembers" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types.isJavaVarargsAncestor" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types.normalizeAliases" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types.nestedMemberType" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types.deAlias" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.ExistentialsAndSkolems.deskolemizeTypeParams" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.StdAttachments#Attachable.setAttachments" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.AnnotationInfos#AnnotationInfo.completeInfo" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Symbols#Symbol.isCompileTimeOnly" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Symbols#Symbol.addThrowsAnnotation" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Symbols#Symbol.toOption" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Symbols#Symbol.compileTimeOnlyMessage" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Symbols#Symbol.setAttachments" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Symbols#Symbol.addAnnotation" - problemName=IncompatibleMethTypeProblem - }, - { - matchName="scala.reflect.internal.Trees.DefDef" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Trees$TreeStackTraverser" - problemName=MissingClassProblem - }, - { - matchName="scala.reflect.internal.Trees#ChangeOwnerTraverser.change" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.AnnotationCheckers$AnnotationChecker" - problemName=IncompatibleTemplateDefProblem - }, - { - matchName="scala.reflect.internal.TreeInfo$Applied$" - problemName=MissingClassProblem - }, - { - matchName="scala.reflect.internal.Trees#Tree.setAttachments" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.StdNames#TermNames.DEFAULT_CASE" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.TreeInfo.Applied" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.TreeInfo.isWildcardStarType" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.TreeInfo.isSyntheticDefaultCase" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.TreeInfo.StripCast" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.TreeInfo.dissectApplied" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.TreeInfo.stripCast" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable" - problemName=MissingTypesProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.StringContextStripMarginOps" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.inheritsJavaVarArgsMethod" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.assertCorrectThread" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.SuppressMacroExpansionAttachment" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.nonTrivialMembers" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.isJavaVarargsAncestor" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.normalizeAliases" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.DefDef" - problemName=IncompatibleMethTypeProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.nestedMemberType" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.importPrivateWithinFromJavaFlags" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.StdAttachments.SuppressMacroExpansionAttachment" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Definitions#DefinitionsClass.ArrayModule_genericApply" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Definitions#DefinitionsClass.allParameters" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Definitions#DefinitionsClass.Predef_wrapArray" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Definitions#DefinitionsClass.dropNullaryMethod" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Definitions#DefinitionsClass.ArrayModule_apply" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Definitions#DefinitionsClass.OptionModule" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Definitions#DefinitionsClass.Option_apply" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Definitions#DefinitionsClass.CompileTimeOnlyAttr" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.AnnotationInfos#LazyAnnotationInfo.completeInfo" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.package" - problemName=MissingClassProblem - }, - { - matchName="scala.reflect.internal.util.package$" - problemName=MissingClassProblem - }, - { - matchName="scala.reflect.internal.util.StripMarginInterpolator" - problemName=MissingClassProblem - }, - { - matchName="scala.reflect.internal.util.package$StringContextStripMarginOps" - problemName=MissingClassProblem - }, - { - matchName="scala.reflect.internal.annotations.compileTimeOnly" - problemName=MissingClassProblem - }, - { - matchName="scala.reflect.internal.StdNames#TermNames.SelectFromTypeTree" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.ExistentialsAndSkolems.existentialTransform$default$3" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.ExistentialsAndSkolems.existentialTransform" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.ExistentialsAndSkolems.packSymbols" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.ExistentialsAndSkolems.packSymbols$default$3" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.ExistentialsAndSkolems.isRawParameter" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Trees.substituteInfoParamsIntoDefDef" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.existentialTransform$default$3" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.existentialTransform" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.substituteInfoParamsIntoDefDef" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.packSymbols" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.packSymbols$default$3" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.isRawParameter" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.ClassfileConstants.CONSTANT_INVOKEDYNAMIC" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.ClassfileConstants.invokedynamic" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.ClassfileConstants.CONSTANT_METHODHANDLE" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.ClassfileConstants.CONSTANT_METHODTYPE" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types#TypeVar.setInst" - problemName=IncompatibleResultTypeProblem - }, - { - matchName="scala.reflect.internal.TreeInfo.effectivePatternArity" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.ModifierFlags.DEFAULTMETHOD" - problemName=MissingMethodProblem - }, # scala.concurrent.forkjoin (SI-7442) { matchName="scala.concurrent.forkjoin.ForkJoinPool.registerWorker" @@ -481,960 +151,28 @@ filter { problemName=MissingMethodProblem }, { - matchName="scala.reflect.internal.Definitions#DefinitionsClass.getClassMethods" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Definitions#DefinitionsClass.primitiveGetClassMethods" + matchName="scala.reflect.runtime.JavaMirrors#JavaMirror#FromJavaClassCompleter.scala$reflect$runtime$JavaMirrors$JavaMirror$FromJavaClassCompleter$$enterEmptyCtorIfNecessary$1" problemName=MissingMethodProblem }, { - matchName="scala.reflect.internal.StdAttachments.unsuppressMacroExpansion" + matchName="scala.reflect.runtime.ReflectionUtils.scalacShouldntLoadClass" problemName=MissingMethodProblem }, { - matchName="scala.reflect.internal.StdAttachments.suppressMacroExpansion" + matchName="scala.reflect.runtime.ReflectionUtils.scalacShouldntLoadClassfile" problemName=MissingMethodProblem }, { - matchName="scala.reflect.internal.StdAttachments.isMacroExpansionSuppressed" + matchName="scala.reflect.runtime.ReflectionUtils.isTraitImplementation" problemName=MissingMethodProblem }, { - matchName="scala.reflect.internal.SymbolTable.unsuppressMacroExpansion" + matchName="scala.reflect.runtime.JavaMirrors#JavaMirror.scala$reflect$runtime$JavaMirrors$JavaMirror$$PackageAndClassPattern" problemName=MissingMethodProblem }, { - matchName="scala.reflect.internal.SymbolTable.suppressMacroExpansion" + matchName="scala.reflect.runtime.SymbolLoaders.isInvalidClassName" problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.isMacroExpansionSuppressed" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.runtime.JavaMirrors#JavaMirror#FromJavaClassCompleter.scala$reflect$runtime$JavaMirrors$JavaMirror$FromJavaClassCompleter$$enterEmptyCtorIfNecessary$1" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.runtime.ReflectionUtils.scalacShouldntLoadClass" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.runtime.ReflectionUtils.scalacShouldntLoadClassfile" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.runtime.ReflectionUtils.isTraitImplementation" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.runtime.SymbolLoaders.isInvalidClassName" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.uncheckedBounds" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types.uncheckedBounds" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Definitions#DefinitionsClass.UncheckedBoundsClass" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.annotations.uncheckedBounds" - problemName=MissingClassProblem - } - { - matchName="scala.reflect.internal.Trees$Duplicator" - problemName=MissingClassProblem - }, - { - matchName="scala.reflect.internal.Trees.duplicateAndKeepPositions" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Trees.scala$reflect$internal$Trees$$duplicator" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Trees.scala$reflect$internal$Trees$$duplicator" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.duplicateAndKeepPositions" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.scala$reflect$internal$Trees$$duplicator" - problemName=IncompatibleResultTypeProblem - }, - { - matchName="scala.reflect.runtime.JavaMirrors#JavaMirror.scala$reflect$runtime$JavaMirrors$JavaMirror$$PackageAndClassPattern" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.compactifyName" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.StdNames.compactifyName" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet$Diagnostics" - problemName=MissingClassProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet$Entry" - problemName=MissingClassProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet$" - problemName=MissingClassProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet" - problemName=MissingTypesProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.newBuilder" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.min" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.initialCapacity" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.foldLeft" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.toIterable" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.toIterable" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.union" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.union" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.groupBy" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.groupBy" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.toSet" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.toSet" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.toSeq" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.toSeq" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.toIndexedSeq" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.unzip3" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.nonEmpty" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.slice" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.max" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.addString" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.addString" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.addString" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.subsetOf" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.fold" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.toIterator" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.foreach" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.flatten" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.headOption" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.mapResult" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.scala$reflect$internal$util$WeakHashSet$$bucketFor" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.toTraversable" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.toTraversable" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.filter" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.tails" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.last" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.collect" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.takeRight" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.lastOption" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.reduceRightOption" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.+" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.+" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.+" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.+" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.+" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.+" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.take" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.zipWithIndex" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.foldRight" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.hasDefiniteSize" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.<<" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.sliceWithKnownBound" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.to" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.result" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.result" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.isTraversableAgain" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.add" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.partition" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.toBuffer" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.update" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.view" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.view" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.view" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.view" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.tail" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.zipAll" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.retain" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.find" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.withFilter" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.init" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.findEntryOrUpdate" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.diagnostics" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.zip" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.drop" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.:\\" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.companion" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.toMap" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.toMap" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.genericBuilder" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.unzip" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.seq" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.seq" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.seq" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.seq" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.seq" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.seq" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.seq" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.&~" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.toStream" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.-=" - problemName=IncompatibleResultTypeProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.-=" - problemName=IncompatibleResultTypeProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.-=" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.splitAt" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.addEntry" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.aggregate" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.parCombiner" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.maxBy" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.sliding" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.sliding" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.repr" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.repr" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.scan" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.span" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.toArray" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.findEntry" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.toVector" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.scala$collection$SetLike$$super$map" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.dropWhile" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.forall" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.reduce" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.intersect" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.this" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.--=" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.loadFactor" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.copyToArray" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.copyToArray" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.copyToArray" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.canEqual" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.inits" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.sliceWithKnownDelta" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.grouped" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.minBy" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet./:" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.--" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.--" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.sameElements" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.par" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.equals" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.sizeHint" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.sizeHint" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.sizeHint" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet./:\\" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.threshhold_=" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.++" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.++" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.++" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.map" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.clone" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.clone" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.diff" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.diff" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.isEmpty" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.&" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.head" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.toCollection" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.toCollection" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.++:" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.++:" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.mkString" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.mkString" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.mkString" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.threshhold" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.iterator" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.toList" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.-" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.-" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.-" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.-" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.-" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.-" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.-" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.++=" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.takeWhile" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.exists" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.scanRight" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.transpose" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.sizeHintBounded" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.hashCode" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.scala$collection$mutable$Cloneable$$super$clone" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.remove" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.|" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.reduceLeft" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.count" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.scanLeft" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.reduceLeftOption" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.dropRight" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.collectFirst" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.flatMap" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.+=" - problemName=IncompatibleResultTypeProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.+=" - problemName=IncompatibleResultTypeProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.+=" - problemName=IncompatibleResultTypeProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.+=" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.reversed" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.sum" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.filterNot" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.product" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.thisCollection" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.thisCollection" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.copyToBuffer" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.subsets" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.subsets" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.reduceRight" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.empty" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.empty" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.empty" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.stringPrefix" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.util.WeakHashSet.reduceOption" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.scala$reflect$internal$Types$$uniques" - problemName=IncompatibleResultTypeProblem - }, - { - matchName="scala.reflect.internal.SymbolTable.scala$reflect$internal$Types$$uniques_=" - problemName=IncompatibleMethTypeProblem - }, - { - matchName="scala.reflect.internal.Types.scala$reflect$internal$Types$$uniques" - problemName=IncompatibleResultTypeProblem - }, - { - matchName="scala.reflect.internal.Types.scala$reflect$internal$Types$$uniques_=" - problemName=IncompatibleMethTypeProblem - }, - { - matchName="scala.reflect.internal.Types.scala$reflect$internal$Types$$uniques" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Types.scala$reflect$internal$Types$$uniques_=" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Symbols#Symbol.isDeferredOrDefault" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Symbols#Symbol.isDeferredNotDefault" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.HasFlags.isDeferredOrDefault" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.HasFlags.isDeferredNotDefault" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Trees#Modifiers.isDeferredOrDefault" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Trees#Modifiers.isDeferredNotDefault" - problemName=MissingMethodProblem - }, - { - matchName="scala.reflect.internal.Symbols#Symbol.rawInfoIsNoType" - problemName=MissingMethodProblem } ] } diff --git a/build.xml b/build.xml index 39685163a6..a54b033b01 100644 --- a/build.xml +++ b/build.xml @@ -1605,7 +1605,7 @@ TODO: - + -- cgit v1.2.3 From ff137422794a3da002bcad9b67afd3ef02fceaa1 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Tue, 14 Jan 2014 12:15:44 +0100 Subject: [nomaster] SI-8146 Fix non-deterministic <:< for deeply nested types Backported from master. This is a squashed commmit comprising: SI-8146 Pending test, diagnosis for bug in decidability of <:< (cherry picked from commit 8beeef339ad65f3308ece6fb0440cdb31b1ad404) SI-8146 Test cases for typechecking decidability Taken from "On Decidability of Nominal Subtyping with Variance" (Pierce, Kennedy), which was implemented in 152563b. Part of the implementation (SubTypePair) will be changed in the following commit to fix the non-deterministic errors typechecking heavily nested types involving aliases or annotations. (cherry picked from commit 2e28cf7f76c3d5fd0c2df4274f1af9acb42de699) SI-8146 Fix non-deterministic <:< for deeply nested types In the interests of keeping subtyping decidable [1], 152563b added some bookkeeping to `isSubType` to detect cycles. However, this was based on a hash set containing instances of `SubTypePair`, and that class had inconsistencies between its `hashCode` (in terms of `Type#hashCode`) and `equals` (in terms of `=:=`). This inconsistency can be seen in: scala> trait C { def apply: (Int @unchecked) } defined trait C scala> val intUnchecked = typeOf[C].decls.head.info.finalResultType intUnchecked: $r.intp.global.Type = Int @unchecked scala> val p1 = new SubTypePair(intUnchecked, intUnchecked) p1: $r.intp.global.SubTypePair = Int @unchecked <: val p2 = new SubTypePair(intUnchecked.withoutAnnotations, intUnchecked.withoutAnnotations) p2: $r.intp.global.SubTypePair = Int <: p1 == p2 res0: Boolean = true scala> p1.hashCode == p2.hashCode res1: Boolean = false This commit switches to using `Type#==`, by way of the standard case class equality. The risk here is that you could find a subtyping computation that progresses in such a manner that we don't detect the cycle. It would need to produce an infinite stream of representations for types that were `=:=` but not `==`. If that happened, we'd fail to terminate, rather than judging the relationship as `false`. [1] http://research.microsoft.com/pubs/64041/fool2007.pdf (cherry picked from commit a09e143b7fd1c6b433386d45e9c5ae3548819b59) Conflicts: src/reflect/scala/reflect/internal/tpe/TypeComparers.scala src/reflect/scala/reflect/runtime/JavaUniverseForce.scala --- src/reflect/scala/reflect/internal/Types.scala | 35 ++++-------- test/files/neg/t8146-non-finitary-2.check | 9 +++ test/files/neg/t8146-non-finitary-2.scala | 8 +++ test/files/neg/t8146-non-finitary.check | 9 +++ test/files/neg/t8146-non-finitary.scala | 7 +++ test/files/pos/t8146a.scala | 9 +++ test/files/pos/t8146b.scala | 77 ++++++++++++++++++++++++++ 7 files changed, 129 insertions(+), 25 deletions(-) create mode 100644 test/files/neg/t8146-non-finitary-2.check create mode 100644 test/files/neg/t8146-non-finitary-2.scala create mode 100644 test/files/neg/t8146-non-finitary.check create mode 100644 test/files/neg/t8146-non-finitary.scala create mode 100644 test/files/pos/t8146a.scala create mode 100644 test/files/pos/t8146b.scala diff --git a/src/reflect/scala/reflect/internal/Types.scala b/src/reflect/scala/reflect/internal/Types.scala index c684f4d690..2f49995030 100644 --- a/src/reflect/scala/reflect/internal/Types.scala +++ b/src/reflect/scala/reflect/internal/Types.scala @@ -5230,30 +5230,15 @@ trait Types extends api.Types { self: SymbolTable => } } - class SubTypePair(val tp1: Type, val tp2: Type) { - override def hashCode = tp1.hashCode * 41 + tp2.hashCode - override def equals(other: Any) = other match { - case stp: SubTypePair => - // suspend TypeVars in types compared by =:=, - // since we don't want to mutate them simply to check whether a subtype test is pending - // in addition to making subtyping "more correct" for type vars, - // it should avoid the stackoverflow that's been plaguing us (https://groups.google.com/d/topic/scala-internals/2gHzNjtB4xA/discussion) - // this method is only called when subtyping hits a recursion threshold (subsametypeRecursions >= LogPendingSubTypesThreshold) - def suspend(tp: Type) = - if (tp.isGround) null else suspendTypeVarsInType(tp) - def revive(suspension: List[TypeVar]) = - if (suspension ne null) suspension foreach (_.suspended = false) - - val suspensions = Array(tp1, stp.tp1, tp2, stp.tp2) map suspend - - val sameTypes = (tp1 =:= stp.tp1) && (tp2 =:= stp.tp2) - - suspensions foreach revive - - sameTypes - case _ => - false - } + final case class SubTypePair(tp1: Type, tp2: Type) { + // SI-8146 we used to implement equality here in terms of pairwise =:=. + // But, this was inconsistent with hashCode, which was based on the + // Type#hashCode, based on the structure of types, not the meaning. + // Now, we use `Type#{equals,hashCode}` as the (consistent) basis for + // detecting cycles (aka keeping subtyping decidable.) + // + // I added tests to show that we detect the cycle: neg/t8146-no-finitary* + override def toString = tp1+" <: if (subsametypeRecursions >= LogPendingSubTypesThreshold) { val p = new SubTypePair(tp1, tp2) if (pendingSubTypes(p)) - false + false // see neg/t8146-no-finitary* else try { pendingSubTypes += p diff --git a/test/files/neg/t8146-non-finitary-2.check b/test/files/neg/t8146-non-finitary-2.check new file mode 100644 index 0000000000..8c2e1436c2 --- /dev/null +++ b/test/files/neg/t8146-non-finitary-2.check @@ -0,0 +1,9 @@ +t8146-non-finitary-2.scala:5: error: class graph is not finitary because type parameter X is expansively recursive +trait C[X] extends N[N[C[D[X]]]] + ^ +t8146-non-finitary-2.scala:7: error: type mismatch; + found : C[Int] + required: N[C[Int]] + def foo(c: C[Int]): N[C[Int]] = c + ^ +two errors found diff --git a/test/files/neg/t8146-non-finitary-2.scala b/test/files/neg/t8146-non-finitary-2.scala new file mode 100644 index 0000000000..c12f5f8f49 --- /dev/null +++ b/test/files/neg/t8146-non-finitary-2.scala @@ -0,0 +1,8 @@ +// Example 3 from "On Decidability of Nominal Subtyping with Variance" (Pierce, Kennedy) +// http://research.microsoft.com/pubs/64041/fool2007.pdf +trait N[-Z] +trait D[Y] +trait C[X] extends N[N[C[D[X]]]] +object Test { + def foo(c: C[Int]): N[C[Int]] = c +} diff --git a/test/files/neg/t8146-non-finitary.check b/test/files/neg/t8146-non-finitary.check new file mode 100644 index 0000000000..8363b750ca --- /dev/null +++ b/test/files/neg/t8146-non-finitary.check @@ -0,0 +1,9 @@ +t8146-non-finitary.scala:4: error: class graph is not finitary because type parameter A is expansively recursive +trait C[A] extends N[N[C[C[A]]]] + ^ +t8146-non-finitary.scala:6: error: type mismatch; + found : C[Int] + required: N[C[Int]] + def foo(c: C[Int]): N[C[Int]] = c + ^ +two errors found diff --git a/test/files/neg/t8146-non-finitary.scala b/test/files/neg/t8146-non-finitary.scala new file mode 100644 index 0000000000..3d8a3074c7 --- /dev/null +++ b/test/files/neg/t8146-non-finitary.scala @@ -0,0 +1,7 @@ +// Example 3 from "On Decidability of Nominal Subtyping with Variance" (Pierce, Kennedy) +// http://research.microsoft.com/pubs/64041/fool2007.pdf +trait N[-A] +trait C[A] extends N[N[C[C[A]]]] +object Test { + def foo(c: C[Int]): N[C[Int]] = c +} diff --git a/test/files/pos/t8146a.scala b/test/files/pos/t8146a.scala new file mode 100644 index 0000000000..e4eb8d3fd1 --- /dev/null +++ b/test/files/pos/t8146a.scala @@ -0,0 +1,9 @@ +trait M[+A] + +object Test { + type Inty = Int + def t1( + x: M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[Int @unchecked]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] + ): M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[Inty @unchecked]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] + = x +} diff --git a/test/files/pos/t8146b.scala b/test/files/pos/t8146b.scala new file mode 100644 index 0000000000..dd031f66c8 --- /dev/null +++ b/test/files/pos/t8146b.scala @@ -0,0 +1,77 @@ +// non-deterministic type errors, non-termination. +// seems to be due to inconsistent hashing/equality in SubTypePair + +import scala.language.{existentials, implicitConversions} +import scala.annotation.unchecked.uncheckedVariance + +trait Column[T] + +// Turning this into a trait reduces (eliminates?) the likelihood of type errors (but not of non-termination) +abstract class Shape[Level <: ShapeLevel, -Mixed_, Unpacked_, Packed_] + +trait ShapeLevel +trait NestedShapeLevel extends ShapeLevel +trait FlatShapeLevel extends NestedShapeLevel +trait ColumnsShapeLevel extends FlatShapeLevel + +trait ProvenShape[U] + +object ProvenShape { + implicit def proveShapeOf[T, U](v: T)(implicit sh: Shape[_ <: FlatShapeLevel, T, U, _]): ProvenShape[U] = ??? +} + +sealed abstract class HList { + type Self <: HList + type :: [E] = HCons[E, Self] + final def :: [E](elem: E): :: [E] = ??? +} + +final class HCons[+H, +T <: HList](val head: H, val tail: T) extends HList { + type Self = HCons[H @uncheckedVariance, T @uncheckedVariance] +} + +final object HNil extends HList { + type Self = HNil.type +} + +// Success is more likely when not using these aliases +object syntax { + type :: [+H, +T <: HList] = HCons[H, T] + type HNil = HNil.type +} + +class HListBench { + + import syntax._ + + implicit def columnShape[T, Level <: ShapeLevel]: Shape[Level, Column[T], T, Column[T]] = ??? + implicit def provenShape[T, P](implicit shape: Shape[_ <: FlatShapeLevel, T, _, P]): Shape[FlatShapeLevel, ProvenShape[T], T, P] = ??? + final class HListShape[Level <: ShapeLevel, M <: HList, U <: HList, P <: HList](val shapes: Seq[Shape[_ <: ShapeLevel, _, _, _]]) extends Shape[Level, M, U, P] + implicit def hnilShape[Level <: ShapeLevel] = new HListShape[Level, HNil.type, HNil.type, HNil.type](Nil) + implicit def hconsShape[Level <: ShapeLevel, M1, M2 <: HList, U1, U2 <: HList, P1, P2 <: HList] + (implicit s1: Shape[_ <: Level, M1, U1, P1], s2: HListShape[_ <: Level, M2, U2, P2]) = + new HListShape[Level, M1 :: M2, U1 :: U2, P1 :: P2](s1 +: s2.shapes) + + trait A[T] { + def * : ProvenShape[T] + } + + trait B extends A[ + Int :: Int :: Int :: Int :: Int :: + Int :: Int :: Int :: Int :: Int :: + Int :: Int :: Int :: Int :: Int :: + Int :: Int :: Int :: Int :: Int :: + Int :: Int :: Int :: Int :: Int :: + Int :: Int :: HNil ] { + + def c: Column[Int] + + def * = c :: c :: c :: c :: c :: + c :: c :: c :: c :: c :: + c :: c :: c :: c :: c :: + c :: c :: c :: c :: c :: + c :: c :: c :: c :: c :: + c :: c :: HNil + + } +} -- cgit v1.2.3 From d167f142e8a2f4eb450c86e67d71e9199a360799 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Sun, 26 Jan 2014 11:32:42 +0300 Subject: [nomaster] corrects an error in reify’s documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/reflect/scala/reflect/api/Universe.scala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/reflect/scala/reflect/api/Universe.scala b/src/reflect/scala/reflect/api/Universe.scala index 4928b8bb38..15fa11c6cf 100644 --- a/src/reflect/scala/reflect/api/Universe.scala +++ b/src/reflect/scala/reflect/api/Universe.scala @@ -75,14 +75,14 @@ abstract class Universe extends Symbols with Printers with Importers { - /** Use `refiy` to produce the abstract syntax tree representing a given Scala expression. + /** Use `reify` to produce the abstract syntax tree representing a given Scala expression. * * For example: * * {{{ - * val five = reify{ 5 } // Literal(Constant(5)) - * reify{ 2 + 4 } // Apply( Select( Literal(Constant(2)), newTermName("\$plus")), List( Literal(Constant(4)) ) ) - * reify{ five.splice + 4 } // Apply( Select( Literal(Constant(5)), newTermName("\$plus")), List( Literal(Constant(4)) ) ) + * val five = reify{ 5 } // Literal(Constant(5)) + * reify{ 5.toString } // Apply(Select(Literal(Constant(5)), TermName("toString")), List()) + * reify{ five.splice.toString } // Apply(Select(five, TermName("toString")), List()) * }}} * * The produced tree is path dependent on the Universe `reify` was called from. @@ -93,4 +93,4 @@ abstract class Universe extends Symbols // implementation is hardwired to `scala.reflect.reify.Taggers` // using the mechanism implemented in `scala.tools.reflect.FastTrack` def reify[T](expr: T): Expr[T] = ??? // macro -} \ No newline at end of file +} -- cgit v1.2.3 From 8ee165c2d4590cec8ce585b7047c752b7f17aef6 Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Wed, 29 Jan 2014 11:24:25 -0800 Subject: SI-8205 [nomaster] backport test pos.lineContent Verifies previous behavior. --- .../reflect/internal/util/SourceFileTest.scala | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 test/junit/scala/reflect/internal/util/SourceFileTest.scala diff --git a/test/junit/scala/reflect/internal/util/SourceFileTest.scala b/test/junit/scala/reflect/internal/util/SourceFileTest.scala new file mode 100644 index 0000000000..fd24d0a229 --- /dev/null +++ b/test/junit/scala/reflect/internal/util/SourceFileTest.scala @@ -0,0 +1,58 @@ +package scala.reflect.internal.util + +import org.junit.Assert._ +import org.junit.Test +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 + +@RunWith(classOf[JUnit4]) +class SourceFileTest { + def lineContentOf(code: String, offset: Int) = + new OffsetPosition(new BatchSourceFile("", code), offset).lineContent + //Position.offset(new BatchSourceFile("", code), offset).lineContent + + /* + @Test + def si8205_overflow(): Unit = { + val file = new BatchSourceFile("", "code no newline") + // the bug in lineToString counted until MaxValue, and the AIOOBE came from here + assertFalse(file.isEndOfLine(Int.MaxValue)) + } + */ + + @Test + def si8205_lineToString(): Unit = { + assertEquals("", lineContentOf("", 0)) + assertEquals("abc", lineContentOf("abc", 0)) + assertEquals("abc", lineContentOf("abc", 3)) + assertEquals("code no newline", lineContentOf("code no newline", 1)) + assertEquals("", lineContentOf("\n", 0)) + assertEquals("abc", lineContentOf("abc\ndef", 0)) + assertEquals("abc", lineContentOf("abc\ndef", 3)) + assertEquals("def", lineContentOf("abc\ndef", 4)) + assertEquals("def", lineContentOf("abc\ndef", 6)) + assertEquals("def", lineContentOf("abc\ndef\n", 7)) + } + + @Test + def CRisEOL(): Unit = { + assertEquals("", lineContentOf("\r", 0)) + assertEquals("abc", lineContentOf("abc\rdef", 0)) + assertEquals("abc", lineContentOf("abc\rdef", 3)) + assertEquals("def", lineContentOf("abc\rdef", 4)) + assertEquals("def", lineContentOf("abc\rdef", 6)) + assertEquals("def", lineContentOf("abc\rdef\r", 7)) + } + + @Test + def CRNLisEOL(): Unit = { + assertEquals("", lineContentOf("\r\n", 0)) + assertEquals("abc", lineContentOf("abc\r\ndef", 0)) + assertEquals("abc", lineContentOf("abc\r\ndef", 3)) + assertEquals("abc", lineContentOf("abc\r\ndef", 4)) + assertEquals("def", lineContentOf("abc\r\ndef", 5)) + assertEquals("def", lineContentOf("abc\r\ndef", 7)) + assertEquals("def", lineContentOf("abc\r\ndef", 8)) + assertEquals("def", lineContentOf("abc\r\ndef\r\n", 9)) + } +} -- cgit v1.2.3 From 5f4011ef2969e4c4ac93f570bef45e9afb65bb9a Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Wed, 9 Oct 2013 13:10:28 +0200 Subject: [backport] SI-7902 Fix spurious kind error due to an unitialized symbol Tracked down this error: is invariant, but type Y2 is declared covariant 's bounds are stricter than type X2's declared bounds >: Nothing <: Any, 's bounds are stricter than type Y2's declared bounds >: Nothing <: Any to `Symbol#typeParams` returning `List(NoSymbol)` if the symbol was not initialized. This happends in the enclosed test for: // checkKindBoundsHK() hkArgs = List(type M3) hkParams = List(type M2) This commit forces the symbol of the higher-kinded type argument before checking kind conformance. A little backstory: The `List(NoSymbol)` arises from: class PolyTypeCompleter... { // @M. If `owner` is an abstract type member, `typeParams` are all NoSymbol (see comment in `completerOf`), // otherwise, the non-skolemized (external) type parameter symbols override val typeParams = tparams map (_.symbol) The variation that triggers this problem gets into the kind conformance checks quite early on, during naming of: private[this] val x = ofType[InSeq] The inferred type of which is forced during: def addDerivedTrees(typer: Typer, stat: Tree): List[Tree] = stat match { case vd @ ValDef(mods, name, tpt, rhs) if !noFinishGetterSetter(vd) => // If we don't save the annotations, they seem to wander off. val annotations = stat.symbol.initialize.annotations (cherry picked from commit 03a06e02483eaf442158339c2edd6bcfd99847a3) --- src/reflect/scala/reflect/internal/Kinds.scala | 3 ++- test/files/pos/t7902.scala | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 test/files/pos/t7902.scala diff --git a/src/reflect/scala/reflect/internal/Kinds.scala b/src/reflect/scala/reflect/internal/Kinds.scala index 08686832ef..3ab7b20ecd 100644 --- a/src/reflect/scala/reflect/internal/Kinds.scala +++ b/src/reflect/scala/reflect/internal/Kinds.scala @@ -184,6 +184,7 @@ trait Kinds { ) } else { + hkarg.initialize // SI-7902 otherwise hkarg.typeParams yields List(NoSymbol)! debuglog("checkKindBoundsHK recursing to compare params of "+ hkparam +" with "+ hkarg) kindErrors ++= checkKindBoundsHK( hkarg.typeParams, @@ -229,4 +230,4 @@ trait Kinds { } } } -} \ No newline at end of file +} diff --git a/test/files/pos/t7902.scala b/test/files/pos/t7902.scala new file mode 100644 index 0000000000..47c525c179 --- /dev/null +++ b/test/files/pos/t7902.scala @@ -0,0 +1,17 @@ +import scala.language.higherKinds + +object Bug { + class Tag[W[M1[X1]]] + + def ofType[W[M2[X2]]]: Tag[W] = ??? + type InSeq [M3[X3]] = Some[M3[Any]] + + // fail + val x = ofType[InSeq] + + // okay + val y: Any = ofType[InSeq] + object T { + val z = ofType[InSeq] + } +} -- cgit v1.2.3 From db300d4d9e3eb1de4245ad3aeb686eb5302ae152 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Sat, 31 Aug 2013 21:44:34 +0200 Subject: [backport] no longer warns on calls to vampire macros As eloquently elaborated and cleverly named by Travis Brown, macros defined in structural types are useful: http://meta.plasm.us/posts/2013/07/12/vampire-methods-for-structural-types/. However, since such macros are on the intersection of a number of language features, as usual, there are bugs. This commit fixes an unwanted interaction of macros defined in structural types with the scala.language.reflectiveCalls guard. Since macro calls aren't going to be carried to runtime, there's no need to warn about them. --- .../scala/tools/nsc/typechecker/Typers.scala | 2 +- test/files/run/macro-vampire-false-warning.check | 2 + test/files/run/macro-vampire-false-warning.flags | 1 + .../run/macro-vampire-false-warning/Macros_1.scala | 52 ++++++++++++++++++++++ .../run/macro-vampire-false-warning/Test_2.scala | 6 +++ 5 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 test/files/run/macro-vampire-false-warning.check create mode 100644 test/files/run/macro-vampire-false-warning.flags create mode 100644 test/files/run/macro-vampire-false-warning/Macros_1.scala create mode 100644 test/files/run/macro-vampire-false-warning/Test_2.scala diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index e09a509839..8153766784 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -4934,7 +4934,7 @@ trait Typers extends Modes with Adaptations with Tags { if (tree.isInstanceOf[PostfixSelect]) checkFeature(tree.pos, PostfixOpsFeature, name.decode) - if (tree1.symbol != null && tree1.symbol.isOnlyRefinementMember) + if (tree1.symbol != null && tree1.symbol.isOnlyRefinementMember && !tree1.symbol.isMacro) checkFeature(tree1.pos, ReflectiveCallsFeature, tree1.symbol.toString) if (qual1.hasSymbolWhich(_.isRootPackage)) treeCopy.Ident(tree1, name) diff --git a/test/files/run/macro-vampire-false-warning.check b/test/files/run/macro-vampire-false-warning.check new file mode 100644 index 0000000000..4792e70f33 --- /dev/null +++ b/test/files/run/macro-vampire-false-warning.check @@ -0,0 +1,2 @@ +2 +3 diff --git a/test/files/run/macro-vampire-false-warning.flags b/test/files/run/macro-vampire-false-warning.flags new file mode 100644 index 0000000000..e8fb65d50c --- /dev/null +++ b/test/files/run/macro-vampire-false-warning.flags @@ -0,0 +1 @@ +-Xfatal-warnings \ No newline at end of file diff --git a/test/files/run/macro-vampire-false-warning/Macros_1.scala b/test/files/run/macro-vampire-false-warning/Macros_1.scala new file mode 100644 index 0000000000..a1c40a5510 --- /dev/null +++ b/test/files/run/macro-vampire-false-warning/Macros_1.scala @@ -0,0 +1,52 @@ +// As per http://meta.plasm.us/posts/2013/08/31/feeding-our-vampires/ + +import scala.annotation.StaticAnnotation +import scala.reflect.macros.Context +import scala.language.experimental.macros + +class body(tree: Any) extends StaticAnnotation + +object Macros { + def selFieldImpl(c: Context) = { + import c.universe._ + val field = c.macroApplication.symbol + val bodyAnn = field.annotations.filter(_.tpe <:< typeOf[body]).head + c.Expr[Any](bodyAnn.scalaArgs.head) + } + + def mkObjectImpl(c: Context)(xs: c.Expr[Any]*) = { + import c.universe._ + import Flag._ + // val kvps = xs.toList map { case q"${_}(${Literal(Constant(name: String))}).->[${_}]($value)" => name -> value } + val kvps = xs.map(_.tree).toList map { case Apply(TypeApply(Select(Apply(_, List(Literal(Constant(name: String)))), _), _), List(value)) => name -> value } + // val fields = kvps map { case (k, v) => q"@body($v) def ${TermName(k)} = macro Macros.selFieldImpl" } + val fields = kvps map { case (k, v) => DefDef( + Modifiers(MACRO, tpnme.EMPTY, List(Apply(Select(New(Ident(newTypeName("body"))), nme.CONSTRUCTOR), List(v)))), + newTermName(k), Nil, Nil, TypeTree(), Select(Ident(newTermName("Macros")), newTermName("selFieldImpl"))) } + // q"import scala.language.experimental.macros; class Workaround { ..$fields }; new Workaround{}" + c.Expr[Any](Block( + List( + Import(Select(Select(Ident(newTermName("scala")), newTermName("language")), newTermName("experimental")), List(ImportSelector(newTermName("macros"), 51, newTermName("macros"), 51))), + ClassDef( + NoMods, newTypeName("Workaround"), Nil, + Template( + List(Select(Ident(newTermName("scala")), newTypeName("AnyRef"))), emptyValDef, + DefDef( + NoMods, nme.CONSTRUCTOR, Nil, List(Nil), TypeTree(), + Block(List(Apply(Select(Super(This(tpnme.EMPTY), tpnme.EMPTY), nme.CONSTRUCTOR), List())), Literal(Constant(())))) + +: fields)), + ClassDef( + Modifiers(FINAL), newTypeName("$anon"), Nil, + Template( + List(Ident(newTypeName("Workaround"))), emptyValDef, + List( + DefDef( + NoMods, nme.CONSTRUCTOR, Nil, List(Nil), TypeTree(), + Block(List(Apply(Select(Super(This(tpnme.EMPTY), tpnme.EMPTY), nme.CONSTRUCTOR), List())), Literal(Constant(())))))))), + Apply(Select(New(Ident(newTypeName("$anon"))), nme.CONSTRUCTOR), List()))) + } +} + +object mkObject { + def apply(xs: Any*) = macro Macros.mkObjectImpl +} diff --git a/test/files/run/macro-vampire-false-warning/Test_2.scala b/test/files/run/macro-vampire-false-warning/Test_2.scala new file mode 100644 index 0000000000..6e44b68635 --- /dev/null +++ b/test/files/run/macro-vampire-false-warning/Test_2.scala @@ -0,0 +1,6 @@ +object Test extends App { + val foo = mkObject("x" -> "2", "y" -> 3) + println(foo.x) + println(foo.y) + // println(foo.z) => will result in a compilation error +} \ No newline at end of file -- cgit v1.2.3 From a16e0030821709011a6a3cbcb564969237711896 Mon Sep 17 00:00:00 2001 From: Grzegorz Kossakowski Date: Wed, 19 Mar 2014 12:29:39 +0100 Subject: Bump version to 2.10.5 for nightly builds. --- build.number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.number b/build.number index 7c027e7797..de2c2fb824 100644 --- a/build.number +++ b/build.number @@ -1,7 +1,7 @@ #Tue Sep 11 19:21:09 CEST 2007 version.major=2 version.minor=10 -version.patch=4 +version.patch=5 # This is the -N part of a version. if it's 0, it's dropped from maven versions. version.bnum=0 -- cgit v1.2.3