From 54b7aa5ff6cf4b76978e985661cc64c649d07144 Mon Sep 17 00:00:00 2001 From: noti0na1 Date: Thu, 24 Feb 2022 16:53:30 -0500 Subject: [PATCH] Add a todo comment --- compiler/src/dotty/tools/dotc/core/Contexts.scala | 2 +- compiler/src/dotty/tools/dotc/core/GadtConstraint.scala | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/src/dotty/tools/dotc/core/Contexts.scala b/compiler/src/dotty/tools/dotc/core/Contexts.scala index 49bb763334de..04610ce8e478 100644 --- a/compiler/src/dotty/tools/dotc/core/Contexts.scala +++ b/compiler/src/dotty/tools/dotc/core/Contexts.scala @@ -839,7 +839,7 @@ object Contexts { gadt = EmptyGadtConstraint } - @sharable object NoContext extends Context(null.asInstanceOf) { + @sharable object NoContext extends Context((null: ContextBase | Null).uncheckedNN) { source = NoSource override val implicits: ContextualImplicits = new ContextualImplicits(Nil, null, false)(this) } diff --git a/compiler/src/dotty/tools/dotc/core/GadtConstraint.scala b/compiler/src/dotty/tools/dotc/core/GadtConstraint.scala index a443db54c4a8..553401f92ca6 100644 --- a/compiler/src/dotty/tools/dotc/core/GadtConstraint.scala +++ b/compiler/src/dotty/tools/dotc/core/GadtConstraint.scala @@ -107,6 +107,7 @@ final class ProperGadtConstraint private( params.indexOf(tp.symbol) match { case -1 => mapping(tp.symbol) match { + // TODO: Improve flow typing so that ascription becomes redundant, see #11967 case tv: TypeVar => tv.origin case null => tp }