diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-08-08 21:30:24 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-08-09 01:05:55 +0200 |
commit | 1183f0639ea684d9462c2caf47fb1c41623a86d8 (patch) | |
tree | a6b0e3dffe372650138a6a8ad1a3574b51637332 /src | |
parent | 6b3d36bc19cc82350c3754b0b91fb074a443d9bc (diff) | |
download | scala-1183f0639ea684d9462c2caf47fb1c41623a86d8.tar.gz scala-1183f0639ea684d9462c2caf47fb1c41623a86d8.tar.bz2 scala-1183f0639ea684d9462c2caf47fb1c41623a86d8.zip |
an important fixup for macro universe API
It seems that this.type doesn't cut it for stuff declared in a trait.
Downgrading this.type to Symbol and Type correspondingly in
SymbolContextApi and TreeContextApi.
Diffstat (limited to 'src')
-rw-r--r-- | src/reflect/scala/reflect/macros/Universe.scala | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/reflect/scala/reflect/macros/Universe.scala b/src/reflect/scala/reflect/macros/Universe.scala index 4074dd9e93..44a7de3d3a 100644 --- a/src/reflect/scala/reflect/macros/Universe.scala +++ b/src/reflect/scala/reflect/macros/Universe.scala @@ -22,17 +22,17 @@ abstract class Universe extends scala.reflect.api.Universe { /** The extended API of symbols that's supported in macro context universes */ - trait SymbolContextApi extends SymbolApi with AttachableApi { this: Symbol => + trait SymbolContextApi extends SymbolApi with AttachableApi { self: Symbol => - def setFlags(flags: FlagSet): this.type + def setFlags(flags: FlagSet): Symbol - def setTypeSignature(tpe: Type): this.type + def setTypeSignature(tpe: Type): Symbol - def setAnnotations(annots: AnnotationInfo*): this.type + def setAnnotations(annots: AnnotationInfo*): Symbol - def setName(name: Name): this.type + def setName(name: Name): Symbol - def setPrivateWithin(sym: Symbol): this.type + def setPrivateWithin(sym: Symbol): Symbol } // Tree extensions --------------------------------------------------------------- @@ -41,20 +41,20 @@ abstract class Universe extends scala.reflect.api.Universe { /** The extended API of trees that's supported in macro context universes */ - trait TreeContextApi extends TreeApi with AttachableApi { this: Tree => + trait TreeContextApi extends TreeApi with AttachableApi { self: Tree => /** ... */ def pos_=(pos: Position): Unit /** ... */ - def setPos(newpos: Position): this.type + def setPos(newpos: Position): Tree /** ... */ def tpe_=(t: Type): Unit /** Set tpe to give `tp` and return this. */ - def setType(tp: Type): this.type + def setType(tp: Type): Tree /** Like `setType`, but if this is a previously empty TypeTree that * fact is remembered so that resetAllAttrs will snap back. @@ -73,13 +73,13 @@ abstract class Universe extends scala.reflect.api.Universe { * and therefore should be abandoned if the current line of type * inquiry doesn't work out. */ - def defineType(tp: Type): this.type + def defineType(tp: Type): Tree /** ... */ def symbol_=(sym: Symbol): Unit /** ... */ - def setSymbol(sym: Symbol): this.type + def setSymbol(sym: Symbol): Tree } override type SymTree >: Null <: Tree with SymTreeContextApi |