Warning "value of type parameter is predetermined" is no more generated for sealed bound #KT-9244 Fixed

This commit is contained in:
Mikhail Glukhikh
2015-09-30 15:30:04 +03:00
parent b24623810e
commit 92f031cc46
4 changed files with 44 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
// See KT-9244
sealed class Foo {
class Bar : Foo()
class Baz : Foo()
}
// The following warning seems incorrect here
// "Foo is a final type, and thus a value of the type parameter is predetermined"
fun <T : Foo> doit(arg: T): T = arg