Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: Scala 2.10.0
    • Fix Version/s: None
    • Component/s: Macros
    • Labels:
      None

      Description

      Sometimes it's necessary to pass parameters to macros untyped (e.g. if a parameter is a closure that refers to variables that are introduced by a macro). However, current implementation doesn't support this notion - all params are typechecked before the macro is expanded.

        Activity

        Hide
        Eugene Burmako added a comment -

        Won't be implemented in the near future (i.e. 99% that it won't make it in the first public release of macros).

        Show
        Eugene Burmako added a comment - Won't be implemented in the near future (i.e. 99% that it won't make it in the first public release of macros).
        Hide
        Miles Sabin added a comment - - edited

        Another use-case for this is a compile-time test that a given expression should not compile. Eg. suppose we have a type class Foo[T] which should not have instances for String, then it would be highly desirable to be able to write a test of the form,

        shouldNotCompile(implicitly[Foo[String]])
        

        which typechecks iff implicitly[Foo[String]] does not typecheck.

        Show
        Miles Sabin added a comment - - edited Another use-case for this is a compile-time test that a given expression should not compile. Eg. suppose we have a type class Foo [T] which should not have instances for String, then it would be highly desirable to be able to write a test of the form, shouldNotCompile(implicitly[Foo[String]]) which typechecks iff implicitly[Foo [String] ] does not typecheck.

          People

          • Assignee:
            Eugene Burmako
            Reporter:
            Eugene Burmako
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:

              Development