-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong type checking when using type definition #1594
Comments
indeed, when printing the trees, we get: [ Debug ] @final
[ Debug ] def test[C](r: Regex[C]): Set[C] = Set(Cons[Regex[C]](r, Nil[Regex[C]]())) |
So the expansion of |
As the tree is wrong before the preprocessing phase, I'm guessing the problem comes from the extraction. |
The bug comes from the extraction, in CodeExtract.scala stainless/frontends/dotty/src/main/scala/stainless/frontends/dotc/CodeExtraction.scala Line 2364 in 0010368
case AppliedType(tr: TypeRef, Seq(tp)) if isSetSym(tr.symbol) =>
xt.SetType(extractType(tp)) in the |
This bug appears also with other types treated on their own, like type TestType[A] = Map[Int, List[A]]
val t: TestType[Int] = Map(1 -> List(1, 2, 3), 2 -> List(4, 5, 6)) |
I was working on the Zipper for Regex implementation, and the well-formedness check didn't pass so I minimised the example and here it is:
And here is the error:
When happening in the real project, the error is far more complicated and the type of the function found is
<untyped>
but I presume this is the same bug.Apparently it is expecting
Set[C]
instead ofSet[Context[C]]
i.e.,Set[List[Regex[C]]]
The text was updated successfully, but these errors were encountered: