-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve imported statements in inheritance clauses
Among other things this leads to unaliasing of inherited clauses, which ideally should be fixed but in any case this fix would be a part of separate commit.
- Loading branch information
Showing
6 changed files
with
104 additions
and
27 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
compiler/test/data/typescript/inheritance/missingMembers/_importedApi.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
export interface A { | ||
ping(a: string); | ||
} | ||
|
||
export type B = A; |
50 changes: 50 additions & 0 deletions
50
...test/data/typescript/inheritance/missingMembers/addMissingMemberFromImportedEntities.d.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS", "EXTERNAL_DELEGATION") | ||
|
||
import kotlin.js.* | ||
import kotlin.js.Json | ||
import org.khronos.webgl.* | ||
import org.w3c.dom.* | ||
import org.w3c.dom.events.* | ||
import org.w3c.dom.parsing.* | ||
import org.w3c.dom.svg.* | ||
import org.w3c.dom.url.* | ||
import org.w3c.fetch.* | ||
import org.w3c.files.* | ||
import org.w3c.notifications.* | ||
import org.w3c.performance.* | ||
import org.w3c.workers.* | ||
import org.w3c.xhr.* | ||
|
||
external open class C : A { | ||
open fun ping(c: Any) | ||
override fun ping(a: String) | ||
} | ||
|
||
external open class D : A { | ||
open fun ping(d: Any) | ||
override fun ping(a: String) | ||
} | ||
|
||
// ------------------------------------------------------------------------------------------ | ||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS", "EXTERNAL_DELEGATION") | ||
|
||
import kotlin.js.* | ||
import kotlin.js.Json | ||
import org.khronos.webgl.* | ||
import org.w3c.dom.* | ||
import org.w3c.dom.events.* | ||
import org.w3c.dom.parsing.* | ||
import org.w3c.dom.svg.* | ||
import org.w3c.dom.url.* | ||
import org.w3c.fetch.* | ||
import org.w3c.files.* | ||
import org.w3c.notifications.* | ||
import org.w3c.performance.* | ||
import org.w3c.workers.* | ||
import org.w3c.xhr.* | ||
|
||
external interface A { | ||
fun ping(a: String) | ||
} | ||
|
||
typealias B = A |
9 changes: 9 additions & 0 deletions
9
...test/data/typescript/inheritance/missingMembers/addMissingMemberFromImportedEntities.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import {A, B} from "./_importedApi"; | ||
|
||
declare class C implements A { | ||
ping(c: any); | ||
} | ||
|
||
declare class D implements A { | ||
ping(d: any); | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters