Describe the bug
Given a model:
union Foo {
foo: Boolean
}
The generated union code does not take into account the shadowed name:
public sealed class Foo {
public data class Foo(val value: Boolean)
public fun asFoo(): Boolean = (this as Foo.Foo).value // Compilation error: `Foo` (the data class) has no member `Foo`
}
The problem is likely in UnionGenerator's handling of symbols.
Expected behavior
Code should be generated correctly for a union that has a member of the same name
Current behavior
Code is generated incorrectly and fails to compile
Steps to Reproduce
See above model
Possible Solution
No response
Context
No response
Smithy-Kotlin version
1.2.18
Platform (JVM/JS/Native)
JVM
Operating system and version
(n/a)