Skip to content

Add transpiler option that toggles whether or not class properties WITHOUT default values are set to Invalidย #1567

@addison-adler

Description

@addison-adler

โš ๏ธ Note:
This is something I'm working on a PR for ๐Ÿ™‚

Context

Currently, if you implement a class with a property that does not have a default value, Bsc is setting the value = invalid

Example

Class A
    fieldA as String

    Function new ()
    End Function
End Class

Transpiles to

function __A_builder()
    instance = {}
    instance.new = Function()
        m.fieldA = invalid
    End Function
    return instance
end function

function A()
    instance = __A_builder()
    instance.new()
    return instance
end function

Reason

Discussed with Bronley. Will add details here later!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions