#967 Compiler Error - UnsupportedErr about generic types

tactics Wed 10 Feb 2010

Noticed this tonight. I don't think this should be showing a stack trace when the compilation fails.

class T
{
  Void main()
  {
    echo(a ?: a == a)
  }
}

.

C:\Documents and Settings\Michael\Desktop>fan T.fan
C:\Documents and Settings\Michael\Desktop\T.fan(5,10): Unknown variable 'a'
C:\Documents and Settings\Michael\Desktop\T.fan(5,15): Unknown variable 'a'
C:\Documents and Settings\Michael\Desktop\T.fan(5,20): Unknown variable 'a'
ERROR: cannot compile script
sys::UnsupportedErr
  compiler::GenericParameterType.slots (GenericTypes.fan:413)
  compiler::NullableType.slots (NullableType.fan:65)
  compiler::CType$.slot (Unknown:427)
  compiler::NullableType.slot (NullableType.fan)
  compiler::CType$.method (Unknown:437)
  compiler::NullableType.method (NullableType.fan)
  compiler::CallResolver.findOn (CallResolver.fan:213)
  compiler::CallResolver.find (CallResolver.fan:163)
  compiler::CallResolver.resolve (CallResolver.fan:61)
  compiler::ResolveExpr.resolveCall (ResolveExpr.fan:471)
  compiler::ResolveExpr.resolveShortcut (ResolveExpr.fan:582)
  compiler::ResolveExpr.resolveExpr (ResolveExpr.fan:177)
  compiler::ResolveExpr.visitExpr (ResolveExpr.fan:134)
  compiler::Expr.walk (Expr.fan:247)
  compiler::Expr.walkExprs (Expr.fan:267)
  compiler::CallExpr.walkChildren (Expr.fan:826)
  compiler::Expr.walk (Expr.fan:246)
  compiler::Stmt.walkExpr (Stmt.fan:61)
  compiler::ExprStmt.walkChildren (Stmt.fan:117)
  compiler::Stmt.walk (Stmt.fan:48)
  30 More...

C:\Documents and Settings\Michael\Desktop>

brian Wed 10 Feb 2010

Promoted to ticket #967 and assigned to brian

Agreed - should gracefully handle that

brian Tue 23 Mar 2010

Ticket cancelled

I can't duplicate this problem anymore, possible it got fixed by something else.

@tactics can you verify if this problem still persists in upcoming build 1.0.52, and if so lets re-open

Login or Signup to reply.