From 7f826e9797cbd35f18c7ff0bb034144d90ed689f Mon Sep 17 00:00:00 2001 From: Miles Sabin Date: Wed, 17 Jul 2019 19:38:43 +0100 Subject: [PATCH 1/6] Mirrors can now be materialized with additional type member refinements. Any additional type members will contribute to the implicit scope of any searches involving the type of the summoned Mirror. Typically such types will be the singleton types of objects containing implicit extension methods for the Mirror, or other related implicit definitions. Pass through all extra refinements --- .../dotty/tools/dotc/typer/Implicits.scala | 40 +++++++++++++++---- tests/pos/mirror-implicit-scope.scala | 27 +++++++++++++ 2 files changed, 59 insertions(+), 8 deletions(-) create mode 100644 tests/pos/mirror-implicit-scope.scala diff --git a/compiler/src/dotty/tools/dotc/typer/Implicits.scala b/compiler/src/dotty/tools/dotc/typer/Implicits.scala index 13908b9b18a3..690e4962266b 100644 --- a/compiler/src/dotty/tools/dotc/typer/Implicits.scala +++ b/compiler/src/dotty/tools/dotc/typer/Implicits.scala @@ -884,14 +884,38 @@ trait Implicits { self: Typer => * * { * MirroredMonoType = - * MirroredTypeConstrictor = - * MirroredLabel =