Add test for another case.
This commit is contained in:
@@ -62,6 +62,10 @@ public final class InlineTest extends SingleFileTranslationTest {
|
||||
checkFooBoxIsTrueAndFunctionNameIsNotReferenced("extension.kt", "myInlineExtension");
|
||||
}
|
||||
|
||||
public void testExtensionWithParameter() throws Exception {
|
||||
checkFooBoxIsTrueAndFunctionNameIsNotReferenced("extensionWithParameter.kt", "myInlineExtension");
|
||||
}
|
||||
|
||||
private void checkFooBoxIsTrueAndFunctionNameIsNotReferenced(@NotNull String filename, String funName) throws Exception {
|
||||
checkFooBoxIsTrue(filename);
|
||||
String generatedJSFilePath = getOutputFilePath(filename);
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package foo
|
||||
|
||||
class A() {
|
||||
val a = 5
|
||||
}
|
||||
|
||||
inline fun A.myInlineExtension(i : Int) = a + i
|
||||
|
||||
fun box() = A().myInlineExtension(1) == 6
|
||||
Reference in New Issue
Block a user