Skip to content

Conversation

@allanrenucci
Copy link
Contributor

No description provided.

@allanrenucci
Copy link
Contributor Author

A more complex (and currently failing) test case can be found in #4446

@allanrenucci allanrenucci changed the title Fix serialisation of partial function literals Make partial function literals serializable May 3, 2018
@allanrenucci allanrenucci requested a review from smarter May 3, 2018 09:03

val parent = defn.AbstractPartialFunctionType.appliedTo(tpe.argInfos)
val anonCls = AnonClass(parent :: Nil, List(isDefinedAtFn, applyOrElseFn), List(nme.isDefinedAt, nme.applyOrElse))
val parents = List(defn.AbstractPartialFunctionType.appliedTo(tpe.argInfos), defn.SerializableType)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer JavaSerializableType over SerializableType (the latter should die in a fire but that hasn't happened yet: scala/bug#9080)

Copy link
Contributor Author

@allanrenucci allanrenucci May 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I'll change. I used scala serializable because that's what scalac uses

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, maybe we should keep SerializableType for now and eventually replace them all at once.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your call!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep it as is for now

@allanrenucci allanrenucci merged commit 48a2f4b into scala:master May 3, 2018
@allanrenucci allanrenucci deleted the serialize-pf branch May 3, 2018 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants