At first look, the problem seems to be related to the RTL macro cnv_pattern_macro which only has valid type-cases for string, cset and pattern. Other convertable values do not appear to be handled at this point.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Committed a fix consisting of: anything that's not a pattern or a cset now attempts to convert to string and becomes a string pattern if that succeeds (class Icon conversion semantics).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
At first look, the problem seems to be related to the RTL macro cnv_pattern_macro which only has valid type-cases for string, cset and pattern. Other convertable values do not appear to be handled at this point.
I have submitted a possible interim fix for review - this makes changes to the unicon compiler and not to the RTL runtime code.
Committed a fix consisting of: anything that's not a pattern or a cset now attempts to convert to string and becomes a string pattern if that succeeds (class Icon conversion semantics).
Have tested the fix with the following program
procedure main()
s1 := "0123456"
s2 := "0123456"
s3 := "0123.456"
end
The output from this program is
s1 string match: 012X456
s2 string match: 012Y456
s3 string match: 012Z56
s3 string match: 012A.456
s3 string match: 012A.456
s3 string match: 012A56
s3 string match: 012B.456
s3 string match: 012B.456
s3 string match: 012B56
The output appears correct. I suggest that this problem can now be closed