-
Notifications
You must be signed in to change notification settings - Fork 55
Description
Description
1:
If forward throws a TypeMismatch because the request part is wrong then the given line number comes from the next statement/symbol in the block.
2:
If the response is incorrect when operation bock is over then the given line number is the line that has the courier statement on.
To reproduce
1:
run operation nothing1 on embedder service on the code below, which gives the error line:
Source location: C:\...\test.ol:40
2:
run operation nothing2 on embedder service on the code below, which gives the error line:
Source location: C:\...\test.ol:33
code:
interface API {
requestResponse:
nothing1( void )( void ),
nothing2( void )( void )
}
service nothing {
execution: concurrent
inputPort dateInput {
location: "local"
interfaces: API
}
main {
[nothing1()()]
[nothing2()()]
}
}
interface extender noExtend {
RequestResponse:
*( void )( void ),
}
service embedder {
embed nothing as nothing
inputPort input {
location: "local"
aggregates: nothing with noExtend
}
courier input {
[nothing1( req )( res ) ] {
req.wrong = 1
forward( req )( res )
nullProcess
}
[nothing2( req )( res ) ] {
forward( req )( res )
res.wrong = 5
}
}
main { linkIn(l) }
}
service test {
embed embedder as e
main
{
nothing1@e()()
nothing2@e()()
}
}
Expected behaviour
1:
For problem 1 the expected outcome should be:
Source location: C:\...\test.ol:36
2:
For problem 1 the expected outcome should be:
Source location: C:\...\test.ol:45
Note: or they should be close/using the correct parsing context as #582 could be an issue after fix.
Desktop (please complete the following information):
- OS: windows
- Jolie version 1.13-git
- Java Version 21