Skip to content

[Bug]: Extend - wrong computation for some derived properties #316

Description

@antoineatstariongroup

What type of issue is this?

  • Bug report
  • Feature request

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of the SysML2.NET
  • I have searched open and closed issues to ensure it has not already been reported

Description

While computing derived properties such the ActionUsage.actionDefinition, the implementation uses the actionUsageSubject.OwnedRelationship.OfType<IFeatureTyping>().Select(featureTyping => featureTyping.Type) for instead of going directly to the ´.type´ property, which should be the case.

Golden rule: Directly go through properties when possible (specially when the documentation directly speaks about type or definition)

In the current example, the related documentation is "The Behaviors that are the types of this ActionUsage", meaning that the correct implementation shall be actionUsageSubject.type.OfType<IBehavior>().

Steps to Reproduce

System Configuration

  • SysML2.NET version:
  • Environment (Operating system, version and so on):
  • .NET Framework version:
  • Additional information:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions