Ex 05, Rec Expression: RunningFailure?

Osterlaus
BSc Spammer
BSc Spammer
Beiträge: 1263
Registriert: 23. Aug 2007 12:46
Wohnort: DA

Ex 05, Rec Expression: RunningFailure?

Beitrag 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...???

Osterlaus
BSc Spammer
BSc Spammer
Beiträge: 1263
Registriert: 23. Aug 2007 12:46
Wohnort: DA

Re: Ex 05, Rec Expression: RunningFailure?

Beitrag 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?

m.v.
Neuling
Neuling
Beiträge: 4
Registriert: 20. Apr 2012 06:03

Re: Ex 05, Rec Expression: RunningFailure?

Beitrag 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.

Osterlaus
BSc Spammer
BSc Spammer
Beiträge: 1263
Registriert: 23. Aug 2007 12:46
Wohnort: DA

Re: Ex 05, Rec Expression: RunningFailure?

Beitrag 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" :/

m.v.
Neuling
Neuling
Beiträge: 4
Registriert: 20. Apr 2012 06:03

Re: Ex 05, Rec Expression: RunningFailure?

Beitrag von m.v. »

try List[(Symbol,RCFAE)]

Osterlaus
BSc Spammer
BSc Spammer
Beiträge: 1263
Registriert: 23. Aug 2007 12:46
Wohnort: DA

Re: Ex 05, Rec Expression: RunningFailure?

Beitrag 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

Seldon
BASIC-Programmierer
BASIC-Programmierer
Beiträge: 119
Registriert: 19. Apr 2012 18:12

Re: Ex 05, Rec Expression: RunningFailure?

Beitrag von Seldon »

Did you remove the body from your Rec case class by accident?

Antworten

Zurück zu „Archiv“