Mercurial > projects > ldc
comparison dmd2/func.c @ 892:063ba84a965f
Also apply custom allocator size_t change to DMD2 frontend.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 18 Jan 2009 13:18:31 +0100 |
parents | 356e65836fb5 |
children | 6c09179ebba0 |
comparison
equal
deleted
inserted
replaced
891:ea82e2077f9d | 892:063ba84a965f |
---|---|
2972 | 2972 |
2973 // Check that there is at least one argument of type uint | 2973 // Check that there is at least one argument of type uint |
2974 TypeFunction *tf = (TypeFunction *)type; | 2974 TypeFunction *tf = (TypeFunction *)type; |
2975 if (Argument::dim(tf->parameters) < 1) | 2975 if (Argument::dim(tf->parameters) < 1) |
2976 { | 2976 { |
2977 error("at least one argument of type uint expected"); | 2977 error("at least one argument of type size_t expected"); |
2978 } | 2978 } |
2979 else | 2979 else |
2980 { | 2980 { |
2981 Argument *a = Argument::getNth(tf->parameters, 0); | 2981 Argument *a = Argument::getNth(tf->parameters, 0); |
2982 if (!a->type->equals(Type::tuns32)) | 2982 if (!a->type->equals(Type::tsize_t)) |
2983 error("first argument must be type uint, not %s", a->type->toChars()); | 2983 error("first argument must be type size_t, not %s", a->type->toChars()); |
2984 } | 2984 } |
2985 | 2985 |
2986 FuncDeclaration::semantic(sc); | 2986 FuncDeclaration::semantic(sc); |
2987 } | 2987 } |
2988 | 2988 |