Created
March 13, 2015 18:54
-
-
Save fowlmouth/203aa476a0f3c0c2996b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{.emit:""" | |
struct FooBase { | |
int x; | |
}; | |
template <typename T> | |
struct Foo: FooBase { | |
T val; | |
}; | |
""".} | |
type | |
FooBase*{.importcpp, inheritable.} = object | |
Foo*{.importcpp.}[T] = object of FooBase | |
val*: T | |
var f1: FooBase # fine | |
var f2: Foo[int] # causes error: | |
# testcpp.nim(17, 8) Error: internal error: mangleRecFieldName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment