Skip to content

Instantly share code, notes, and snippets.

enum TestEnum {
case e1
case e2
}
let a: Any = TestEnum.e1
let b: Any = TestEnum.e2
let q = (a == b) // <--- error here
class Test {
func testFunc<T>() -> [T] {
var list = [T]()
return list
}
}
func test(text: String, value: Int) {
println(text)
println(value)
}
test("Hallo", 4)
class Test {
class func test(text: String, value: Int) {
println(text)
#!/bin/bash
HOME=/var/services/homes/backupchef
SNAPSHOT_DIR=$HOME/backups/myserver
LOG_DIR=$HOME/backups
KEY_ID=$HOME/.ssh/id_rsa
RM=/bin/rm;
MV=/bin/mv;
CP=/bin/cp;
$RM -rf $SNAPSHOT_DIR/daily.6;
class Test {
var testVar: Int = 0 {
didSet {
println("Hello")
}
}
init(bla: Int) {
self.testVar = bla
}