10
Teknas
7y

Type checking huh ?

Comments
  • 1
    I don't get whats wrong. Type checking did what it has to
  • 3
    Well it's clearly stated in the error message "Two different types with this name exist but they are unrelated [...]"
  • 2
    @theCalcaholic if you're referring to shadowing, that was not the case. What solved it was removing the type completely because it was declared in the function Definition.
  • 0
    @Teknas Isn't that shadowing? ^^
  • 2
    @theCalcaholic I might be wrong but I guess declaring a variable with the same name in an inner scope is shadowing
  • 0
    @Teknas Yes it is. I think I misunderstood you. You didn't remove the type *definition*, but the typing of the variable to fix it, right?
  • 2
    @theCalcaholic I removed the type definition of the variable consuming the object. Because it was declared in the producer, the consumer didn't need to specify type.
Add Comment