-
Notifications
You must be signed in to change notification settings - Fork 23
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
added handling for default parameters #326
Conversation
fail(s"failed with YamlError: $error") | ||
case Right(foo) => | ||
assertEquals(foo.a, 1) | ||
assertEquals(foo.b, "test-3") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about one more case with b
specified to assert that the default is not invoked (so times
is not incremented) when an argument is given explicitly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
'{ $namesExpr.zip($identsExpr).toMap } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if the order of declarations in body
is reliable. Maybe it would be better to use something like sym.companionClass.methodMember("$lessinit$greater$default$" + n.toString).head
to get the default value provider method for the n-th field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, agreed
had to go from dumb mirrors to a full blown macro for products but hey, mirrors do not expose default params
closes #215