Boo
  1. Boo
  2. BOO-411

type inference for operator methods is done too late

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.5.6
    • Fix Version/s: 0.6
    • Component/s: Compiler
    • Labels:
      None
    • Testcase included:
      yes
    • Number of attachments :
      0

      Description

      """
      True
      """
      class Id:
      id as string

      def constructor( newId as string ):
      if newId == null:
      raise "Id: is null parameter"
      id = newId

      def Equals( x as object ):
      return (self == x)

      static def op_Equality( left as Id, right as duck ):
      if right isa Id:
      rightId = right as Id
      return rightId.id.Equals( left.id )
      return false

      def GetHashCode():
      return id.GetHashCode()

      print Id("A") == Id("A")

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Rodrigo B. de Oliveira
            Reporter:
            Rodrigo B. de Oliveira
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: