Skip to content

Commit f6cd021

Browse files
committed
Add inline-val-out-of-bounds test
1 parent 345fcba commit f6cd021

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
-- [E007] Type Mismatch Error: tests/neg/inline-val-out-of-bounds.scala:1:21 -------------------------------------------
2+
1 |inline val a: Byte = 500 // error
3+
| ^^^
4+
| Found: (500 : Int)
5+
| Required: Byte
6+
|
7+
| longer explanation available when compiling with `-explain`
8+
-- Error: tests/neg/inline-val-out-of-bounds.scala:2:20 ----------------------------------------------------------------
9+
2 |inline val b: Int = 8589934592 // error
10+
| ^^^^^^^^^^
11+
| number too large
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
inline val a: Byte = 500 // error
2+
inline val b: Int = 8589934592 // error

0 commit comments

Comments
 (0)