Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[bug] An embedded's embedded extender is not applied to the first embeder's interface #634

@Niels-Erik

Description

@Niels-Erik

Alt Title
Embedding chains with multible interface extenders does not work.

Description
If a service, a, embeds a service, b, that uses the interface extender on an embedded service, c, which also uses an interface extender on a embedded service, d, then the extender in service c is 'forgotten'.

To reproduce
Run service a in the following code, where we get the error Output message TypeMismatch (test@b): Unexpected child node: #Message.num:

interface API {
    requestResponse:
        test(void)(void)
}

service d {
    execution: concurrent

    inputPort Input {
        location: "local"
        interfaces: API
    }

    main {
      [test()()]
    }
}

type num {
  num: int
}

interface extender numextend {
  RequestResponse:
    test( num )( void ),
}

service c {
    embed d as d

    inputPort Input {
        location: "local"
        Aggregates: d with numextend
    }

    courier Input {
      [ test( req )( res ) ] {
        forward( req )( res )
      }
    }

    main {
      linkIn(l)
    }
}

type str {
  str: string
}

interface extender stringextend {
  RequestResponse:
    test( str )( void ),
}

service b {
    embed c as c

    inputPort Input {
        location: "local"
        Aggregates: c with stringextend
    }

    courier Input {
      [ test( req )( res ) ] {
        forward( req )( res )
      }
    }

    main {
      linkIn(l)
    }
}

service a {
  embed b as b

  main
  {
    test@b( {num = 5 str = "s"} )( res )
  }
}

Expected behaviour
Code should run without faults.

Desktop:
OS: windows
Jolie version: 1.13-git

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions