diff options
| author | Dmitry Jemerov <yole@jetbrains.com> | 2016-01-08 18:06:06 +0100 |
|---|---|---|
| committer | Dmitry Jemerov <yole@jetbrains.com> | 2016-01-08 18:06:06 +0100 |
| commit | 7fb4d948893db3332fcb7610261300cc5b856cff (patch) | |
| tree | 23edf3361bb8c50a9ec1281c18c9c23136028744 /core/testdata | |
| parent | b3ce9a8eed32523c3ef2ee1ce186434bd14a6e64 (diff) | |
| download | dokka-7fb4d948893db3332fcb7610261300cc5b856cff.tar.gz dokka-7fb4d948893db3332fcb7610261300cc5b856cff.tar.bz2 dokka-7fb4d948893db3332fcb7610261300cc5b856cff.zip | |
rewrite propagation of extension functions to subclasses to handle shadowing and applicability more correctly
Diffstat (limited to 'core/testdata')
4 files changed, 71 insertions, 0 deletions
diff --git a/core/testdata/format/inapplicableExtensionFunctions.kt b/core/testdata/format/inapplicableExtensionFunctions.kt new file mode 100644 index 00000000..d2c65b46 --- /dev/null +++ b/core/testdata/format/inapplicableExtensionFunctions.kt @@ -0,0 +1,11 @@ +open class Foo<T> { +} + +class Bar : Foo<Char>() { +} + +fun Foo<Int>.shazam() { +} + +fun Bar.xyzzy() { +} diff --git a/core/testdata/format/inapplicableExtensionFunctions.md b/core/testdata/format/inapplicableExtensionFunctions.md new file mode 100644 index 00000000..8460cf2f --- /dev/null +++ b/core/testdata/format/inapplicableExtensionFunctions.md @@ -0,0 +1,20 @@ +[test](test/index) / [Bar](test/-bar/index) + + +# Bar + +`class Bar : [Foo](test/-foo/index)<Char>` + + + +### Constructors + + +| [<init>](test/-bar/-init-) | `Bar()` | + + +### Extension Functions + + +| [xyzzy](test/xyzzy) | `fun [Bar](test/-bar/index).xyzzy(): Unit` | + diff --git a/core/testdata/format/shadowedExtensionFunctions.kt b/core/testdata/format/shadowedExtensionFunctions.kt new file mode 100644 index 00000000..64df1ecb --- /dev/null +++ b/core/testdata/format/shadowedExtensionFunctions.kt @@ -0,0 +1,18 @@ +open class Foo { +} + +class Bar : Foo() { +} + +fun Foo.xyzzy() { +} + +fun Foo.shazam() { + +} + +fun Bar.xyzzy() { +} + +fun Bar.shazam(i: Int) { +} diff --git a/core/testdata/format/shadowedExtensionFunctions.md b/core/testdata/format/shadowedExtensionFunctions.md new file mode 100644 index 00000000..5218d299 --- /dev/null +++ b/core/testdata/format/shadowedExtensionFunctions.md @@ -0,0 +1,22 @@ +[test](test/index) / [Bar](test/-bar/index) + + +# Bar + +`class Bar : [Foo](test/-foo/index)` + + + +### Constructors + + +| [<init>](test/-bar/-init-) | `Bar()` | + + +### Extension Functions + + +| [shazam](test/shazam) | `fun [Bar](test/-bar/index).shazam(i: Int): Unit` +`fun [Foo](test/-foo/index).shazam(): Unit` | +| [xyzzy](test/xyzzy) | `fun [Bar](test/-bar/index).xyzzy(): Unit` | + |
