Error: shortened method not enabled, compile with compiler switch -preview=shortenedMethods
for:
char and(char a, char b) => a == ‘-’ and b == ‘-’ && ? ‘-’ : ‘';
instead:
char and(char a, char b) { return a == ‘-’ and b == ‘-’ && ? ‘-’ : '’; }
Error: shortened method not enabled, compile with compiler switch -preview=shortenedMethods
for:
char and(char a, char b) => a == ‘-’ and b == ‘-’ && ? ‘-’ : ‘';
instead:
char and(char a, char b) { return a == ‘-’ and b == ‘-’ && ? ‘-’ : '’; }