From e08da8d5cc3862c04219fd94c40e4056975f24b3 Mon Sep 17 00:00:00 2001 From: Dmitry Kashitsyn Date: Tue, 31 May 2016 10:35:26 +0600 Subject: [PATCH] Fixes prototype of TypeSystem::inferBlock() Issue: #17 --- include/inference.h | 2 +- src/TypeAnalyzer.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/inference.h b/include/inference.h index e49302c..c9163b5 100644 --- a/include/inference.h +++ b/include/inference.h @@ -271,7 +271,7 @@ class TypeSystem { typedef TSymbol* TSelector; InferContext* inferMessage(TSelector selector, const Type& arguments); - InferContext* inferBlock(const Type& block, const Type& arguments); + BlockInferContext* inferBlock(const Type& block, const Type& arguments); ControlGraph* getControlGraph(TMethod* method); diff --git a/src/TypeAnalyzer.cpp b/src/TypeAnalyzer.cpp index d971143..9fe01c7 100644 --- a/src/TypeAnalyzer.cpp +++ b/src/TypeAnalyzer.cpp @@ -475,7 +475,7 @@ void TypeAnalyzer::doPrimitive(const InstructionNode& instruction) { if (instruction.getArgumentsCount() == 3) arguments.pushSubType(m_context[*instruction.getArgument(2)]); - if (InferContext* invokeContext = m_system.inferBlock(block, arguments)) + if (BlockInferContext* invokeContext = m_system.inferBlock(block, arguments)) primitiveResult = invokeContext->getReturnType(); else primitiveResult = Type(Type::tkPolytype); @@ -707,7 +707,7 @@ InferContext* TypeSystem::inferMessage(TSelector selector, const Type& arguments return inferContext; } -InferContext* TypeSystem::inferBlock(const Type& block, const Type& arguments) { +BlockInferContext* TypeSystem::inferBlock(const Type& block, const Type& arguments) { if (block.getKind() != Type::tkMonotype || arguments.getSubTypes().empty()) return 0;