-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Compiler plugin] Add warning to avoid confusion with missing extensi…
…on properties
- Loading branch information
Showing
4 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
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
11 changes: 11 additions & 0 deletions
11
plugins/kotlin-dataframe/testData/diagnostics/targetOfCastIsNotDataSchema.fir.txt
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,11 @@ | ||
FILE: targetOfCastIsNotDataSchema.kt | ||
public abstract interface MySchema : R|kotlin/Any| { | ||
public abstract val a: R|kotlin/String| | ||
public get(): R|kotlin/String| | ||
|
||
} | ||
public final fun box(): R|kotlin/String| { | ||
lval df: R|{org/jetbrains/kotlinx/dataframe/AnyFrame=} org/jetbrains/kotlinx/dataframe/DataFrame<*>| = Q|org/jetbrains/kotlinx/dataframe/DataFrame|.R|org/jetbrains/kotlinx/dataframe/DataFrame.Companion.Empty| | ||
R|<local>/df|.R|org/jetbrains/kotlinx/dataframe/api/cast|<R|MySchema|>() | ||
^box String(OK) | ||
} |
13 changes: 13 additions & 0 deletions
13
plugins/kotlin-dataframe/testData/diagnostics/targetOfCastIsNotDataSchema.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,13 @@ | ||
import org.jetbrains.kotlinx.dataframe.* | ||
import org.jetbrains.kotlinx.dataframe.annotations.* | ||
import org.jetbrains.kotlinx.dataframe.api.* | ||
import org.jetbrains.kotlinx.dataframe.io.* | ||
|
||
interface MySchema { | ||
val a: String | ||
} | ||
fun box(): String { | ||
val df = DataFrame.Empty | ||
<!CAST_TARGET_WARNING!>df.cast<MySchema>()<!> | ||
return "OK" | ||
} |
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