Interface example parsing error, end feature must have exactly one type

Hi, I have in my model a problem with an interface. I can reproduce the error from an example from the Sysml v2 standard. The linked help page shows another error (association-end-types — Syside). I think this is a bug.

Version: 0.10.3

Error message:

An owned Association end feature must have exactly one type
OMG_interface_example.sysml(7, 14): Is typed by interface_example::Pa
Ports.sysml(11, 23): Is typed by Ports::Port

Sysml v2 textual notation:

package interface_example {

item def Item1;

item def Item2;

part def Part1;

part def Part2;

port def Pa {

out item i1Out : Item1;

in item i2In : Item2;

}

interface def Interface2 {

end supplierP : Pa;

end consumerP : ~Pa;

flow supplierP.i1Out to consumerP.i1Out;

flow consumerP.i2In to supplierP.i2In;

}

part part0 {

part part1 : Part1 {

port pa : Pa;

}

part part2 : Part2 {

port pb : ~Pa;

}

interface if2 : Interface2 connect part1.pa to part2.pb;

}

}

Let me know if you need further information.

Hi,

I cannot reproduce this on 0.10.3. The diagnostic will be triggered if interface ends are not typed by port defs since default ends are implicitly typed by standard Port from port usage constraints, e.g. changing port def Pa to part def Pa.

package interface_example {
    item def Item1;
    item def Item2;
    part def Part1;
    part def Part2;

    port def Pa {
        out item i1Out : Item1;
        in item i2In : Item2;
    }

    interface def Interface2 {
        end supplierP : Pa;
        end consumerP : ~Pa;

        flow supplierP.i1Out to consumerP.i1Out;
        flow consumerP.i2In to supplierP.i2In;
    }

    part part0 {
        part part1 : Part1 {
            port pa : Pa;
        }

        part part2 : Part2 {
            port pb : ~Pa;
        }

        interface if2 : Interface2 connect part1.pa to part2.pb;
    }
} // package interface_example

Thank you for the quick response. Is there a way how I can trigger to accept/ignore this diagnostic?
It appears as well when I copy/paste your snippet.

When you hover over Pa and supplierP, do you get the same contents? Tried x64-linux and x64-windows builds going back to 0.9.0 and still cannot reproduce. Another potential cause is that there is another workspace file with Ports::Port that clashes with the standard Ports::Port.


Thank you for the hint. I guess than it must be a conflict with another workspace file with Ports::Port. When I copy the file into a fresh workspace, the error is gone.

I double checked also where the error appeared: Yes, I get the same hover-messages:

When I hover over Pa:

PortDefinition interface_example::Pa
in OMG_interface_example.sysml

Port is the most general class of objects that represent connection points for interacting with a Part. Port is the base type of all PortDefinitions.

Transfers outgoing from a Port are always targeted to a Port connected to the original Port by an Interface.

When I hover over supplierP (with the “: Pa” removed, otherwise I only get the error message":

PortUsage interface_example::Interface2::supplierP
in OMG_interface_example.sysml

Port is the most general class of objects that represent connection points for interacting with a Part. Port is the base type of all PortDefinitions.

Transfers outgoing from a Port are always targeted to a Port connected to the original Port by an Interface.

Still, I close the bug report → no bug. Thank you for the help!