diff --git a/compiler/src/dotty/tools/dotc/typer/Checking.scala b/compiler/src/dotty/tools/dotc/typer/Checking.scala index 5c1e1757de52..42579abc0823 100644 --- a/compiler/src/dotty/tools/dotc/typer/Checking.scala +++ b/compiler/src/dotty/tools/dotc/typer/Checking.scala @@ -1408,6 +1408,7 @@ trait ReChecking extends Checking { override def checkNoModuleClash(sym: Symbol)(using Context) = () override def checkCanThrow(tp: Type, span: Span)(using Context): Unit = () override def checkCatch(pat: Tree, guard: Tree)(using Context): Unit = () + override def checkFeature(name: TermName, description: => String, featureUseSite: Symbol, pos: SrcPos)(using Context): Unit = () } trait NoChecking extends ReChecking { @@ -1430,5 +1431,4 @@ trait NoChecking extends ReChecking { override def checkMembersOK(tp: Type, pos: SrcPos)(using Context): Type = tp override def checkInInlineContext(what: String, pos: SrcPos)(using Context): Unit = () override def checkValidInfix(tree: untpd.InfixOp, meth: Symbol)(using Context): Unit = () - override def checkFeature(name: TermName, description: => String, featureUseSite: Symbol, pos: SrcPos)(using Context): Unit = () } diff --git a/tests/pos-special/fatal-warnings/i14637.scala b/tests/pos-special/fatal-warnings/i14637.scala new file mode 100644 index 000000000000..9499c2fca2f9 --- /dev/null +++ b/tests/pos-special/fatal-warnings/i14637.scala @@ -0,0 +1,6 @@ +class C + +object Givens: + given cOrdering: Ordering[C] with + override def compare(c0: C, c1: C) = 0 + val greeting = "we love Givens" \ No newline at end of file