Kotlin / dukat

Converter of <any kind of declarations> to Kotlin external declarations
557 stars 42 forks source link

Add support for null default value for nullable members of dictionaries. #392

Closed marcinbak closed 4 years ago

marcinbak commented 4 years ago

Added support for null default value for nullable members of dictionaries.

Change required to parse specification https://www.w3.org/TR/IndexedDB/#events

Schahen commented 4 years ago

Hey @marcinbak! Thank you for the PR. Can you please add also a test case - so that it would be self-evident what the PR is about.

marcinbak commented 4 years ago

@Schahen I wanted to write a unit test for that but couldn't find any in the project. In what form and where should this test case go?

trilis commented 4 years ago

Please add your test in form of .webidl and .d.kt files with matching names to https://github.com/Kotlin/dukat/tree/master/compiler/test/data/idl You can then check if it passes by launching https://github.com/Kotlin/dukat/blob/master/compiler/test/src/org/jetbrains/dukat/compiler/tests/core/IdlTests.kt

marcinbak commented 4 years ago

Added tests to existing dictionary test cases so it's in one place. Hope that's ok.

trilis commented 4 years ago

Sure, LGTM. Thank you for your contribution!