diff --git a/compiler/test/dotc/pos-test-pickling.blacklist b/compiler/test/dotc/pos-test-pickling.blacklist index cc6b0813f0a0..5c6a4a1876f7 100644 --- a/compiler/test/dotc/pos-test-pickling.blacklist +++ b/compiler/test/dotc/pos-test-pickling.blacklist @@ -49,3 +49,7 @@ i8651b.scala # uneliminated @uncheckedVariance after pickling annot-bootstrap.scala + +# interaction with Scala-2's implicitly +i9793.scala + diff --git a/compiler/test/dotty/tools/backend/jvm/InlineBytecodeTests.scala b/compiler/test/dotty/tools/backend/jvm/InlineBytecodeTests.scala index 8fd690aa8633..3b7e83157e4e 100644 --- a/compiler/test/dotty/tools/backend/jvm/InlineBytecodeTests.scala +++ b/compiler/test/dotty/tools/backend/jvm/InlineBytecodeTests.scala @@ -73,7 +73,9 @@ class InlineBytecodeTests extends DottyBytecodeTest { } } - @Test def inlineLocally = { + /** Disabled since locally comes from Predef now + @Test + def inlineLocally = { val source = """ |class Foo { @@ -103,6 +105,7 @@ class InlineBytecodeTests extends DottyBytecodeTest { diffInstructions(instructions1, instructions2)) } } + */ @Test def i4947 = { val source = """class Foo { diff --git a/library/src/dotty/DottyPredef.scala b/library/src/dotty/DottyPredef.scala index 5e2512461386..60d0d1cefe24 100644 --- a/library/src/dotty/DottyPredef.scala +++ b/library/src/dotty/DottyPredef.scala @@ -13,39 +13,6 @@ object DottyPredef { scala.runtime.Scala3RunTime.assertFailed() } - inline final def implicitly[T](implicit ev: T): T = ev - - /** Used to mark code blocks as being expressions, instead of being taken as part of anonymous classes and the like. - * This is just a different name for [[identity]]. - * - * @example Separating code blocks from `new`: - * {{{ - * val x = new AnyRef - * { - * val y = ... - * println(y) - * } - * // the { ... } block is seen as the body of an anonymous class - * - * val x = new AnyRef - * - * { - * val y = ... - * println(y) - * } - * // an empty line is a brittle "fix" - * - * val x = new AnyRef - * locally { - * val y = ... - * println(y) - * } - * // locally guards the block and helps communicate intent - * }}} - * @group utilities - */ - inline def locally[T](inline body: T): T = body - /** * Retrieve the single value of a type with a unique inhabitant. * diff --git a/tests/neg/implicitSearch.check b/tests/neg/implicitSearch.check index 1d5136f93748..efc3ac002739 100644 --- a/tests/neg/implicitSearch.check +++ b/tests/neg/implicitSearch.check @@ -10,4 +10,4 @@ -- Error: tests/neg/implicitSearch.scala:15:38 ------------------------------------------------------------------------- 15 | listOrd(listOrd(implicitly[Ord[T]] /*not found*/)) // error | ^ - | no implicit argument of type Test.Ord[T] was found for parameter ev of method implicitly in object DottyPredef + | no implicit argument of type Test.Ord[T] was found for parameter e of method implicitly in object Predef diff --git a/tests/semanticdb/expect/ValPattern.expect.scala b/tests/semanticdb/expect/ValPattern.expect.scala index e50b3f2b502e..f89133f6ef5b 100644 --- a/tests/semanticdb/expect/ValPattern.expect.scala +++ b/tests/semanticdb/expect/ValPattern.expect.scala @@ -23,7 +23,7 @@ class ValPattern/*<-example::ValPattern#*/ { rightVar/*->example::ValPattern#rightVar().*/ ) ) - locally/*->dotty::DottyPredef.locally().*/ { + locally/*->scala::Predef.locally().*/ { val (left/*<-local0*/, right/*<-local1*/) = (/*->scala::Tuple2.apply().*/1, 2) val Some/*->scala::Some.*//*->scala::Some.unapply().*/(number1/*<-local2*/) = Some/*->scala::Some.*//*->scala::Some.apply().*/(1) diff --git a/tests/semanticdb/expect/local-file.expect.scala b/tests/semanticdb/expect/local-file.expect.scala index aa2842dcee28..1bc30875764a 100644 --- a/tests/semanticdb/expect/local-file.expect.scala +++ b/tests/semanticdb/expect/local-file.expect.scala @@ -1,7 +1,7 @@ package example class `local-file/*<-example::`local-file`#*/` { - locally/*->dotty::DottyPredef.locally().*/ { + locally/*->scala::Predef.locally().*/ { val local/*<-local0*/ = 42 local/*->local0*/ +/*->scala::Int#`+`(+4).*/ 4 } diff --git a/tests/semanticdb/metac.expect b/tests/semanticdb/metac.expect index a1bc32cbacd4..c376ffba415e 100644 --- a/tests/semanticdb/metac.expect +++ b/tests/semanticdb/metac.expect @@ -2778,7 +2778,7 @@ Occurrences: [20:8..20:18): number1Var -> example/ValPattern#number1Var(). [21:8..21:15): leftVar -> example/ValPattern#leftVar(). [22:8..22:16): rightVar -> example/ValPattern#rightVar(). -[25:4..25:11): locally -> dotty/DottyPredef.locally(). +[25:4..25:11): locally -> scala/Predef.locally(). [26:11..26:15): left <- local0 [26:17..26:22): right <- local1 [26:27..26:27): -> scala/Tuple2.apply(). @@ -3153,7 +3153,7 @@ Occurrences: [0:8..0:15): example <- example/ [2:7..2:17): local-file <- example/`local-file`# [3:2..3:2): <- example/`local-file`#``(). -[3:2..3:9): locally -> dotty/DottyPredef.locally(). +[3:2..3:9): locally -> scala/Predef.locally(). [4:8..4:13): local <- local0 [5:4..5:9): local -> local0 [5:10..5:11): + -> scala/Int#`+`(+4).