In the following sample (VO dialect), the default parameter values have wrong types, but the compiler does not throw errors on that. When actually using those default values by calling the method, then the compiler throws and ICE.
In the Core dialect, it works properly, compiler reports:
error XS1750: A value of type 'logic' cannot be used as a default parameter because there are no standard conversions to type 'string'
error XS1750: A value of type 'string' cannot be used as a default parameter because there are no standard conversions to type 'logic'
// VO dialect
CLASS TestClass
CONSTRUCTOR( n AS INT, l := FALSE AS STRING) AS VOID // no compiler error
METHOD Test( n := "asd" AS LOGIC) AS VOID // no compiler error
END CLASS
FUNCTION Start() AS VOID
LOCAL o AS TestClass
o := TestClass{1} // ICE
o:Test() // ICE
In the following sample (VO dialect), the default parameter values have wrong types, but the compiler does not throw errors on that. When actually using those default values by calling the method, then the compiler throws and ICE.
In the Core dialect, it works properly, compiler reports:
error XS1750: A value of type 'logic' cannot be used as a default parameter because there are no standard conversions to type 'string'
error XS1750: A value of type 'string' cannot be used as a default parameter because there are no standard conversions to type 'logic'