Skip to content

Commit 14e0f90

Browse files
committed
Pretty alignment and check file showing message
1 parent bff12be commit 14e0f90

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

compiler/src/dotty/tools/dotc/reporting/Message.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,7 @@ object Message:
176176
case param: TypeParamRef => ctx.typerState.constraint.contains(param)
177177
case param: ParamRef => false
178178
case skolem: SkolemType => true
179-
case sym: Symbol =>
180-
ctx.gadt.contains(sym) && ctx.gadt.fullBounds(sym) != TypeBounds.empty
179+
case sym: Symbol => ctx.gadt.contains(sym) && ctx.gadt.fullBounds(sym) != TypeBounds.empty
181180
}
182181

183182
val toExplain: List[(String, Recorded)] = seen.toList.flatMap { kvs =>

tests/neg/i19334.check

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
-- [E081] Type Error: tests/neg/i19334.scala:6:4 -----------------------------------------------------------------------
2+
6 | f(_) // error was OOM formatting TypeVar(TypeParamRef(T)) when offering explanations
3+
| ^
4+
| Missing parameter type
5+
|
6+
| I could not infer the type of the parameter _$1
7+
| in expanded function:
8+
| _$1 => f(_$1)
9+
| Expected type for the whole anonymous function:
10+
| T
11+
|
12+
| where: T is a type variable

0 commit comments

Comments
 (0)