-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
sijarsu
authored and
mkrzemien
committed
Jun 7, 2020
1 parent
3935a4c
commit eda0a5d
Showing
2 changed files
with
17 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
class A() | ||
class B(val oa: Option[A]) | ||
|
||
object TestSome { | ||
val a = new A() | ||
val b = wire[B] | ||
object TestSomeOption { | ||
val a = new A() | ||
val oa = Some(new A()) | ||
val b = wire[B] | ||
} | ||
|
||
object TestSomeValue { | ||
val a = new A() | ||
val b = wire[B] | ||
} | ||
|
||
object TestNone { | ||
val b = wire[B] | ||
val b = wire[B] | ||
} | ||
|
||
require(TestSome.b.oa.contains(TestSome.a)) | ||
require(TestSomeOption.b.oa.contains(TestSomeOption.oa.get)) | ||
require(TestSomeValue.b.oa.contains(TestSomeValue.a)) | ||
require(TestNone.b.oa.isEmpty) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters