diff options
author | mihaylov <mihaylov@epfl.ch> | 2006-01-18 12:12:48 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2006-01-18 12:12:48 +0000 |
commit | ae23ef23441ab396847db50bbffb75237bda2c47 (patch) | |
tree | ede328be189679ab8523c8d51b57d88d4034f114 /src | |
parent | c79184934b20961ad667392d508252b55e38677b (diff) | |
download | scala-ae23ef23441ab396847db50bbffb75237bda2c47.tar.gz scala-ae23ef23441ab396847db50bbffb75237bda2c47.tar.bz2 scala-ae23ef23441ab396847db50bbffb75237bda2c47.zip |
Made anonymous functions serializable
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Symbols.scala | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Symbols.scala b/src/compiler/scala/tools/nsc/symtab/Symbols.scala index 702231dccc..d93298d5c6 100644 --- a/src/compiler/scala/tools/nsc/symtab/Symbols.scala +++ b/src/compiler/scala/tools/nsc/symtab/Symbols.scala @@ -117,8 +117,12 @@ mixin class Symbols requires SymbolTable { new ModuleClassSymbol(this, pos, name); final def newAnonymousClass(pos: int) = newClass(pos, nme.ANON_CLASS_NAME.toTypeName); - final def newAnonymousFunctionClass(pos: int) = - newClass(pos, nme.ANON_FUN_NAME.toTypeName); + final def newAnonymousFunctionClass(pos: int) = { + val anonfun = newClass(pos, nme.ANON_FUN_NAME.toTypeName); + anonfun.attributes = + Pair(definitions.SerializableAttr, List()) :: anonfun.attributes; + anonfun + } final def newRefinementClass(pos: int) = newClass(pos, nme.REFINE_CLASS_NAME.toTypeName); final def newErrorClass(name: Name) = { |