And what's the total length? Are you on windows? W...
# announcements
k
And what's the total length? Are you on windows? What's the actual exception thrown?
t
Anything over 255 triggers it. Not on windows. Actual exception is
FileNotFoundException (file name too long)
. Example code:
Copy code
class NameTooLongTestCase {
    fun `this is a very long function name used to illustrate the problem I'm hitting - an issue involving anonymous class compilation and I'm wondering if anyone knows a workaround - the file path of the anonymous class kotlinc produces is too long and the FileOutputStream used to write the classes to disk throws an exception`() {
        function_that_takes_a_lambda { }
    }

    fun function_that_takes_a_lambda(lambda: () -> Unit) {}
}
There's an existing issue for this problem here, I'm hoping someone has a workaround in the meantime https://youtrack.jetbrains.net/issue/KT-17433