Fantom

Login | Register

Ambiguous slot issue #1738

ystrot
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
19 Dec 2011

Promoted to ticket #1738 and assigned to brian

Agree, it sort of breaks the encapsulation

brian
15 Feb 2012

Ticket resolved in 1.0.62

Fixed compiler to handle that case

changeset

Login or Register to Reply

Back | All Topics