Move LSP semantics into typed analysis

This commit is contained in:
pavel 2026-08-27 21:28:11 +02:00
commit bac1183593
26 changed files with 1232 additions and 637 deletions

15
examples/generics.gt Normal file
View file

@ -0,0 +1,15 @@
package main
data class Box<T>(var value: T) {
fun get(): T { return value }
}
fun identity<T>(value: T): T { return value }
fun main() {
val number = identity(42)
val text = identity<String>("value")
val box = Box(text)
println(number)
println(box.get())
}

View file

@ -30,7 +30,7 @@ class EpicControllerImpl(val db: *bun.DB) {
db.NewCreateTable().Model(model).IfNotExists().Exec(ctx)
val user = BunUser("user-from-gotlin")
db.NewInsert().Model(user).Exec(ctx)
val total = db.NewSelect().Model(model).Count(ctx)
val total = db.NewSelect().Model(model).Count(ctx).unwrap()
fmt.Fprintln(w, "bun users total:", total)
}