View Issue Details

IDProjectCategoryView StatusLast Update
0000307Ecere SDKcompilerpublic2014-08-08 18:17
Reportersacrebleu Assigned Tojerome  
PriorityimmediateSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version0.44.09 
Target Version0.44.10 64Fixed in Version0.44.10 64 
Summary0000307: The eC compiler fails to tell you when you reference a class that does not exist.
DescriptionClass A {
 B a;
};

should break in the compiler with error message:
"Warning: 02:demo.ec "B" referenced but does not exist as Class, Struct or type;"
Tagsv0.44d2

Activities

sacrebleu

2010-04-11 04:08

reporter   ~0000160

Reminder sent to: jerome

To be completed as soon as possible (we discussed this yesterday)

jerome

2010-07-26 01:43

administrator   ~0000227

The original reason why a never defined class was still handled as a class was for
a) guessing right in the precompiling phase
b) handling classes that would be defined later on in an injected dynamic module

To handle the latter, we should require at least a forward declaration, e.g.:

class MyClass;

For the former, an error or at least a warning should be generated in the Compiling phase.
Major time waster: fix for D2.

jerome

2013-05-04 00:12

administrator   ~0000784

Produce an error if neither compile-time imported nor forward declared

sacrebleu

2013-09-10 19:24

reporter   ~0001060

forward declaration = lame

jerome

2013-09-10 20:58

administrator   ~0001061

Herb:

This would be required only for classes that are not within your project at all, but declared in e.g. a dynamically loaded plugin.

Requiring the forward declaration in this specific case would otherwise let you warn about non-existing classes, which was your complaint here.

Glad to see you still around :) How are ya?

sacrebleu

2013-09-10 21:19

reporter   ~0001062

I'm always available here-> http://8bitmush.org
Still underemployed

why not use import class Blah; instead of 'forward declaration'?

jerome

2013-09-10 21:24

administrator   ~0001063

Well:

class Blah;

vs

import class Blah;

Looks quite similar to me :)
And import has a precise meaning of importing either an eC file or a .dll/.so eC shared library module.

sacrebleu

2013-09-10 23:40

reporter   ~0001064

I'm against this because it creates more work for the programmer and is superfluous. However, compile times are an issue. extern class Blah; ? Since this is specifically for external things


re: overuse of term 'import'

The term import simply means to 'bring in', regardless of how it is used this is a perfect example of how the term can be broadened to include similar features such as noting an external class found in a DLL/plugin

jerome

2013-09-10 23:47

administrator   ~0001065

class Blah;

would *only* be required for noting the class does exist and will later be imported (note the nuance here, the class is not 'yet' imported)

extern class Blah; // this would be just the same as class Blah

Both actually work already.

jerome

2014-07-05 09:03

administrator   ~0001352

Fixed by:
https://github.com/ecere/ecere-sdk/commit/fa765a838029ec71a86787e95ebcab5fda0aae1e

Issue History

Date Modified Username Field Change
2010-01-18 00:06 sacrebleu New Issue
2010-01-18 00:06 sacrebleu Status new => assigned
2010-01-18 00:06 sacrebleu Assigned To => jerome
2010-01-18 04:53 jerome Priority urgent => immediate
2010-04-11 04:08 sacrebleu Note Added: 0000160
2010-07-07 02:37 redj Target Version => 0.44d2
2010-07-07 04:10 redj Tag Attached: v0.44d2
2010-07-25 20:38 redj Relationship added child of 0000429
2010-07-26 01:43 jerome Note Added: 0000227
2010-07-26 01:44 jerome Summary IDE fails to tell you when you reference a class that does not exist. => The eC compiler fails to tell you when you reference a class that does not exist.
2010-07-26 19:10 thexa4 Target Version 0.44d2 => 0.44 draft 2
2012-03-08 15:41 redj Target Version old 0.44.pre2 => 0.45 Ginkakuji
2012-03-08 17:18 redj Relationship deleted child of 0000429
2012-03-29 07:52 redj Category => ide
2012-03-29 07:52 redj Project @3@ => Ecere SDK
2013-04-24 20:36 jerome Status assigned => new
2013-04-24 20:37 jerome Assigned To jerome =>
2013-04-26 18:28 jerome Target Version 0.45 Ginkakuji => 0.44.8 Silver
2013-05-04 00:12 jerome Note Added: 0000784
2013-05-04 00:12 jerome Category ide => compiler
2013-05-04 00:12 jerome Target Version 0.44.8 Silver => 0.44.1 64
2013-09-10 19:10 jerome Target Version 0.44.12 Fixes => 0.46 eC II
2013-09-10 19:24 sacrebleu Note Added: 0001060
2013-09-10 20:58 jerome Note Added: 0001061
2013-09-10 21:19 sacrebleu Note Added: 0001062
2013-09-10 21:24 jerome Note Added: 0001063
2013-09-10 23:40 sacrebleu Note Added: 0001064
2013-09-10 23:47 jerome Note Added: 0001065
2014-05-31 16:21 jerome Assigned To => jerome
2014-05-31 16:21 jerome Status new => assigned
2014-05-31 16:21 jerome Projection none => minor fix
2014-05-31 16:21 jerome ETA none => < 1 week
2014-05-31 16:21 jerome Product Version => 0.44.09
2014-05-31 16:21 jerome Target Version 0.46 eC II => 0.44.10 64
2014-07-05 09:03 jerome Note Added: 0001352
2014-07-05 09:03 jerome Status assigned => resolved
2014-07-05 09:03 jerome Fixed in Version => 0.44.10 64
2014-07-05 09:03 jerome Resolution open => fixed
2014-08-08 18:17 jerome Status resolved => closed