ah got it `class Foo<T> where T: I, ... ()` ...
# getting-started
r
ah got it
class Foo<T> where T: I, ... ()
and not after
()
as for functions
🧵 4
s
I don’t think this is right. The
where
clause goes after the default constructor and before the class body.
Got an example of what you tried that isn’t working?
r
class Foo<T> where T: Comparable<T>, T: CharSequence (val t: T)
doesn't work
s
Did you try this?
Copy code
class Foo<T>(val t: T) where T: Comparable<T>, T: CharSequence
r
but
class Foo<T> (val t: T) where T: Comparable<T>, T: CharSequence
does, I could swear before it didn't
s
Gremlins probably
r
most likely, I expected it to be after
()
anyway. thanks 🙂