Skip to content

default params with type break the compiler #88

@georgejecook

Description

@georgejecook
function CreateTestStatistic(name as string, result = "Success" as string, time = 0 as integer, errorCode = 0 as integer, errorMessage = "" as string) as object

this transpiles with my compiler, to valid brs, as follows:

function RBS_STATS_CreateTestStatistic(name as string, result = "Success" as string, time = 0 as integer, errorCode = 0 as integer, errorMessage = "" as string) as object

Howeverm the bs compiler produces the following error:

frameworkTests/source/tests/rooibosDist.brs:2043:75 - error BS1039: Expected newline or ':' after function signature

 2043  function RBS_STATS_CreateTestStatistic(name as string, result as string = "Success", time as integer = 0, errorCode as integer = 0, errorMessage as string = "") as object
 2043                                    

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