diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2010-08-26 13:28:37 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2010-08-26 13:28:37 +0000 |
commit | b3e8963c30de38a6d813640d58cbb1a0a00eba36 (patch) | |
tree | 95d646feeff954fb5c78077a82ed1fcf09282d24 /test/files/pos | |
parent | cbb97ea1136982742344a0493cadb6080a19a082 (diff) | |
download | scala-b3e8963c30de38a6d813640d58cbb1a0a00eba36.tar.gz scala-b3e8963c30de38a6d813640d58cbb1a0a00eba36.tar.bz2 scala-b3e8963c30de38a6d813640d58cbb1a0a00eba36.zip |
Closes #3497.
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/spec-t3497.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/pos/spec-t3497.scala b/test/files/pos/spec-t3497.scala new file mode 100644 index 0000000000..ff054aa7de --- /dev/null +++ b/test/files/pos/spec-t3497.scala @@ -0,0 +1,16 @@ +abstract class A[T, @specialized U] { + def score(state: T): U +} + +object B extends A[ Array[Byte], Int ] { + def score(state: Array[Byte]): Int = { + var index = 0 + while (index < state.length) { // (index < 2) leads to the #2755 NullPointerException + if (state(index) == 0) { + return -1 + } + } + + return 0 + } +} |