Fix AssertionError on incompatible scopes with impl typealias

This has been introduced in 9ecd04f628
This commit is contained in:
Alexander Udalov
2017-08-31 16:14:44 +03:00
parent f695ff96e8
commit 05290c3ed2
5 changed files with 37 additions and 2 deletions
@@ -0,0 +1,3 @@
package test
header abstract class Writer protected constructor()
@@ -0,0 +1,3 @@
package test
impl typealias Writer = java.io.Writer
@@ -0,0 +1,18 @@
-- Common --
Exit code: OK
Output:
-- JVM --
Exit code: COMPILATION_ERROR
Output:
compiler/testData/multiplatform/regressions/incompatibleClassScopesWithImplTypeAlias/jvm.kt:3:1: error: 'impl' class 'Writer' has no implementation of 'header' class members:
protected constructor Writer()
The following declaration is incompatible because visibility is different:
protected/*protected and package*/ constructor Writer()
The following declaration is incompatible because number of value parameters is different:
protected/*protected and package*/ constructor Writer(p0: Any!)
impl typealias Writer = java.io.Writer
^