[nem-bug] [Nemerle 0000625]: strange error when misusing
macro-generated type
feedback at nemerle.org
feedback at nemerle.org
Wed Feb 22 12:51:10 CET 2006
A NOTE has been added to this issue.
======================================================================
<http://nemerle.org/bugs/view.php?id=625>
======================================================================
Reported By: aleksey
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 625
Category: Compiler
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 02-22-2006 10:40 CET
Last Modified: 02-22-2006 12:51 CET
======================================================================
Summary: strange error when misusing macro-generated type
Description:
When someone misuses(e.g. uses non-existent function or property accessor)
a type defined from macro, he gets a quite strange error message.
E.g. lets suppose we have a macro 'define', which defines type with a
supplied name, etc.
define(Test);
def t = Test(1);
// there is no 'Prop' property in Test
System.Console.WriteLine(t.Prop);
The following error message is displayed:
c.n:1:1:1:7: you must specify `partial' modifier on all declarations of
type `Test'
c.n:1:1:1:7: first defined here
c.n:1:1:1:7: field `Test.test' redefined in `Test'
c.n:1:1:1:7: first definition here as field `Test.test'
confused by earlier errors bailing out
======================================================================
----------------------------------------------------------------------
nazgul - 02-22-06 11:13
----------------------------------------------------------------------
Looks like the type is added twice to the compilation tree. I'm not sury
why though. Did you check the examples from
ncc/testsuite/positive/macrolib.n and macroprog.n?
----------------------------------------------------------------------
aleksey - 02-22-06 12:51
----------------------------------------------------------------------
Here's how to reproduce this error via macro from macrolib.n:
def x = generateIFoo();
_ = x.Test;
Issue History
Date Modified Username Field Change
======================================================================
02-22-06 10:40 aleksey New Issue
02-22-06 11:13 nazgul Note Added: 0001100
02-22-06 12:51 aleksey Note Added: 0001101
======================================================================
More information about the bugs
mailing list