summaryrefslogtreecommitdiff
path: root/scalalib/test/resources/hello-world/core/src/Result.scala
diff options
context:
space:
mode:
Diffstat (limited to 'scalalib/test/resources/hello-world/core/src/Result.scala')
-rw-r--r--scalalib/test/resources/hello-world/core/src/Result.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/scalalib/test/resources/hello-world/core/src/Result.scala b/scalalib/test/resources/hello-world/core/src/Result.scala
new file mode 100644
index 00000000..d7d29a51
--- /dev/null
+++ b/scalalib/test/resources/hello-world/core/src/Result.scala
@@ -0,0 +1,7 @@
+object Person {
+ def fromString(s: String): Person = {
+ val Array(name, age) = s.split(":")
+ Person(name, age.toInt)
+ }
+}
+case class Person(name: String, age: Int)