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
trait A { | |
private fun foo() | |
fun bar() { | |
foo() | |
} | |
} | |
class B: A {} | |
fun main(args: Array<String>) { |
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("") { |
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
open class TagAttributes | |
var TagAttributes.id = "" | |
class Tag<out T: TagAttributes>(val containingTag: Tag<TagAttributes>?, val t: T) { | |
val attr: T = t | |
fun attr(f: T.() -> Unit) { | |
} | |
} |
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
open class A(open val bar: Int = 5) { | |
{ | |
println("A: " + bar) | |
} | |
} | |
class B(override val bar: Int = 2) : A() { | |
{ | |
println("B: " + bar) |
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
open class A() { | |
open fun bar(t: Int = 1) = t | |
} | |
class B: A() { | |
override fun bar(t: Int): Int { | |
return super.bar() | |
} | |
} |
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
open class A { | |
open val bar: Int | |
{ | |
bar = 3 | |
println(bar) | |
} | |
} | |
class B : A() { | |
override val bar = 4 |
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 class Test { | |
private static class A { | |
private int bar; | |
private A() { | |
bar = 3; | |
System.out.println(getBar()); | |
} | |
public int getBar() { | |
return bar; |
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
trait Inv<T> { | |
var t: T | |
} | |
fun <T> some(t: Inv<T>): Inv<Inv<T>> { | |
return object : Inv<Inv<T>> { | |
override var t: Inv<T> | |
get() = t | |
set(value: Inv<T>) { | |
t.t = value.t |
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
\documentclass[10pt]{article} | |
\usepackage[utf8]{inputenc} | |
\usepackage[english,russian]{babel} | |
\inputencoding{utf8} | |
\usepackage{amsmath} | |
\usepackage{amsthm} | |
\usepackage{amssymb} | |
\newcommand{\Expect}{\mathbb E} | |
\newcommand{\PRob}{\mathbb P} |
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
fun bar(s: List<String>) {} | |
fun test() { | |
bar(listOf().filter { false }) | |
} |