Skip to content

Commit

Permalink
Merge pull request #316 from xeno-by/master
Browse files Browse the repository at this point in the history
can set immutable fields
  • Loading branch information
xeno-by committed Mar 16, 2014
2 parents 9045fc1 + ed97c8c commit 630aa8a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions ja/overviews/reflection/environment-universes-mirrors.md
Expand Up @@ -119,8 +119,6 @@ invoker ミラーを作成することができる。
res0: Any = 2

scala> fmX.set(3)
scala.ScalaReflectionException: cannot set an immutable field x
...

scala> val fieldY = ru.typeOf[C].declaration(ru.newTermName("y")).asTerm.accessed.asTerm
fieldY: reflect.runtime.universe.TermSymbol = variable y
Expand Down
2 changes: 0 additions & 2 deletions overviews/reflection/environment-universes-mirrors.md
Expand Up @@ -121,8 +121,6 @@ A `FieldMirror` is used for getting/setting instance fields (like methods, Scala
res0: Any = 2

scala> fmX.set(3)
scala.ScalaReflectionException: cannot set an immutable field x
...

scala> val fieldY = ru.typeOf[C].declaration(ru.newTermName("y")).asTerm.accessed.asTerm
fieldY: reflect.runtime.universe.TermSymbol = variable y
Expand Down

0 comments on commit 630aa8a

Please sign in to comment.