Core: Fix mixing named and positional in compound expressions

This commit is contained in:
Krzosa Karol
2023-04-21 09:26:55 +02:00
parent 1e12f51451
commit 8c80f609af
2 changed files with 24 additions and 33 deletions

View File

@@ -58,20 +58,6 @@ Add(&guys, {100, 100})
//
// Failed to cast from [[256]int] to [*int]
// @reproduction
// map_data: [16*16]int
// map: Map = {data = &map_data[0], 16, 16}
//
// Map map = (Map ){.data = (&(map_data[0])), .data = 0x10, .x = 16};
// @reproduction Couldn't figure out type of compound expression when variable got declared and separetly
// got assigned a value
//
// Error! Couldn't infer type of compound expression
// if Mode == 0 && colliding && IsMouseButtonPressed(MOUSE_BUTTON_RIGHT) ;; GuyP = {x,y}
// Error! Couldn't infer type of compound expression
// if Mode == 1 && colliding && IsMouseButtonPressed(MOUSE_BUTTON_LEFT) ;; MAP.CurrentMAP.actors.data[0].p = {x,y}
#import "raylib.core"
#load "array.core"
@@ -104,7 +90,6 @@ MouseSelectionPivot: Vector2
MouseSelectionBox: Rectangle
MouseSelectedActors: Array(*MAP.Actor) // @todo: ids
main :: (): int
MAP.Init()