New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated PhP doesn't follow PhP method overloading standards #991

Open
AdamBJ opened this Issue Feb 5, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@AdamBJ
Contributor

AdamBJ commented Feb 5, 2017

Brief Description

PhP shouldn't allow any method overriding since it relies on method names alone for method signatures. However, Umple is allowing method overriding as long as the function parameter types are different.

Minimum Steps to Reproduce

Use the following to generate PhP in Umple online:

class C
{  
  a(String input)
  {
  }
  a(Integer input)
  {
  }

}

It should produce an error, but doesn't.

@TimLethbridge

This comment has been minimized.

Show comment
Hide comment
@TimLethbridge

TimLethbridge Nov 21, 2017

Member

We don't have a consistent way to flag errors that affect only one generated language at the current time. One way to deal with this in PhP would be to generate one method and a condition that says if String then execute the first block, and if integer then generate the second. But that would not scale up to many arguments. We may want to do that and leave the other cases unresolved

Member

TimLethbridge commented Nov 21, 2017

We don't have a consistent way to flag errors that affect only one generated language at the current time. One way to deal with this in PhP would be to generate one method and a condition that says if String then execute the first block, and if integer then generate the second. But that would not scale up to many arguments. We may want to do that and leave the other cases unresolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment