Seite 1 von 1

Ex 05, Rec Expression: RunningFailure?

Verfasst: 22. Mai 2013 09:02
von Osterlaus
Hi there,
I got a little problem with the current exercise: the Specification Test won't run, it only gives me this output:
Status: RunningFailure
Test score: 0/-1
The public tests are running with 11/12, so I don't think there's a too big mistake in my code that hinders the private tests from even running...???

Re: Ex 05, Rec Expression: RunningFailure?

Verfasst: 22. Mai 2013 09:56
von Osterlaus
Another tiny question: simply compiling and testing the second exercise gives this error:
Status: CompilationFailure
test.scala:8: error: not enough arguments for method apply: (name: Symbol, namedExpr: Solution.RCFAE, body: Solution.RCFAE)Solution.Rec in object Rec.
Unspecified value parameter body.
Error occurred in an application involving default arguments.
{ interp(Rec(List('fac -> Fun('n,
^
test.scala:15: error: not enough arguments for method apply: (name: Symbol, namedExpr: Solution.RCFAE, body: Solution.RCFAE)Solution.Rec in object Rec.
Unspecified value parameter body.
Error occurred in an application involving default arguments.
{ interp(Rec(List('odd -> Fun('n,
^
Whats wrong here? Shouldn't the test be syntactically correct, but yield an error on execution time?

Re: Ex 05, Rec Expression: RunningFailure?

Verfasst: 22. Mai 2013 12:24
von m.v.
Osterlaus hat geschrieben:Hi there,
I got a little problem with the current exercise: the Specification Test won't run, it only gives me this output:
Status: RunningFailure
Test score: 0/-1
i have the same problem but with 12/12 in the public tests
Osterlaus hat geschrieben:Another tiny question: simply compiling and testing the second exercise gives this error:
Status: CompilationFailure
test.scala:8: error: not enough arguments for method apply: (name: Symbol, namedExpr: Solution.RCFAE, body: Solution.RCFAE)Solution.Rec in object Rec.
Unspecified value parameter body.
Error occurred in an application involving default arguments.
{ interp(Rec(List('fac -> Fun('n,
^
test.scala:15: error: not enough arguments for method apply: (name: Symbol, namedExpr: Solution.RCFAE, body: Solution.RCFAE)Solution.Rec in object Rec.
Unspecified value parameter body.
Error occurred in an application involving default arguments.
{ interp(Rec(List('odd -> Fun('n,
^
Whats wrong here? Shouldn't the test be syntactically correct, but yield an error on execution time?
you have to change the Rec case class.

Re: Ex 05, Rec Expression: RunningFailure?

Verfasst: 22. Mai 2013 13:13
von Osterlaus
m.v. hat geschrieben:
Osterlaus hat geschrieben:Another tiny question: simply compiling and testing the second exercise gives this error:
Status: CompilationFailure
test.scala:8: error: not enough arguments for method apply: (name: Symbol, namedExpr: Solution.RCFAE, body: Solution.RCFAE)Solution.Rec in object Rec.
Unspecified value parameter body.
Error occurred in an application involving default arguments.
{ interp(Rec(List('fac -> Fun('n,
^
test.scala:15: error: not enough arguments for method apply: (name: Symbol, namedExpr: Solution.RCFAE, body: Solution.RCFAE)Solution.Rec in object Rec.
Unspecified value parameter body.
Error occurred in an application involving default arguments.
{ interp(Rec(List('odd -> Fun('n,
^
Whats wrong here? Shouldn't the test be syntactically correct, but yield an error on execution time?
you have to change the Rec case class.
Hmmm, okay, that seems kind of obvious. But what type parameter do I pass to that list if it should contain both key/value pairs of type Symbol -> RCFAE *and* at last parameter the value? If I use just List[RCFAE], I see the same error as above with the output "too many arguments for method apply" :/

Re: Ex 05, Rec Expression: RunningFailure?

Verfasst: 22. Mai 2013 15:31
von m.v.
try List[(Symbol,RCFAE)]

Re: Ex 05, Rec Expression: RunningFailure?

Verfasst: 22. Mai 2013 16:26
von Osterlaus
m.v. hat geschrieben:try List[(Symbol,RCFAE)]
Thanks, but that does still not work :(
test.scala:8: error: too many arguments for method apply: (identifiers: List[(Symbol, Solution.RCFAE)])Solution.Rec in object Rec

Re: Ex 05, Rec Expression: RunningFailure?

Verfasst: 22. Mai 2013 18:57
von Seldon
Did you remove the body from your Rec case class by accident?