Skip to content

mjburghoffer/kotlin-type-inference-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

In order to replicate the bug that halts IntelliJ:

  1. Install IntelliJ IDEA 2020
  2. Use kotlin plugin 1.3.71 or better
  3. Open BugHere.kt
  4. Remove the two typecasts (as MetricInfoTable<*>) - shown below
  5. Trigger autocomplete of some sort
val table: MetricInfoTable<*> = when (type) {
    MetricSource.CUSTOM -> CustomMetricInfoTable.CUSTOM_METRIC_INFO
    MetricSource.DEFAULT -> DefaultMetricInfoTable.DEFAULT_METRIC_INFO
}