{"action":"closed","issue":{"number":35,"created_at":"2011-08-11T00:44:16Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"The following code fail:\r\n\r\n```nemerle\r\n[MacroUsage(MacroPhase.BeforeTypedMembers, MacroTargets.Class)]\r\nmacro DefineVariantoption_on_BeforeTypedMembers(typeBuilder : TypeBuilder, optionName : PExpr)\r\n{\r\n  def variantOptionBuilder = typeBuilder.DefineNestedType(\r\n  <[ variant_option: | $(optionName.ToString() : usesite) { public override ToString() : string { \"defined on BeforeTypedMembers\" } } ]>);\r\n\r\n  variantOptionBuilder.Compile(); // ICE: Exception=NRE\r\n}\r\n\r\n[MacroUsage(MacroPhase.WithTypedMembers, MacroTargets.Class)]\r\nmacro DefineVariantoption_on_WithTypedMembers(typeBuilder : TypeBuilder, optionName : PExpr)\r\n{\r\n  def variantOptionBuilder = typeBuilder.DefineNestedType(\r\n  <[ variant_option: | $(optionName.ToString() : usesite) { public override ToString() : string { \"defined on WithTypedMembers\" } } ]>);\r\n\r\n  variantOptionBuilder.Compile(); // E: no _N_GetVariantCode() defined\r\n}\r\n```","comments":2,"title":"Can't define a Variant Option by typeBuilder.DefineNestedType() after MacroPhase.BeforeInheritance.","updated_at":"2011-10-09T13:02:59Z","url":"https://api.github.com/repos/rsdn/nemerle/issues/35","id":1383988,"assignee":{"avatar_url":"https://secure.gravatar.com/avatar/24dd213e6212dd3106ebd92f728a39b6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/VladD2","id":771101,"login":"VladD2"},"milestone":{"number":1,"created_at":"2011-09-19T18:41:19Z","due_on":null,"title":"Nemerle 1.1 for .Net 4.0 and VS 2010","creator":{"avatar_url":"https://secure.gravatar.com/avatar/24dd213e6212dd3106ebd92f728a39b6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/VladD2","id":771101,"login":"VladD2"},"url":"https://api.github.com/repos/rsdn/nemerle/milestones/1","open_issues":10,"closed_issues":12,"description":"","state":"open"},"closed_at":"2011-10-09T13:02:59Z","user":{"avatar_url":"https://secure.gravatar.com/avatar/24dd213e6212dd3106ebd92f728a39b6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/VladD2","id":771101,"login":"VladD2"},"html_url":"https://github.com/rsdn/nemerle/issues/35","labels":[{"name":"Bug","url":"https://api.github.com/repos/rsdn/nemerle/labels/Bug","color":"e10c02"},{"name":"Compiler","url":"https://api.github.com/repos/rsdn/nemerle/labels/Compiler","color":"02d7e1"}],"state":"closed"},"legacy":{"number":35,"action":"closed","issue":1383988}}