File tree 2 files changed +17
-10
lines changed
tests/src/test/resources/test-cases 2 files changed +17
-10
lines changed Original file line number Diff line number Diff line change 1
1
class A()
2
2
class B(val oa: Option[A])
3
3
4
- object TestSome {
5
- val a = new A()
6
- val b = wire[B]
4
+ object TestSomeOption {
5
+ val a = new A()
6
+ val oa = Some(new A())
7
+ val b = wire[B]
8
+ }
9
+
10
+ object TestSomeValue {
11
+ val a = new A()
12
+ val b = wire[B]
7
13
}
8
14
9
15
object TestNone {
10
- val b = wire[B]
16
+ val b = wire[B]
11
17
}
12
18
13
- require(TestSome.b.oa.contains(TestSome.a))
19
+ require(TestSomeOption.b.oa.contains(TestSomeOption.oa.get))
20
+ require(TestSomeValue.b.oa.contains(TestSomeValue.a))
14
21
require(TestNone.b.oa.isEmpty)
Original file line number Diff line number Diff line change @@ -2,17 +2,17 @@ class A()
2
2
class B(val oa: Option[Option[A]])
3
3
4
4
object TestSome {
5
- val a = Some(new A())
6
- val b = wire[B]
5
+ val a = Some(new A())
6
+ val b = wire[B]
7
7
}
8
8
9
9
object TestNestedSome {
10
- val a = new A()
11
- val b = wire[B]
10
+ val a = new A()
11
+ val b = wire[B]
12
12
}
13
13
14
14
object TestNone {
15
- val b = wire[B]
15
+ val b = wire[B]
16
16
}
17
17
18
18
require(TestSome.b.oa.contains(TestSome.a))
You can’t perform that action at this time.
0 commit comments