Fix the message type used to check arguments.

This commit is contained in:
Bill Currie 2011-03-02 22:13:16 +09:00
parent 4a99f8dcbd
commit aa4ed00090
5 changed files with 8 additions and 5 deletions

View file

@ -5,7 +5,7 @@ pkgdatadir=@sharepath@/QF
QFCC_DEP=$(top_builddir)/tools/qfcc/source/qfcc$(EXEEXT)
QFCC=$(QFCC_DEP)
QCFLAGS=-qq -g -Wall -Werror -Wno-integer-divide -Wno-vararg-integer
QCFLAGS=-qq -g -Wall -Werror -Wno-integer-divide
QCPPFLAGS=-I. -I$(srcdir) -I$(top_builddir)/ruamoko/include -I$(top_srcdir)/ruamoko/include -I$(top_builddir)/include -I$(top_srcdir)/include
GZIP=if echo $@ | grep -q .gz; then gzip -f `basename $@ .gz`; if test -f `basename $@ .dat.gz`.sym; then gzip -f `basename $@ .dat.gz`.sym; fi; fi
if HAVE_ZLIB

View file

@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS= foreign
pkglibdir=$(libdir)/qfcc/lib
QFCC=$(top_builddir)/tools/qfcc/source/qfcc$(EXEEXT)
QCFLAGS=-qq -g -Werror -Wall -Wno-integer-divide -Wno-vararg-integer
QCFLAGS=-qq -g -Werror -Wall -Wno-integer-divide
QCPPFLAGS=$(INCLUDES)
PAK=$(top_builddir)/tools/pak/pak$(EXEEXT)
RANLIB=touch

View file

@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS= foreign
pkglibdir=$(libdir)/qfcc/lib
QFCC=$(top_builddir)/tools/qfcc/source/qfcc$(EXEEXT)
QCFLAGS=-qq -g -Wall -Wno-integer-divide -Wno-vararg-integer -Werror
QCFLAGS=-qq -g -Wall -Wno-integer-divide -Werror
QCPPFLAGS=$(INCLUDES)
PAK=$(top_builddir)/tools/pak/pak$(EXEEXT)
RANLIB=touch

View file

@ -4,7 +4,7 @@ pkglibdir=$(libdir)/qfcc/lib
QFCC_DEP=$(top_builddir)/tools/qfcc/source/qfcc$(EXEEXT)
QFCC=$(QFCC_DEP)
QCFLAGS=-qq -g -Werror -Wall -Wno-integer-divide -Wno-vararg-integer
QCFLAGS=-qq -g -Werror -Wall -Wno-integer-divide
QCPPFLAGS=$(INCLUDES)
PAK=$(top_builddir)/tools/pak/pak$(EXEEXT)
GZIP=if echo $@ | grep -q .gz; then gzip -f `basename $@ .gz`; if test -f `basename $@ .dat.gz`.sym; then gzip -f `basename $@ .dat.gz`.sym; fi; fi

View file

@ -2599,6 +2599,7 @@ message_expr (expr_t *receiver, keywordarg_t *message)
int self = 0, super = 0, class_msg = 0;
type_t *rec_type;
type_t *return_type;
type_t *method_type = &type_IMP;
class_t *class = 0;
method_t *method;
expr_t *send_msg;
@ -2611,6 +2612,7 @@ message_expr (expr_t *receiver, keywordarg_t *message)
if (receiver->type == ex_error)
return receiver;
receiver = cast_expr (&type_id, receiver); //FIXME better way?
class = extract_class (current_class);
rec_type = class->type;
} else {
@ -2663,8 +2665,9 @@ message_expr (expr_t *receiver, keywordarg_t *message)
expr_t *err;
if ((err = method_check_params (method, args)))
return err;
method_type = method->type;
}
call = build_function_call (send_msg, get_type (send_msg), args);
call = build_function_call (send_msg, method_type, args);
if (call->type == ex_error)
return receiver;