Commit 7278f5b
committed
Demonstrate issue uncovered by previous commit
> run -Xprint-types -Ytest-pickler -Ystop-after:pickler tests/pos/pickleinf.scala
[error] (no source file, offset = 0): error: value of type <notype> does not take parameters
The issue seems to be that the type of $1$.bar is incorrect:
sel: Select(Ident($1$),bar)
sel.tpe.widen: MethodType(List(name, dummy),
List(TypeRef(TermRef(NoPrefix,$1$),Bar$$N), TypeRef(TermRef(ThisType(TypeRef(NoPrefix,<root>)),scala),Int)),
TypeRef(TermRef(ThisType(TypeRef(NoPrefix,<root>)),scala),Int))
sel.tpe.signature: Signature(List(java.lang.Object, scala.Int),scala.Int)
In the type, the first argument has type `Bar$$N`, but its type should
be constrained to `Int`, the result is that in the signature the first
parameter has type `Object` instead of `Int`.1 parent 4426342 commit 7278f5b
File tree
3 files changed
+13
-0
lines changed- src/dotty/tools/dotc/core/tasty
- tests/pos
- test/dotc
3 files changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
314 | 317 | | |
315 | 318 | | |
316 | 319 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments