diff options
author | James Iry <jamesiry@gmail.com> | 2013-02-26 17:22:35 -0800 |
---|---|---|
committer | James Iry <jamesiry@gmail.com> | 2013-02-26 20:20:03 -0800 |
commit | 04b147e4a0c226526d3192b68f8efa8953b531ea (patch) | |
tree | d710da2a41a065215610e838faa85f2d933071b9 /test/files/run/t107.scala | |
parent | 208d6ad0bbbb4f7b5021f96bce14606869a6c899 (diff) | |
download | scala-04b147e4a0c226526d3192b68f8efa8953b531ea.tar.gz scala-04b147e4a0c226526d3192b68f8efa8953b531ea.tar.bz2 scala-04b147e4a0c226526d3192b68f8efa8953b531ea.zip |
SI-7159 Prepare to remove erroneous INT <:< LONG in TypeKinds
In preparation for dealing with a problem in TypeKinds, this commit
does some cleanup of code related to doing coercions.
* Comments are added to clarify.
* A println when converting between BOOL and anything else is removed
and the code is allowed to flow through to an assertion.
* Assertions are refactored to use string interpolation.
* A few pattern matches were reformulated to equivalent variants
In addition, a test is created for SI-107, the bug that necessitated
the special case in GenICode#adapt for LONG coercion
Diffstat (limited to 'test/files/run/t107.scala')
-rw-r--r-- | test/files/run/t107.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/run/t107.scala b/test/files/run/t107.scala new file mode 100644 index 0000000000..ab1b289882 --- /dev/null +++ b/test/files/run/t107.scala @@ -0,0 +1,8 @@ +object Test { + def main(args : Array[String]) : Unit = { + var hash : Long = 0 + val bytes = Array(1.toByte, 2.toByte, 3.toByte) + hash += bytes(0) + Console.println(hash) + } +}
\ No newline at end of file |