diff options
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/bug648.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug648.scala | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/test/files/neg/bug648.check b/test/files/neg/bug648.check new file mode 100644 index 0000000000..80a4e11213 --- /dev/null +++ b/test/files/neg/bug648.check @@ -0,0 +1,4 @@ +bug648.scala:7 error: value newAcc escapes its defining scope as part of type newAcc.type + List[Symbol]() map { sym => + ^ +one error found diff --git a/test/files/neg/bug648.scala b/test/files/neg/bug648.scala new file mode 100644 index 0000000000..6d10800795 --- /dev/null +++ b/test/files/neg/bug648.scala @@ -0,0 +1,14 @@ +import scala.tools.nsc.transform.Transform + +abstract class Detach extends Transform { + import global._ + class DetachTransformer extends Transformer { + def foo: Scope = new Scope( + List[Symbol]() map { sym => + val newAcc = sym.cloneSymbol + // def setFlag(mask: long): this.type + newAcc.setFlag(0) + } + ) + } +} |