diff --git a/compiler/src/dotty/tools/dotc/core/Contexts.scala b/compiler/src/dotty/tools/dotc/core/Contexts.scala index c575f7bc72f7..dec73f7243e8 100644 --- a/compiler/src/dotty/tools/dotc/core/Contexts.scala +++ b/compiler/src/dotty/tools/dotc/core/Contexts.scala @@ -1063,6 +1063,7 @@ object Contexts { sources.clear() files.clear() comparers.clear() // forces re-evaluation of top and bottom classes in TypeComparer + comparersInUse = 0 // Test that access is single threaded diff --git a/tests/pos-macros/i18855/invoc.scala b/tests/pos-macros/i18855/invoc.scala new file mode 100644 index 000000000000..2923abd4836a --- /dev/null +++ b/tests/pos-macros/i18855/invoc.scala @@ -0,0 +1,3 @@ +import scala.language.experimental.captureChecking +val x = run() + diff --git a/tests/pos-macros/i18855/macro.scala b/tests/pos-macros/i18855/macro.scala new file mode 100644 index 000000000000..1c0ee28effbe --- /dev/null +++ b/tests/pos-macros/i18855/macro.scala @@ -0,0 +1,7 @@ +import scala.quoted.* +import scala.language.experimental.captureChecking + +def impl()(using Quotes): Expr[Unit] = '{()} +inline def run(): Unit = ${impl()} + +