Closed TripleDogDare closed 1 year ago
I think I got it to do the right thing!
I still have no idea what the ast.TypeAssertExpr.X
refers to so it's just a guess. However, it appears to do the right thing against the demo code branch.
So this is less required now that it no longer panics. However, adding tests and better error messages for handling type assertion seems nice to have.
This gives an error instead of a panic for the demo code base in #2. (#5 go1.18+ fix seems to have resolved the panic as well)
Now it returns a bunch of errors that seem much more reasonable, if not any more functional. There's a good chance that the codes from the old identity could be assigned to the new identity and just ignore the type assertion but I'm not really sure how to do that.