Skip to content

Bug found in PolyList #178

Description

@dynastywind

Errors when executing the below codes.

Lyndon-MacBook-Pro:F2JParser Lyndon$ f2j -r bug.sf 
bug using [Naive]
Compiling to Java source code ( ./Bug$.java )
./Bug$.java:287: error: cannot find symbol
    final $PolyList x44 = ($PolyList) x43.temp;
          ^
  symbol:   class $PolyList
  location: class Bug$
./Bug$.java:287: error: cannot find symbol
    final $PolyList x44 = ($PolyList) x43.temp;
                           ^
  symbol:   class $PolyList
  location: class Bug$
2 errors
Error: Could not find or load main class Bug$
rm: cannot remove ‘*.class’: No such file or directory
data PolyList[A] = Nil
            |   Cons A (PolyList[A]);

let rec readPolyList(s: String): PolyList[Char] =
    if s.length() == 0 then (Nil[Char])
    else (Cons[Char] 'a' (readPolyList("")));

readPolyList "a"

Please check.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions