Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add BuiltinMethodId.copy
  • Loading branch information
IlyaMuravjov committed Dec 13, 2023
commit 13070949cdd9633f41a28060e29cc7a39cffb91a
Original file line number Diff line number Diff line change
Expand Up @@ -1427,12 +1427,12 @@ open class ConstructorId(

}

data class BuiltinMethodId(
override val classId: ClassId,
override val name: String,
override val returnType: ClassId,
override val parameters: List<ClassId>,
override val bypassesSandbox: Boolean,
class BuiltinMethodId(
classId: ClassId,
name: String,
returnType: ClassId,
parameters: List<ClassId>,
bypassesSandbox: Boolean,
override val modifiers: Int,
) : MethodId(classId, name, returnType, parameters, bypassesSandbox) {
constructor(
Expand All @@ -1441,7 +1441,7 @@ data class BuiltinMethodId(
returnType: ClassId,
parameters: List<ClassId>,
bypassesSandbox: Boolean = false,
// by default we assume that the builtin method is non-static and public
// by default, we assume that the builtin method is non-static and public
isStatic: Boolean = false,
isPublic: Boolean = true,
isProtected: Boolean = false,
Expand All @@ -1459,6 +1459,22 @@ data class BuiltinMethodId(
protected = isProtected
}
)

fun copy(
classId: ClassId = this.classId,
name: String = this.name,
returnType: ClassId = this.returnType,
parameters: List<ClassId> = this.parameters,
bypassesSandbox: Boolean = this.bypassesSandbox,
modifiers: Int = this.modifiers,
) = BuiltinMethodId(
classId = classId,
name = name,
returnType = returnType,
parameters = parameters,
bypassesSandbox = bypassesSandbox,
modifiers = modifiers,
)
}

class BuiltinConstructorId(
Expand Down