Skip to content

Commit 8213e96

Browse files
committed
Add tests back
1 parent d8c574a commit 8213e96

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

tests/neg/i2421.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
inline object Foo // error: modifier(s) `inline' incompatible with type definition
2+
inline class Bar // error: modifier(s) `inline' incompatible with type definition
3+
inline abstract class Baz // error: modifier(s) `inline' incompatible with type definition
4+
inline trait Qux // error: modifier(s) `inline' incompatible with type definition
5+
6+
object Quux {
7+
inline type T // error: modifier(s) `inline' incompatible with type definition
8+
inline var x: Int = 42 // error: modifier(s) `inline' incompatible with var definition
9+
inline lazy val y: Int = 43 // error: modifier(s) `inline' incompatible with lazy val definition
10+
}

tests/neg/i2712.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
object Foo {
2+
lazy var x: Int = 42 // error: modifier(s) `lazy' incompatible with var definition
3+
lazy def y: Int = 42 // error: modifier(s) `lazy' incompatible with def definition
4+
}
5+
6+
lazy class Bar // error: modifier(s) `lazy' incompatible with type definition
7+
lazy abstract class Baz // error: modifier(s) `lazy abstract' incompatible with type definition
8+
lazy trait Qux // error: modifier(s) `lazy' not allowed for trait
9+
10+
object Quux {
11+
lazy type T // error: modifier(s) `lazy' incompatible with type definition
12+
}

0 commit comments

Comments
 (0)