[nem-bug] [Nemerle 0000650]: Attribute compilation error.

feedback at nemerle.org feedback at nemerle.org
Fri Apr 7 07:22:29 CEST 2006


A NOTE has been added to this issue.
======================================================================
<http://nemerle.org/bugs/view.php?id=650> 
======================================================================
Reported By:                iae
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   650
Category:                   Compiler
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             04-07-2006 07:18 CEST
Last Modified:              04-07-2006 07:22 CEST
======================================================================
Summary:                    Attribute compilation error.
Description: 
I'm trying compile code:

	[Record]
	class MyAttr3Attribute : Attribute
	{
		[Accessor] mutable _s : string;
		[Accessor] mutable _i : int;
		[Accessor] mutable _c : char;
		[Accessor] mutable _m : decimal;
	}

	[MyAttr3("Name3", 3, 'c', 33.33m)]
	class TestMacroTest {}

But ncc throws exception:

       internal compiler error: got ArgumentException (An invalid type was
used as a custom attribute constructor argument, field or property.)
       at
System.Reflection.Emit.CustomAttributeBuilder.InitCustomAttributeBuilder(ConstructorInfo
con, Object[] constructorArgs, PropertyInfo[] namedProperties, Object[]
propertyValues, FieldInfo[] namedFields, Object[] fieldValues)
       at Nemerle.Compiler.AttributeCompiler.do_compile(GlobalEnv env,
TypeBuilder ti, TypeInfo attr, list`1 parms)
       at Nemerle.Compiler.AttributeCompiler.CompileAttribute(GlobalEnv
env, TypeBuilder ti, PExpr expr)
       at Nemerle.Compiler.Modifiers.SaveCustomAttributes(TypeBuilder ti,
Function`3 adder)
       at Nemerle.Compiler.TypeBuilder.EmitImplementation()
       at
Nemerle.Compiler.TypesManager._N_emit_impl_23354.apply_void(TypeBuilder
_N_23353)
       at
Nemerle.Compiler.TypesManager._N_maybe_f_23791.apply_void(TypeBuilder
_N_23790)
       at Nemerle.Collections.List.Iter['a](list`1 l, FunctionVoid`1 f)
       at Nemerle.Core.list`1.Iter(FunctionVoid`1 f)
       at Nemerle.Compiler.TypesManager.Iter(list`1 builders,
FunctionVoid`1 f)
       at Nemerle.Compiler.TypesManager.compile_all_tyinfos(Boolean
aux_phase)
       at Nemerle.Compiler.TypesManager._N__N_l22944_23028.apply_void()
       at Nemerle.Compiler.Solver.Enqueue(FunctionVoid action)
       at Nemerle.Compiler.Passes.Run()
       at Nemerle.CommandlineCompiler.MainClass.main_with_catching()
======================================================================

----------------------------------------------------------------------
 iae - 04-07-06 07:22 
----------------------------------------------------------------------
It seems that problem in method compile_expr for parameters of decimal
type.

Issue History
Date Modified  Username       Field                    Change              
======================================================================
04-07-06 07:18 iae            New Issue                                    
04-07-06 07:22 iae            Note Added: 0001168                          
======================================================================




More information about the bugs mailing list