Peng Cheng

Results 224 comments of Peng Cheng

@soronpo It turns out that the error is only triggered in certain cases. Please see the new test case in my PR

> This could be due to the caching mechanism in singleton-ops. I'm now 90% sure it wasn't. By observing what is being annotated by your code: After logging the `abort`...

... Sorry the last option is out of context & doesn't apply to your case. The implicit error will always write over the previous error

Sorry I don't know how to write unit test for this case, It appears that there is no coverage for Warn symbol as well, so I doubt if it could...

The full context of this error is displayed in the CI output: https://github.com/tribbloid/shapesafe/runs/925426505?check_suite_focus=true#step:4:76

That's the obvious part, the no-so-obvious part is why `result.arity` has the refinement correctly. Also, the `S` should refer to `result.arity.S` theoretically, let me try to infer its full type...

The `result.arity.S` can't generate a TypeTag automatically, so I print the type hierarchy of `result.arity` instead: ``` edu.umontreal.kotlingrad.shapesafe.m.arity.Arity.FromLiteral[Int(6)]#Out#Out - edu.umontreal.kotlingrad.shapesafe.m.arity.Arity.FromLiteral[Int(6)] - edu.umontreal.kotlingrad.shapesafe.m.arity.Arity.Const[Int(6)] - edu.umontreal.kotlingrad.shapesafe.m.arity.Proof.Invar[Int(6)] - edu.umontreal.kotlingrad.shapesafe.m.arity.Proof.Out_=[edu.umontreal.kotlingrad.shapesafe.m.arity.Arity.Const[Int(6)]] - edu.umontreal.kotlingrad.shapesafe.m.arity.Arity - edu.umontreal.kotlingrad.shapesafe.m.arity.Proven...

Thanks a lot, here is the relevant part of the log (logging level set to --info): ``` @@TypeCalc.unapply@@ source-/home/peng/git/shapesafe/core/src/test/scala/edu/umontreal/kotlingrad/shapesafe/core/tensor/DoubleVectorSpec.scala,line-185,offset=4376 TP: singleton.ops.impl.OpMacro[singleton.ops.impl.OpId.+,S,Int(3),Int(0)] RAW: TypeRef(ThisType(singleton.ops.impl), singleton.ops.impl.OpMacro, List(TypeRef(SingleType(ThisType(singleton.ops.impl), singleton.ops.impl.OpId), singleton.ops.impl.OpId.$plus, List()), TypeRef(NoPrefix, TypeName("S"),...

@soronpo Thanks a lot for your attention, did you observe anything strange in the log?

It looks like the `Vtyper` feature is highly experimental: I got the following error on a very ordinary generic case class: ``` caught scala.reflect.internal.Symbols$CyclicReference: illegal cyclic reference involving method copy:...