diff options
Diffstat (limited to 'tests/pos/1567/PosZInt_1.scala')
-rw-r--r-- | tests/pos/1567/PosZInt_1.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/pos/1567/PosZInt_1.scala b/tests/pos/1567/PosZInt_1.scala new file mode 100644 index 000000000..60b4061e6 --- /dev/null +++ b/tests/pos/1567/PosZInt_1.scala @@ -0,0 +1,6 @@ +final class PosZInt private (val value: Int) extends AnyVal + +object PosZInt { + def from(value: Int): Option[PosZInt] = + if (value >= 0) Some(new PosZInt(value)) else None +} |