Concept Flow - Type constraints with upper bounds
Define generic type T
Set upper bound: T must be subtype of SomeClass
Use T in function or class
Call function with argument of type T or subtype
Compile-time check: argument type fits upper bound?
Yes No
Run function
Function logic uses T safely
End
This flow shows how Kotlin checks that a generic type T respects an upper bound before running the function.