ceylon / ceylon.ast

Apache License 2.0
18 stars 3 forks source link

classDecToCeylon too strict about UIDENTIFIERs #113

Closed jvasileff closed 8 years ago

jvasileff commented 8 years ago

The typechecker lets expressions like class someObject slip by, but ceylon.ast.redhat throws.

SDK code example: https://github.com/ceylon/ceylon-sdk/blob/42f62e9ce82b35c60cf27e371f832fc672903ad8/test-source/test/ceylon/test/stubs/customTestListener.ceylon#L58-L62

The spec: http://ceylon-lang.org/documentation/1.2/spec/html_single/#declarationreferences

Exception in thread "main" ceylon.language.AssertionError "Assertion failed: Must be UIDENTIFIER token
    violated token.type == uidentifier"
    at ceylon.ast.redhat.uIdentifierToCeylon_.uIdentifierToCeylon(Identifier.ceylon:65)
    at ceylon.ast.redhat.classDecToCeylon_.classDecToCeylon(ClassDec.ceylon:33)
    at ceylon.ast.redhat.typeDecToCeylon_.typeDecToCeylon(TypeDec.ceylon:21)
    at ceylon.ast.redhat.decToCeylon_.decToCeylon(Dec.ceylon:29)
    at ceylon.ast.redhat.primaryToCeylon_.primaryToCeylon(Primary.ceylon:47)
    at ceylon.ast.redhat.valueExpressionToCeylon_.valueExpressionToCeylon(ValueExpression.ceylon:24)
lucaswerkmeister commented 8 years ago

Fixed, thanks!