[Issue 2085] CTFE fails if the function is forward referenced

2021-01-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2085

--- Comment #7 from Dlang Bot  ---
dlang/dub pull request #2098 "Fix #2085: [visuald] spurious library project"
was merged into master:

- d2e8c03f89c52b6b57d12449acb87e1b67cd831b by Bastiaan Veelo:
  If no output is generated (TargetType.none) then don't generate a project
configuration.

  This prevents VS from attempting to build a library with no name from no
sources.
  Fixes #2085.

- cf4a049bf8755fb988a1adf3adbf709dc025841b by Bastiaan Veelo:
  Test issue #2085.

https://github.com/dlang/dub/pull/2098

--


[Issue 2085] CTFE fails if the function is forward referenced

2012-05-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2085


Don  changed:

   What|Removed |Added

 CC||shro8...@vandals.uidaho.edu


--- Comment #6 from Don  2012-05-14 08:23:28 PDT ---
*** Issue 2513 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2085] CTFE fails if the function is forward referenced

2010-05-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2085


bearophile_h...@eml.cc changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bearophile_h...@eml.cc
 Resolution||FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2085] CTFE fails if the function is forward referenced

2010-05-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2085


Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #5 from Walter Bright  2010-05-10 
11:45:39 PDT ---
changeset 478

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2085] CTFE fails if the function is forward referenced

2010-04-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2085



--- Comment #4 from Don  2010-04-10 11:31:33 PDT ---
Although bug 4075 appears similar to this one, the patch doesn't fix it.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2085] CTFE fails if the function is forward referenced

2010-03-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2085


Rainer Schuetze  changed:

   What|Removed |Added

   Keywords||patch
 CC||r.sagita...@gmx.de


--- Comment #3 from Rainer Schuetze  2010-03-27 05:53:06 
PDT ---
Here's patch that invokes the semantic on the function if referenced.
Additioally, it needs to avoid duplicate semantic to be run later.

This patch also fixes #3499

Index: expression.c
===
--- expression.c(revision 421)
+++ expression.c(working copy)
@@ -2427,7 +2427,8 @@
 f = s->isFuncDeclaration();
 if (f)
 {//printf("'%s' is a function\n", f->toChars());
-
+if (!f->originalType && f->scope) // semantic not yet run
+f->semantic(f->scope);
 if (!f->type->deco)
 {
 error("forward reference to %s", toChars());
Index: func.c
===
--- func.c(revision 421)
+++ func.c(working copy)
@@ -134,7 +134,7 @@
 parent = sc->parent;
 Dsymbol *parent = toParent();

-if (semanticRun == PASSsemanticdone)
+if (semanticRun >= PASSsemanticdone) // BUG 2085
 {
 if (!parent->isClassDeclaration())
 return;

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2085] CTFE fails if the function is forward referenced

2009-05-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2085


Sobirari Muhomori  changed:

   What|Removed |Added

 CC||ma...@pochta.ru




--- Comment #2 from Sobirari Muhomori   2009-05-18 03:43:27 
PDT ---
This bug is hit regularly when porting C to D.
It's a shame that C macros don't suffer from this ordering bug :)
---
#define a b(0)
#define b(c) (c+1)
---

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2085] CTFE fails if the function is forward referenced

2009-04-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2085





--- Comment #1 from ma...@pochta.ru  2009-04-06 06:19 ---
another example

enum { a=b() }
int b(){ return 0; }



--