Skip to content

Commit 6d5790b

Browse files
authored
Merge branch 'deanwampler:master' into fix/fix-locale-build-issue
2 parents 9af512e + 07e35fb commit 6d5790b

File tree

6 files changed

+7
-12
lines changed

6 files changed

+7
-12
lines changed

build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
val scala3 = "3.0.1"
1+
val scala3 = "3.0.2"
22
lazy val root = project
33
.in(file("."))
44
.settings(

src/script/scala/progscala3/IndentationSyntax.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ def multiline(s: String): String =
8585
end multiline // for constructors, use their name: this
8686

8787
// Multiline value definition
88-
val foo =
88+
val hi =
8989
println("Hi World!")
9090
42
91-
end foo // val doesn't work in this case, but...
91+
end hi // val doesn't work in this case, but...
9292

9393
val (foo, bar) =
9494
"foo" -> "bar"

src/script/scala/progscala3/typesystem/abstracttypes/AbstractTypesEx.scala

+2-4
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,12 @@ object Example extends ExampleTrait:
3030
val v1 = new T1 { val name1 = "T1" }
3131
val v2 = new T2 { val name1 = "T1"; val name2 = "T2" }
3232
val v3 = C("1", "2")
33-
val v4 = Vector(C("3", "4"))
33+
val v4 = Vector(v1)
3434

3535
override def toString(): String =
3636
val v1str = s"v1: name1 = ${v1.name1}"
3737
val v2str = s"v2: name1 = ${v2.name1}, name2 = ${v2.name2}"
3838
s"Example: v1 = $v1str, v2 = $v2str, v3 = $v3, v4 = $v4"
3939

40-
assert(Example.toString ==
41-
"Example: v1 = v1: name1 = T1, v2 = v2: name1 = T1, " +
42-
"name2 = T2, v3 = C(1,2), v4 = Vector(C(3,4))")
40+
println(Example.toString)
4341
// end::Example[]

src/script/scala/progscala3/typesystem/bounds/ViewToContextBounds.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ assert(RemoteConnection.write(100) == "-- 100 --")
2222
assert(RemoteConnection.write(3.14f) == "-- 3.14 --")
2323
assert(RemoteConnection.write("hello!") == "-- hello! --")
2424
// The following fails: "no implicit view from (Int, Int) => ...
25-
RemoteConnection.write((1, 2))
25+
RemoteConnection.write((1, 2)) // Error!

src/script/scala/progscala3/typesystem/deptypes/DependentTypesBounds.scala

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// dependent types. This file focuses on recursive match types for integer
66
// ranges.
77

8-
import scala.compiletime.S
98
import scala.compiletime.ops.int.*
109

1110
// A type that allows values between MIN and MAX, inclusive.
@@ -21,11 +20,10 @@ val b7: Bounded[4,6] = 7 // ERROR
2120

2221
// A type with allowed values between 0 and N-1, inclusive, the same numbers
2322
// for indexing into a sequence of size N!
24-
type IndexOf[N] = Bounded[0,N-1]
23+
type IndexOf[N <: Int] = Bounded[0,N-1]
2524

2625
val im1: IndexOf[3] = -1 // ERROR
2726
val i0: IndexOf[3] = 0
2827
val i1: IndexOf[3] = 1
2928
val i2: IndexOf[3] = 2
3029
val i3: IndexOf[3] = 3 // ERROR
31-

src/script/scala/progscala3/typesystem/deptypes/DependentTypesTuples.scala

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
// can manipulate tuples like lists. Here, we'll experiment with dependent
77
// types and the allowed arities (sizes) of the tuples.
88

9-
import scala.compiletime.S
109
import scala.compiletime.ops.int.*
1110

1211
// Only allow tuple values with exactly N elements.

0 commit comments

Comments
 (0)