@@ -266,10 +266,7 @@ private void deleteTrapFileAndDependencies(IrDeclaration sym, String signature)
266
266
* Any unique suffix needed to distinguish `sym` from other declarations with the same name.
267
267
* For functions for example, this means its parameter signature.
268
268
*/
269
- private TrapFileManager getMembersWriterForDecl (IrDeclaration sym , String signature ) {
270
- File trap = getTrapFileForDecl (sym , signature );
271
- if (trap ==null )
272
- return null ;
269
+ private TrapFileManager getMembersWriterForDecl (File trap , IrDeclaration sym , String signature ) {
273
270
TrapClassVersion currVersion = TrapClassVersion .fromSymbol (sym , log );
274
271
String shortName = sym instanceof IrDeclarationWithName ? ((IrDeclarationWithName )sym ).getName ().asString () : "(name unknown)" ;
275
272
if (trap .exists ()) {
@@ -428,7 +425,8 @@ private TrapLocker(IrDeclaration decl, String signature) {
428
425
this .sym = decl ;
429
426
this .signature = signature ;
430
427
if (sym ==null ) {
431
- trapFile = getTrapFileForCurrentSourceFile ();
428
+ log .error ("Null symbol passed for Kotlin TRAP locker" );
429
+ trapFile = null ;
432
430
} else {
433
431
trapFile = getTrapFileForDecl (sym , signature );
434
432
}
@@ -446,7 +444,7 @@ private TrapLocker(String moduleName) {
446
444
public TrapFileManager getTrapFileManager () {
447
445
if (trapFile !=null ) {
448
446
lockTrapFile (trapFile );
449
- return getMembersWriterForDecl (sym , signature );
447
+ return getMembersWriterForDecl (trapFile , sym , signature );
450
448
} else {
451
449
return null ;
452
450
}
0 commit comments