Skip to content

Instantly share code, notes, and snippets.

@abreslav
Created March 27, 2012 07:45
Show Gist options
  • Save abreslav/2213773 to your computer and use it in GitHub Desktop.
Save abreslav/2213773 to your computer and use it in GitHub Desktop.
Running functions named as Java keywords (in Kotlin)
fun assert(i : Int) = println(i)
fun abstract(i : Int) = println(i)
fun boolean(i : Int) = println(i)
fun `break`(i : Int) = println(i)
fun byte(i : Int) = println(i)
fun case(i : Int) = println(i)
fun catch(i : Int) = println(i)
fun char(i : Int) = println(i)
fun `class`(i : Int) = println(i)
fun const(i : Int) = println(i)
fun `continue`(i : Int) = println(i)
fun default(i : Int) = println(i)
fun `do`(i : Int) = println(i)
fun double(i : Int) = println(i)
fun `else`(i : Int) = println(i)
fun enum(i : Int) = println(i)
fun extends(i : Int) = println(i)
fun final(i : Int) = println(i)
fun finally(i : Int) = println(i)
fun float(i : Int) = println(i)
fun `for`(i : Int) = println(i)
fun goto(i : Int) = println(i)
fun `if`(i : Int) = println(i)
fun implements(i : Int) = println(i)
fun import(i : Int) = println(i)
fun instanceof(i : Int) = println(i)
fun int(i : Int) = println(i)
fun interface(i : Int) = println(i)
fun long(i : Int) = println(i)
fun native(i : Int) = println(i)
fun new(i : Int) = println(i)
fun `package`(i : Int) = println(i)
fun private(i : Int) = println(i)
fun protected(i : Int) = println(i)
fun public(i : Int) = println(i)
fun `return`(i : Int) = println(i)
fun `short`(i : Int) = println(i)
fun static(i : Int) = println(i)
fun strictfp(i : Int) = println(i)
fun `super`(i : Int) = println(i)
fun switch(i : Int) = println(i)
fun synchronized(i : Int) = println(i)
fun `this`(i : Int) = println(i)
fun `throw`(i : Int) = println(i)
fun throws(i : Int) = println(i)
fun transient(i : Int) = println(i)
fun `try`(i : Int) = println(i)
fun void(i : Int) = println(i)
fun volatile(i : Int) = println(i)
fun `while`(i : Int) = println(i)
fun main(args : Array<String>) {
assert(1)
abstract(1)
boolean(1)
`break`(1)
byte(1)
case(1)
catch(1)
char(1)
`class`(1)
const(1)
`continue`(1)
default(1)
`do`(1)
double(1)
`else`(1)
enum(1)
extends(1)
final(1)
finally(1)
float(1)
`for`(1)
goto(1)
`if`(1)
implements(1)
import(1)
instanceof(1)
int(1)
interface(1)
long(1)
native(1)
new(1)
`package`(1)
private(1)
protected(1)
public(1)
`return`(1)
`short`(1)
static(1)
strictfp(1)
`super`(1)
switch(1)
synchronized(1)
`this`(1)
`throw`(1)
throws(1)
transient(1)
`try`(1)
void(1)
volatile(1)
`while`(1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment