Skip to content

Commit

Permalink
add failing test case for issue #270
Browse files Browse the repository at this point in the history
  • Loading branch information
apatrida committed Dec 8, 2019
1 parent 00461d2 commit e9755c4
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.fasterxml.jackson.module.kotlin.test.failing

import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import org.junit.Test
import kotlin.test.assertEquals

class TestGithub270 {
data class Wrapper(private val field: String) {
val upper = field.toUpperCase()
fun field() = field
fun stillAField() = field
}

@Test
fun testPublicFieldOverlappingFunction() {
val json = jacksonObjectMapper().writeValueAsString(Wrapper("Hello"))
assertEquals("""{"upper":"HELLO"}""", json)
}
}

0 comments on commit e9755c4

Please sign in to comment.