rascal icon indicating copy to clipboard operation
rascal copied to clipboard

Type constructor subtype issue?

Open jurgenvinju opened this issue 1 year ago • 0 comments

Describe the bug

I had an unexpected error;

Error: [ERROR] String.rsc:547:011: Type parameter CharClass should be less than ![], found Tree

In this code:

public str squeeze(str src, type[&CharClass <: ![]] _) = visit(src) {
    case /<c:.><c>+/ => c
      when &CharClass _ := Tree::char(charAt(c, 0))
};

The interpreter does not have the same error. I think the code is correct. Something with the := check? Or comparability or lub with char classes?

jurgenvinju avatar Jul 17 '24 09:07 jurgenvinju