Skip to content

Conversation

@karlroberts
Copy link
Contributor

The method Type.delaration has been depricated in Scala 2.11.0 in favour of Type.decls.

The method Type.delaration has been depricated in Scala 2.11.0 in favour of Type.decls.
@SethTisue SethTisue merged commit af59b3e into scala:master Nov 18, 2017
@SethTisue
Copy link
Member

good catch. thank you!

@karlroberts karlroberts deleted the patch-1 branch November 20, 2017 12:08
constructor of class `Person`.

scala> val ctor = ru.typeOf[Person].declaration(ru.nme.CONSTRUCTOR).asMethod
scala> val ctor = ru.typeOf[Person].decls(ru.nme.CONSTRUCTOR).asMethod
Copy link
Contributor

Choose a reason for hiding this comment

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

@SethTisue This PR introduced a bug, replacing declaration (singular) with decls (plural) here and on line 174 below. A fix is part of #935

access member `shipped`.

scala> val shippingTermSymb = ru.typeOf[Purchase].declaration(ru.TermName("shipped")).asTerm
scala> val shippingTermSymb = ru.typeOf[Purchase].decls(ru.TermName("shipped")).asTerm
Copy link
Contributor

Choose a reason for hiding this comment

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

The code as is (ru.typeOf[Purchase].decls(ru.TermName("shipped")).asTerm) produces the following error: "reflect.runtime.universe.MemberScope does not take parameters"

Copy link
Member

Choose a reason for hiding this comment

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

fixed in #935?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes

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.

3 participants