diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-02-15 01:33:27 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-02-15 09:32:28 +0100 |
commit | 25e7274ef7f0ffaf511460c3a130c8064b5d44e2 (patch) | |
tree | f6df76e5827a735a69197af385ef01657061242e /src/reflect | |
parent | 6402b576f7567a4d19b4df31e0117462dd6df7d5 (diff) | |
download | scala-25e7274ef7f0ffaf511460c3a130c8064b5d44e2.tar.gz scala-25e7274ef7f0ffaf511460c3a130c8064b5d44e2.tar.bz2 scala-25e7274ef7f0ffaf511460c3a130c8064b5d44e2.zip |
exposes Symbol.setOwner
Used by async.
Diffstat (limited to 'src/reflect')
-rw-r--r-- | src/reflect/scala/reflect/internal/Internals.scala | 1 | ||||
-rw-r--r-- | src/reflect/scala/reflect/macros/Universe.scala | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/internal/Internals.scala b/src/reflect/scala/reflect/internal/Internals.scala index 4bb05b0af1..994b907042 100644 --- a/src/reflect/scala/reflect/internal/Internals.scala +++ b/src/reflect/scala/reflect/internal/Internals.scala @@ -96,6 +96,7 @@ trait Internals extends api.Internals { def attachments(symbol: Symbol): Attachments { type Pos = Position } = symbol.attachments def updateAttachment[T: ClassTag](symbol: Symbol, attachment: T): symbol.type = symbol.updateAttachment(attachment) def removeAttachment[T: ClassTag](symbol: Symbol): symbol.type = symbol.removeAttachment[T] + def setOwner(symbol: Symbol, newowner: Symbol): symbol.type = { symbol.owner = newowner; symbol } def setInfo(symbol: Symbol, tpe: Type): symbol.type = symbol.setInfo(tpe) def setAnnotations(symbol: Symbol, annots: Annotation*): symbol.type = symbol.setAnnotations(annots: _*) def setName(symbol: Symbol, name: Name): symbol.type = symbol.setName(name) diff --git a/src/reflect/scala/reflect/macros/Universe.scala b/src/reflect/scala/reflect/macros/Universe.scala index 3906a3388d..08436df5a7 100644 --- a/src/reflect/scala/reflect/macros/Universe.scala +++ b/src/reflect/scala/reflect/macros/Universe.scala @@ -59,6 +59,9 @@ abstract class Universe extends scala.reflect.api.Universe { */ def removeAttachment[T: ClassTag](symbol: Symbol): symbol.type + /** Sets the `owner` of the symbol. */ + def setOwner(symbol: Symbol, newowner: Symbol): symbol.type + /** Sets the `info` of the symbol. */ def setInfo(symbol: Symbol, tpe: Type): symbol.type @@ -187,6 +190,9 @@ abstract class Universe extends scala.reflect.api.Universe { /** @see [[internal.removeAttachment]] */ def removeAttachment[A: ClassTag]: T = internal.removeAttachment[A](symbol) + /** @see [[internal.setOwner]] */ + def setOwner(newowner: Symbol): T = internal.setOwner(symbol, newowner) + /** @see [[internal.setInfo]] */ def setInfo(tpe: Type): T = internal.setInfo(symbol, tpe) |