-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #414: Define the rest of the special Predef methods.
- Loading branch information
Showing
3 changed files
with
93 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
test-sources/src/main/scala/simple_trees/PredefMethods.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package simple_trees | ||
|
||
object PredefMethods: | ||
def test(): Unit = | ||
val x = valueOf[5] | ||
assert(x == 5) | ||
|
||
val obj: List[Int] | Null = List(1, 2) | ||
assert(obj.nn.size == 2, "with message") | ||
assert(Predef.eq(obj)(obj)) | ||
assert(Predef.ne(obj)(List(1, 2))) | ||
|
||
println(summon[DummyImplicit]) | ||
end test | ||
end PredefMethods |