Rework support of Iterator.iterator optimization in ForLoopsLowering
- Fix the predicate used for finding the member function `next`: check that there's no extension receiver parameter, don't filter out abstract functions. - Do not copy iterator expression, instead change the type in all references to the iterator variable. - Fix some style issues. #KT-47171 Fixed
This commit is contained in:
committed by
Alexander Udalov
parent
1b776bd5b6
commit
157db778fd
@@ -29,6 +29,9 @@ fun IrClassifierSymbol.isStrictSubtypeOfClass(superClass: IrClassSymbol): Boolea
|
||||
fun IrType.isSubtypeOfClass(superClass: IrClassSymbol): Boolean =
|
||||
this is IrSimpleType && classifier.isSubtypeOfClass(superClass)
|
||||
|
||||
fun IrType.isStrictSubtypeOfClass(superClass: IrClassSymbol): Boolean =
|
||||
this is IrSimpleType && classifier.isStrictSubtypeOfClass(superClass)
|
||||
|
||||
fun IrType.isSubtypeOf(superType: IrType, typeSystem: IrTypeSystemContext): Boolean =
|
||||
AbstractTypeChecker.isSubtypeOf(createIrTypeCheckerState(typeSystem), this, superType)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user