Report "UNSUPPORTED" on usages of typedef

This commit is contained in:
Andrey Breslav
2014-04-28 12:10:13 +04:00
parent 469042dea1
commit 550c0ed998
4 changed files with 28 additions and 2 deletions
@@ -34,6 +34,7 @@ import java.util.Collection;
import java.util.List;
import static org.jetbrains.jet.lang.diagnostics.Errors.MANY_CLASS_OBJECTS;
import static org.jetbrains.jet.lang.diagnostics.Errors.UNSUPPORTED;
public class LazyTopDownAnalyzer {
@@ -207,6 +208,11 @@ public class LazyTopDownAnalyzer {
registerScope(c, resolveSession, initializer);
}
@Override
public void visitTypedef(@NotNull JetTypedef typedef) {
trace.report(UNSUPPORTED.on(typedef, "Typedefs are not supported"));
}
@Override
public void visitNamedFunction(@NotNull JetNamedFunction function) {
functions.add(function);
@@ -188,7 +188,8 @@ public class ExpressionTypingVisitorForStatements extends ExpressionTypingVisito
@Override
public JetTypeInfo visitTypedef(@NotNull JetTypedef typedef, ExpressionTypingContext context) {
return super.visitTypedef(typedef, context); // TODO
context.trace.report(UNSUPPORTED.on(typedef, "Typedefs are not supported"));
return super.visitTypedef(typedef, context);
}
@Override