Skip to content

Commit b606c41

Browse files
committed
Do not emit warning for unexpected type
Because there could be an unexpected types for incompilable sources and if we show the warning for uncompilable sources, it could be confusing.
1 parent a1e0f7f commit b606c41

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

compiler/src/dotty/tools/dotc/semanticdb/TypeOps.scala

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ class TypeOps:
5353
private def symbolNotFound(binder: Type, name: Name, parent: Symbol)(using ctx: Context): Unit =
5454
warn(s"Ignoring ${name} of symbol ${parent}, type ${binder}")
5555

56-
private def unexpectedType(parent: Symbol, tpe: Type)(using Context): Unit =
57-
warn(s"Unexpected type ${tpe} of symbol ${parent}")
58-
5956
private def warn(msg: String)(using ctx: Context): Unit =
6057
report.warning(
6158
s"Internal error in extracting SemanticDB while compiling ${ctx.compilationUnit.source}: ${msg}"
@@ -376,8 +373,7 @@ class TypeOps:
376373
case _: MatchType =>
377374
s.Type.Empty
378375

379-
case other =>
380-
unexpectedType(sym, other)
376+
case _ =>
381377
s.Type.Empty
382378
}
383379
loop(tpe)

0 commit comments

Comments
 (0)