Skip to content

Commit 84b7973

Browse files
committed
Upgraded scala-core-oop module to Scala 3
1 parent 81ee1b9 commit 84b7973

File tree

32 files changed

+7
-6
lines changed

32 files changed

+7
-6
lines changed

build.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ lazy val scala_core_io = (project in file("scala-core-modules/scala-core-io"))
118118
lazy val scala_core_oop = (project in file("scala-core-modules/scala-core-oop"))
119119
.settings(
120120
name := "scala-core-oop",
121+
scalaVersion := scala3Version,
121122
libraryDependencies ++=
122123
Seq(catsEffect, jUnitInterface) ++ scalaTestDeps
123124
)

scala-core-modules/scala-core-oop/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@ This module contains articles about Scala's Object Oriented Programming features
1111
- [Classes and Objects in Scala](https://www.baeldung.com/scala/classes-objects)
1212
- [Difference Between Case Object and Object](https://www.baeldung.com/scala/case-object-vs-object)
1313
- [Object Oriented Programming in Scala](https://www.baeldung.com/scala/oop-intro)
14-
- [Demystifying View and Context Bounds](https://www.baeldung.com/scala/view-context-bounds)
1514
- [Polymorphism in Scala](https://www.baeldung.com/scala/polymorphism)
1615
- [Lifting in Scala](https://www.baeldung.com/scala/lifting)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ object ObjectExample extends App {
2020
}
2121

2222
// Throws exception in case we call FlyingObject other than airplane and bird
23-
def nonExhaustive(objects: FlyingObject.Value) {
23+
def nonExhaustive(objects: FlyingObject.Value) = {
2424
objects match {
2525
case FlyingObject.airplane => println("I am an airplane")
2626
case FlyingObject.bird => println("I am a bird")
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ object ClassExamples {
55
val constA = "A"
66
val constB = 4
77
class Abc(var a: String, var b: Int) {
8-
def this(a: String) {
8+
def this(a: String) = {
99
this(a, constB)
1010
this.a = a
1111
}
12-
def this(b: Int) {
12+
def this(b: Int) = {
1313
this(constA, b)
1414
this.b = b
1515
}
16-
def this() {
16+
def this() = {
1717
this(constA, constB)
1818
}
1919
}

scala-core-modules/scala2-core/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
- [Implicit Conversions](https://www.baeldung.com/scala/implicit-conversions)
66
- [Reading Command-Line Arguments in Scala](https://www.baeldung.com/scala/read-command-line-arguments)
77
- [Introduction to Scala Macros](https://www.baeldung.com/scala/scala2-macros)
8-
- [Introduction to Macros in Scala 2](https://www.baeldung.com/scala/scala2-macros)
8+
- [Introduction to Macros in Scala 2](https://www.baeldung.com/scala/scala2-macros)
9+
- [Demystifying View and Context Bounds](https://www.baeldung.com/scala/view-context-bounds)

0 commit comments

Comments
 (0)