From c1661eb06b6b66c71670506b8134c3de6e3ac7c0 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Fri, 30 Mar 2012 16:55:22 -0700 Subject: [PATCH] Allow calling GetAs{Non}ConstType() for FunctionTypes. It's just a no-op, though, rather than an assertion failure as before. --- type.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/type.cpp b/type.cpp index 80856d5e..3a276be4 100644 --- a/type.cpp +++ b/type.cpp @@ -2454,15 +2454,13 @@ FunctionType::ResolveUnboundVariability(Variability v) const { const Type * FunctionType::GetAsConstType() const { - FATAL("FunctionType::GetAsConstType shouldn't be called"); - return NULL; + return this; } const Type * FunctionType::GetAsNonConstType() const { - FATAL("FunctionType::GetAsNonConstType shouldn't be called"); - return NULL; + return this; }