Code: Alles auswählen
def testZeroArg2 {
expect(Fun('_, Num(3))) {
interp(preproc(SWith('c, SFun(List(), 3), 'c)))
}
}
Second question:
Are you sure that interp deals correctly with
Code: Alles auswählen
Fun('_, Num(3))
thanks
Code: Alles auswählen
def testZeroArg2 {
expect(Fun('_, Num(3))) {
interp(preproc(SWith('c, SFun(List(), 3), 'c)))
}
}
Code: Alles auswählen
Fun('_, Num(3))
Code: Alles auswählen
def testZeroArg1 {
expect (Num(3)) {
interp(preproc(SWith('c, SFun(List(), 3), SApp('c, List()))))
}
}
Code: Alles auswählen
Test testZeroArg1 failed: Expected Num(3), but got Fun('_,Num(3))
Code: Alles auswählen
def testZeroArg2 {
expect(Fun('_, Num(3))) {
interp(preproc(SWith('c, SFun(List(), 3), 'c)))
}
}
No, but as you have to rewrite SApp to App you obviously have to rewrite its funExpr and args as well.When the preprocessor receives the SApp type from the test, it does not see the SFun type