rokucommunity / brighterscript

A superset of Roku's BrightScript language
MIT License
160 stars 46 forks source link

Nodes accept strings for setting many properties that are actually other types #1191

Closed markwpearce closed 4 months ago

markwpearce commented 4 months ago

Consider:

background = createObject("roSGNode", "Rectangle")
background.color = "#101010"
background.opacity = "0.3" ' opacity is a float, but setting with a string
background.width = "30" ' width is an integer, but setting with a string
background.translation = "[100,300]"  ' translation is an float[], but setting with a string

I propose we remove the type compatibility diagnostic if:

TwitchBronBron commented 4 months ago

Yeah this is a good compromise for v1.0.0. For v1.1 we can investigate some of the more specific details to fine tune this.