-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Labels
Description
Describe the bug
If an extender adds something to the request side and not the response side, jolie2surface will use the same new type if one of two Request-Repsones have void as request and the other has void as response.
running jolie2surface on the port "input" on this:
type type1 {
thing: any
}
type type2 { ones*: type1 }
interface api {
requestResponse:
call1(void)(type2),
call2(type1)(void)
}
type type3 { extend: string }
interface extender TokenExtender {
RequestResponse:
*( type3 )( void )
}
service bug {
outputPort output {
location: "local"
interfaces: api
}
inputPort input {
location: "local"
aggregates: output with TokenExtender
}
courier input {
[ interface api( request )( response ){
forward( request )( response )
} ]
}
main{ linkIn(l) }
}
Gives the following output:
type input_void:void {
.extend:string
}
type input_type2:void {
.ones[0,*]:type1
}
type input_type1:void {
.extend:string
.thing:any
}
type type1:void {
.thing:any
}
interface inputSurface {
RequestResponse:
call1( input_void )( input_type2 ),
call2( input_type1 )( input_void )
}
outputPort input {
Location: "local"
Interfaces: inputSurface
}
Where we can see that input_void is used as response of call2, which is wrong.
To Reproduce
Steps to reproduce the behavior:
- Create bug.ol with the first code
- run
jolie2surface bug.ol input - See that the output is wrong
Expected behavior
That jolie2surface gave the correct output as described
Desktop (please complete the following information):
- OS: windows
- Jolie version 1.13.0-git
- Java Version 21