Skip to content

Commit

Permalink
Fix the build
Browse files Browse the repository at this point in the history
  • Loading branch information
migueldeicaza committed Oct 16, 2023
1 parent 28fd7e0 commit 704aee9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Generator/Generator/BuiltinGen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,16 @@ func generateBuiltinClasses (values: [JGodotBuiltinClass], outputDir: String?) a

// Generate the synthetic `end` property
if bc.name == "Rect2" || bc.name == "Rect2i" || bc.name == "AABB" {
let retType: String
memberDoc("end")
p ("public var end: \(bc.name)") {
switch bc.name {
case "Rect2": retType = "Vector2"
case "Rect2i": retType = "Vector2i"
case "AABB": retType = "Vector3"
default:
fatalError("Should never happen")
}
p ("public var end: \(retType)") {
p ("set") {
p ("size = newValue - position")
}
Expand Down

0 comments on commit 704aee9

Please sign in to comment.