Skip to content

Commit

Permalink
IR: put resolution of unbound type parameter symbols behind a languag…
Browse files Browse the repository at this point in the history
…e version flag
  • Loading branch information
Georgy Bronnikov committed Apr 15, 2020
1 parent a1a2da3 commit 284533f
Showing 1 changed file with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,23 @@ class ExternalDependenciesGenerator(
}
} while (unbound.isNotEmpty())
}
}

private val SymbolTable.allUnbound: List<IrSymbol>
get() {
val r = mutableListOf<IrSymbol>()
r.addAll(unboundClasses)
r.addAll(unboundConstructors)
r.addAll(unboundEnumEntries)
r.addAll(unboundFields)
r.addAll(unboundSimpleFunctions)
r.addAll(unboundProperties)
r.addAll(unboundTypeAliases)
r.addAll(unboundTypeParameters)
return r
}
private val SymbolTable.allUnbound: List<IrSymbol>
get() {
val r = mutableListOf<IrSymbol>()
r.addAll(unboundClasses)
r.addAll(unboundConstructors)
r.addAll(unboundEnumEntries)
r.addAll(unboundFields)
r.addAll(unboundSimpleFunctions)
r.addAll(unboundProperties)
r.addAll(unboundTypeAliases)
if (!languageVersionSettings.supportsFeature(LanguageFeature.NewInference)) {
r.addAll(unboundTypeParameters)
}
return r
}
}

fun List<IrProvider>.getDeclaration(symbol: IrSymbol): IrDeclaration =
firstNotNullResult { provider ->
Expand Down

0 comments on commit 284533f

Please sign in to comment.