Diagnostic update to support default parameters in inline methods

This commit is contained in:
Mikhael Bogdanov
2014-05-15 16:32:02 +04:00
parent 3bd1329846
commit d73ffc2f48
4 changed files with 25 additions and 2 deletions
@@ -0,0 +1,15 @@
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE
inline fun default(s : Int = 10) {
}
inline fun default2(p: Int, s : String = "OK") {
}
open class Base {
inline final fun foo(a: Int = 1) {}
inline final fun foo2(a: Int = 1, s: String = "OK") {}
}
@@ -17,7 +17,7 @@ inline fun unsupported() {
}<!>
}
inline fun unsupportedDefault(<!NOT_YET_SUPPORTED_IN_INLINE!>s : Int = 10<!>) {
inline fun unsupportedDefault(<!NOT_YET_SUPPORTED_IN_INLINE!>s : ()->Unit = {}<!>) {
}