Skip to content

Commit e9755c4

Browse files
committed
add failing test case for issue #270
1 parent 00461d2 commit e9755c4

File tree

1 file changed

+19
-0
lines changed
  • src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/failing

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.fasterxml.jackson.module.kotlin.test.failing
2+
3+
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
4+
import org.junit.Test
5+
import kotlin.test.assertEquals
6+
7+
class TestGithub270 {
8+
data class Wrapper(private val field: String) {
9+
val upper = field.toUpperCase()
10+
fun field() = field
11+
fun stillAField() = field
12+
}
13+
14+
@Test
15+
fun testPublicFieldOverlappingFunction() {
16+
val json = jacksonObjectMapper().writeValueAsString(Wrapper("Hello"))
17+
assertEquals("""{"upper":"HELLO"}""", json)
18+
}
19+
}

0 commit comments

Comments
 (0)