diff --git a/src/typechecker.cpp b/src/typechecker.cpp index d04f7ce..2b326c7 100644 --- a/src/typechecker.cpp +++ b/src/typechecker.cpp @@ -118,7 +118,15 @@ namespace AST { if ( ty->m_ty == types::FundamentalTypeKind::Bool || ty->m_ty == types::FundamentalTypeKind::Char + || ty->m_ty == types::FundamentalTypeKind::UChar + || ty->m_ty == types::FundamentalTypeKind::ShortInt + || ty->m_ty == types::FundamentalTypeKind::UShortInt || ty->m_ty == types::FundamentalTypeKind::Int + || ty->m_ty == types::FundamentalTypeKind::UInt + || ty->m_ty == types::FundamentalTypeKind::LongInt + || ty->m_ty == types::FundamentalTypeKind::ULongInt + || ty->m_ty == types::FundamentalTypeKind::LongLongInt + || ty->m_ty == types::FundamentalTypeKind::ULongLongInt ) { this->m_ty = *expected_ty; } diff --git a/test.c b/test.c index 49cd8e4..d3ac9ca 100644 --- a/test.c +++ b/test.c @@ -75,5 +75,5 @@ long long int main() { long int lg = 456; long long int longer = 789; - return 0; + return sh; } \ No newline at end of file