diff --git a/compile/api/SameAPI.scala b/compile/api/SameAPI.scala index 2dbe670e0..e4c3e6dfe 100644 --- a/compile/api/SameAPI.scala +++ b/compile/api/SameAPI.scala @@ -211,7 +211,7 @@ class SameAPI(tagsA: TypeVars, tagsB: TypeVars, includePrivate: Boolean, include def sameAnnotations(a: Seq[Annotation], b: Seq[Annotation]): Boolean = sameSeq(a, b)(sameAnnotation) def sameAnnotation(a: Annotation, b: Annotation): Boolean = - debug(sameSimpleType(a.base, b.base), "Annotation base type differed") && + debug(sameType(a.base, b.base), "Annotation base type differed") && debug(sameAnnotationArguments(a.arguments, b.arguments), "Annotation arguments differed (" + a + ") and (" + b + ")") def sameAnnotationArguments(a: Seq[AnnotationArgument], b: Seq[AnnotationArgument]): Boolean = argumentMap(a) == argumentMap(b) diff --git a/compile/api/ShowAPI.scala b/compile/api/ShowAPI.scala index 570d81117..cb8f4382c 100644 --- a/compile/api/ShowAPI.scala +++ b/compile/api/ShowAPI.scala @@ -214,7 +214,7 @@ trait ShowTypes // don't show inherited to avoid dealing with cycles concat(s.parents, t, " with ") + "\n{\n" + lines(s.declared, d) + "\n}" } - implicit def showAnnotated(implicit as: Show[Annotation], t: Show[SimpleType]): Show[Annotated] = + implicit def showAnnotated(implicit as: Show[Annotation], t: Show[Type]): Show[Annotated] = new Show[Annotated] { def show(a: Annotated) = spaced(a.annotations, as) + " " + t.show(a.baseType) } implicit def showProjection(implicit t: Show[SimpleType]): Show[Projection] = new Show[Projection] { def show(p: Projection) = t.show(p.prefix) + "#" + p.id } diff --git a/compile/interface/API.scala b/compile/interface/API.scala index 1a8644f7f..82aa32b2a 100644 --- a/compile/interface/API.scala +++ b/compile/interface/API.scala @@ -132,7 +132,7 @@ final class API(val global: Global, val callback: xsbti.AnalysisCallback) extend private def annotations(in: Symbol, as: List[AnnotationInfo]): Array[xsbti.api.Annotation] = as.toArray[AnnotationInfo].map(annotation(in,_)) private def annotation(in: Symbol, a: AnnotationInfo) = - new xsbti.api.Annotation(simpleType(in, a.atp), + new xsbti.api.Annotation(processType(in, a.atp), if(a.assocs.isEmpty) Array(new xsbti.api.AnnotationArgument("", a.args.mkString("(", ",", ")"))) // what else to do with a Tree? else a.assocs.map { case (name, value) => new xsbti.api.AnnotationArgument(name.toString, value.toString) }.toArray[xsbti.api.AnnotationArgument] ) diff --git a/compile/persist/APIFormats.scala b/compile/persist/APIFormats.scala index 5c5e23250..171ad7396 100644 --- a/compile/persist/APIFormats.scala +++ b/compile/persist/APIFormats.scala @@ -103,7 +103,7 @@ trait APIFormats extends FormatExtra p7( (td: TypeDeclaration) => (td.lowerBound, td.upperBound, td.typeParameters, td.name, td.access, td.modifiers, td.annotations))( new TypeDeclaration(_,_,_,_,_,_,_))(t,t,tps,n,acs,ms,ans) // cyclic with SimpleType - def formatAnnotation(implicit t: Format[SimpleType], af: Format[Array[AnnotationArgument]]): Format[Annotation] = + def formatAnnotation(implicit t: Format[Type], af: Format[Array[AnnotationArgument]]): Format[Annotation] = p2( (a: Annotation) => (a.base, a.arguments) )( (a,b) => new Annotation(a,b) )(t, af) implicit def formatAnnotationArgument(implicit sf: Format[String]): Format[AnnotationArgument] = @@ -209,9 +209,9 @@ class DefaultAPIFormats(implicit val references: References) extends APIFormats implicit lazy val df: Format[Definition] = lazyFormat( formatDefinition ) // Projection, Annotation, and Parameterized are cyclic with SimpleType - // Parameterized is also cyclic with Type + // Parameterized and Annotation are also cyclic with Type implicit lazy val projf: Format[Projection] = formatProjection(stf, ??) - implicit lazy val af: Format[Annotation] = formatAnnotation(stf, ??) + implicit lazy val af: Format[Annotation] = formatAnnotation(tf, ??) implicit lazy val paramf: Format[Parameterized] = formatParameterized(stf, array(tf)) // Super and Path are cyclic diff --git a/interface/other b/interface/other index 2ee086bcb..78ebbc3c8 100644 --- a/interface/other +++ b/interface/other @@ -36,7 +36,7 @@ TypeParameter upperBound: Type Annotation - base: SimpleType + base: Type arguments: AnnotationArgument* AnnotationArgument name: String