Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit 61cd340

Browse files
authored
Update code-snippets build/add Toplevel definitions example (#90)
1 parent 87e12dd commit 61cd340

File tree

5 files changed

+20
-3
lines changed

5 files changed

+20
-3
lines changed

code-snippets/build.sbt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
Global / onChangedBuildSource := ReloadOnSourceChanges
33

4-
lazy val `dotty-snippets` = project
4+
lazy val `scala-3-snippets` = project
55
.in(file("."))
6-
.settings(ThisBuild / scalaVersion := "3.0.0")
6+
.settings(ThisBuild / scalaVersion := "3.2.2")
77
.settings(
88
name := "dotty-simple",
99
version := "0.1.0",
@@ -16,6 +16,7 @@ lazy val `dotty-snippets` = project
1616
`intersection-and-union-types`,
1717
`enumerations`,
1818
`export-clause`,
19+
`top-level-definitions`,
1920
)
2021

2122
lazy val `new-control-structure-syntax` = project.in(file("new-control-structure-syntax"))
@@ -27,3 +28,6 @@ lazy val `enumerations` = project.in(file("enumerations"))
2728
lazy val `export-clause` = project.in(file("export-clause"))
2829

2930
lazy val `intersection-and-union-types` = project.in(file("intersection-and-union-types"))
31+
32+
lazy val `top-level-definitions` = project.in(file("top-level-definitions"))
33+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.5.2
1+
sbt.version=1.8.2
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package org.lunatechlabs.multi
2+
3+
object Application extends App {
4+
println(s"$x $y $private_x $private_y")
5+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package org.lunatechlabs.multi
2+
3+
val x = 5
4+
private val private_x = 27
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package org.lunatechlabs.multi
2+
3+
val y = 15
4+
private val private_y = 730

0 commit comments

Comments
 (0)