#1738 Ambiguous slot issue

Yuri Strot Mon 19 Dec 2011

Please take a look at the following snippet:

class A

  new make(|This| f) { f(this) }

  Int x

  private Int y


class B

  Int y

  // Compile error: Ambiguous slot 'y' on both 'this' (test::B) and 'it' (test::A)
  A a() { A { x = y } }


This issue breaks encapsulation.

brian Mon 19 Dec 2011

Promoted to ticket #1738 and assigned to brian

Agree, it sort of breaks the encapsulation

brian Wed 15 Feb 2012

Ticket resolved in 1.0.62

Fixed compiler to handle that case


Login or Signup to reply.