Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Additional of 2nd try at fixing 6763

  • Loading branch information...
commit e9be4586f49def97fadacb43edd1579a4c1b0886 1 parent 8464510
@9rnsr 9rnsr authored
Showing with 18 additions and 26 deletions.
  1. +1 −6 src/mtype.c
  2. +17 −20 test/runnable/xtest46.d
View
7 src/mtype.c
@@ -1533,14 +1533,12 @@ void Type::modToBuffer(OutBuffer *buf)
Type *Type::merge()
{
-#if 0
if (ty == Terror) return this;
if (ty == Ttypeof) return this;
if (ty == Tident) return this;
if (ty == Tinstance) return this;
if (nextOf() && !nextOf()->merge()->deco)
return this;
-#endif
//printf("merge(%s)\n", toChars());
Type *t = this;
@@ -5169,10 +5167,7 @@ Type *TypeFunction::semantic(Loc loc, Scope *sc)
{ Parameter *fparam = Parameter::getNth(tf->parameters, i);
tf->inuse++;
- if (!fparam->type->deco)
- {
- fparam->type = fparam->type->semantic(loc, argsc);
- }
+ fparam->type = fparam->type->semantic(loc, argsc);
if (tf->inuse == 1) tf->inuse--;
fparam->type = fparam->type->addStorageClass(fparam->storageClass);
View
37 test/runnable/xtest46.d
@@ -4201,31 +4201,29 @@ void test2856()
}
/***************************************************/
+// 6056 fixup
-version (Windows)
+template ParameterTypeTuple6056(func)
{
- template ParameterTypeTuple158(func)
- {
- static if (is(func Fptr : Fptr*) && is(Fptr P == function))
- alias P ParameterTypeTuple158;
- else
- static assert(0, "argument has no parameters");
- }
+ static if (is(func Fptr : Fptr*) && is(Fptr P == function))
+ alias P ParameterTypeTuple6056;
+ else
+ static assert(0, "argument has no parameters");
+}
- extern(Windows) alias void function() fpw_t;
+extern(C) alias void function() fpw_t;
- alias void function(fpw_t fp) cb_t;
+alias void function(fpw_t fp) cb_t;
- void bar158(ParameterTypeTuple158!(cb_t) args) {
- pragma (msg, "TFunction1: " ~ typeof(args[0]).stringof);
- }
+void bar6056(ParameterTypeTuple6056!(cb_t) args) {
+ pragma (msg, "TFunction1: " ~ typeof(args[0]).stringof);
+}
- extern(Windows) void foo158() { }
+extern(C) void foo6056() { }
- void test158()
- {
- bar158(&foo158);
- }
+void test6056()
+{
+ bar6056(&foo6056);
}
/***************************************************/
@@ -4429,8 +4427,7 @@ int main()
test6330();
test6868();
test2856();
- version (Windows)
- test158();
+ test6056();
printf("Success\n");
return 0;
Please sign in to comment.
Something went wrong with that request. Please try again.