https://kotlinlang.org logo
#announcements
Title
# announcements
c

cy

04/03/2017, 6:01 PM
@beholder perhaps you can look at particular example
b

beholder

04/03/2017, 6:03 PM
Why
head { head { } }
is prohibited, but
b { b { } }
is not?
c

cy

04/03/2017, 6:07 PM
Copy code
body {
    // here this : Body
    head {
        // here this : Head 
        // this : Body is hidden in this scope
        // but head requires receiver of type Body
        // this is why it is 
        // not available inside of this block
    }
}
DslMarker causes
head { }
invocation to hide outer
this
of type Body
if you remove dsl marker then there will be two `this`: one of type
Head
and another one of type
Body
however
Head
is marked with annotation so outer
this
scopes are not visible
ops, it's about head, will edit now
sorry for confusion
b

beholder

04/03/2017, 6:27 PM
Where should I put marker to prevent
b { b { ... } }
call for example?