Skip to content

Commit 83ff0ff

Browse files
committed
Create inline-val-out-of-bounds test
1 parent 345fcba commit 83ff0ff

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 8e4a40588491608aa40099f79c881d54a5094e75
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)