diff options
author | Martin Odersky <odersky@gmail.com> | 2006-10-06 14:36:24 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2006-10-06 14:36:24 +0000 |
commit | 0f6e14043510907ef0ee0f6a86699064b017f0de (patch) | |
tree | 95d0ce013672bac1969ada979cb1cd045a305197 /test/files/pos/bug767.scala | |
parent | af995b1f8fa2787022ad3c09cfc8d4d9a46785f0 (diff) | |
download | scala-0f6e14043510907ef0ee0f6a86699064b017f0de.tar.gz scala-0f6e14043510907ef0ee0f6a86699064b017f0de.tar.bz2 scala-0f6e14043510907ef0ee0f6a86699064b017f0de.zip |
fixed bug767
Diffstat (limited to 'test/files/pos/bug767.scala')
-rw-r--r-- | test/files/pos/bug767.scala | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/files/pos/bug767.scala b/test/files/pos/bug767.scala new file mode 100644 index 0000000000..05dd97f556 --- /dev/null +++ b/test/files/pos/bug767.scala @@ -0,0 +1,18 @@ +abstract class AbsCell { + type T = Node + val init: T + private var value: T = init + def get: T = value + def set (x: T): unit = { value = x } + + class Node { + val foo = 1 + } +} + +object inner { + def main(args: Array[String]): Unit = { + val cell = new AbsCell { val init = new Node() } + cell.set(new cell.type#T()) // nullpointer exception + } +} |