Last active
December 19, 2015 19:58
-
-
Save erokhins/6009727 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class Attrs<out T: HtmlTag>(tag: T): AbstractCommonAttribute<Attrs<T>>(tag) | |
open class A(containingTag: HtmlBodyTag): AllowText, HtmlBodyTag(containingTag, "a") { | |
// public final class Attrs(htmlTag: HtmlTag): AbstractCommonAttribute<Attrs>(htmlTag) | |
public open val attr: Attrs<A> = Attrs(this) | |
} | |
public var Attrs<A>.href: Link by Attributes.href | |
class A1: A("") { | |
override val attr: Attrs<A1> = Attrs(this) | |
} | |
var Attrs<A1>.foo = 1 | |
fun main(args: Array<String>) { | |
A1().attr.foo | |
A1().attr.href | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment